sarkas.potentials.core.Potential#

class sarkas.potentials.core.Potential[source]#

Parameters specific to potential choice.

Variables
  • a_rs (float) – Short-range cutoff to deal with divergence of the potential for r -> 0.

  • box_lengths (array) – Pointer to sarkas.core.Parameters.box_lengths.

  • box_volume (float) – Pointer to sarkas.core.Parameters.box_volume.

  • force_error (float) – Force error due to the choice of the algorithm.

  • fourpie0 (float) – Coulomb constant \(4 \pi \epsilon_0\).

  • kappa (float) – Inverse screening length.

  • linked_list_on (bool) – Flag for choosing the Linked cell list algorithm.

  • matrix (numpy.ndarray) – Matrix of potential’s parameters.

  • measure (bool) – Flag for calculating the histogram for the radial distribution function. It is set to False during equilibration phase and changed to True during production phase.

  • method (str) – Algorithm method. Choices = [“PP”, “PPPM”, “FMM”, “Brute”]. n “PP” = Linked Cell List (default). “PPPM” = Particle-Particle Particle-Mesh. “FMM” = Fast Multipole Method. “Brute” = corresponds to calculating the distance between all pair of particles within a distance \(L/2\).

  • pbox_lengths (numpy.ndarray) – Pointer to sarkas.core.Parameters.pbox_lengths

  • pbox_volume (float) – Pointer to sarkas.core.Parameters.pbox_lengths

  • pppm_on (bool) – Flag for turning on the PPPM algorithm.

  • QFactor (float) – Sum of the squared of the charges.

  • rc (float) – Cutoff radius for the Linked Cell List algorithm.

  • screening_length_type (str) – Choice of ways to calculate the screening length. n Choices = [thomas-fermi, tf, debye, debye-huckel, db, moliere, custom, unscreened]. n Default = thomas-fermi

  • screening_length (float) – Value of the screening length.

  • total_net_charge (float) – Sum of all the charges.

  • type (str) – Type of potential. n Choices = [“coulomb”, “egs”, “lennardjones”, “moliere”, “qsp”].

Methods

Potential.__init__()

Potential.calc_electron_properties(params)

Calculate electronic parameters.

Potential.calc_screening_length(species)

Potential.copy_params(params)

Copy necessary parameters.

Potential.from_dict(input_dict)

Update attributes from input dictionary.

Potential.method_pretty_print()

Print algorithm information.

Potential.method_setup()

Setup algorithm's specific parameters.

Potential.pppm_setup()

Calculate the pppm parameters.

Potential.pretty_print()

Print potential information in a user-friendly way.

Potential.setup(params, species)

Setup the potential class.

Potential.type_setup(species)

Potential.update_brute(ptcls)

Calculate particles' acceleration and potential brutally.

Potential.update_fmm_coulomb(ptcls)

Calculate particles' potential and accelerations using FMM method.

Potential.update_fmm_yukawa(ptcls)

Calculate particles' potential and accelerations using FMM method.

Potential.update_linked_list(ptcls)

Calculate the pp part of the acceleration.

Potential.update_pm(ptcls)

Calculate the pm part of the potential and acceleration.

Potential.update_pppm(ptcls)

Calculate particles' potential and accelerations using pppm method.