sarkas.potentials.coulomb.coulomb_force_pppm
sarkas.potentials.coulomb.coulomb_force_pppm#
- sarkas.potentials.coulomb.coulomb_force_pppm(r_in, pot_matrix)[source]#
Numba’d function to calculate the potential and force between two particles when the pppm algorithm is chosen.
- Parameters
r_in (float) – Distance between two particles.
pot_matrix (numpy.ndarray) – It contains potential dependent variables.
Shape = (3,
sarkas.core.Parameters.num_species,sarkas.core.Parameters.num_species) .
- Returns
u_r (float) – Potential value.
f_r (float) – Force between two particles.
Examples
>>> import numpy as np >>> r = 2.0 >>> pot_matrix = np.array([ 1.0, 0.5, 0.0]) >>> coulomb_force_pppm(r, pot_matrix) (0.07864960352514257, 0.14310167611771996)