sarkas.potentials.yukawa#

Module for handling Yukawa potential.

Potential#

The Yukawa potential between two charges \(q_i\) and \(q_j\) at distant \(r\) is defined as

\[U_{ab}(r) = \frac{q_a q_b}{4 \pi \epsilon_0} \frac{e^{- \kappa r} }{r}.\]

where \(\kappa = 1/\lambda\) is the screening parameter.

Potential Attributes#

The elements of the sarkas.potentials.core.Potential.matrix are:

pot_matrix[0] = q_iq_j^2/(4 pi eps0)
pot_matrix[1] = 1/lambda
pot_matrix[2] = Ewald screening parameter

Functions

calc_force_error_quad(a, rc, pot_matrix)

Calculate the force error by integrating the square modulus of the force over the neglected volume.n The force error is calculated from

force_deriv(r, pot_matrix)

Calculate the second derivative of the potential.

force_error_integrand(r, pot_matrix)

Auxiliary function to be used in scipy.integrate.quad to calculate the integrand.

potential_derivatives(r, pot_matrix)

Calculate the first and second derivative of the potential.

pretty_print_info(potential)

Print potential specific parameters in a user-friendly way.

update_params(potential)

Assign potential dependent simulation's parameters.

yukawa_force(r_in, pot_matrix)

Numba'd function to calculate Potential and Force between two particles.

yukawa_force_pppm(r_in, pot_matrix)

Numba'd function to calculate Potential and Force between two particles when the pppm algorithm is chosen.