sarkas.potentials.fitted_pot#

Module for handling custom potential of the form given below.

Average Atom Fit Potential#

The form of the potential is

\[U(r) = \frac{q_i q_j}{4 \pi \epsilon_0} a \frac{e^{- \kappa r} }{r} \frac{1}{a + b e^{c (r - d)}} + h \cos\left ( (r-i) j e^{-kr} \right ) e^{-l r},\]

where \(\kappa, a, b, c, d, h, i, j, k, l\) are fit parameters to be passed. Remember to use the correct units.

Force Error#

The force error is calculated from the ratio

\[\Delta F = \frac{F(r_c)}{F(2a_{ws})},\]

where \(F(x)\) is the force between two particles at distance \(x\), and \(a_{ws}\) is the Wigner-Seitz radius.

Potential Attributes#

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

pot_matrix[0] = q_iq_je^2/(4 pi eps_0) Force factor between two particles.
pot_matrix[1] = kappa
pot_matrix[2] = a
pot_matrix[3] = b
pot_matrix[4] = c
pot_matrix[5] = d
pot_matrix[6] = a_rs. Short-range cutoff.

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

fit_force(r, pot_matrix)

Numba'd function to calculate the PP force between particles using the Moliere 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.