ppmd.coulomb.ewald module¶
Methods for Coulombic forces and energies with the classical Ewald method.
-
class
ppmd.coulomb.ewald.EwaldOrthoganal(domain, eps=1e-06, real_cutoff=None, alpha=None, recip_cutoff=None, recip_nmax=None, shared_memory=False, shell_width=None, work_ratio=1.0, force_unit=1.0, energy_unit=1.0)¶ Bases:
object-
alpha¶ alpha
-
evaluate_contributions(positions, charges)¶
-
evaluate_self_interactions(charges, energy=None, potential=None)¶
-
extract_forces_energy_real(positions, charges, forces, energy=None, potential=None)¶
-
extract_forces_energy_reciprocal(positions, charges, forces, energy, potential=None)¶
-
static
internal_to_ev()¶ Multiply by this constant to convert from internal units to eV.
-
kmax¶ Number of reciporcal vectors taken in each direction.
-
real_cutoff¶ Real space cutoff
-
recip_cutoff¶ Reciprocal space cutoff.
-
recip_vectors¶ Reciprocal lattice vectors
-
shell_width¶ Real space padding width
-
test_evaluate_python_lr(positions, charges)¶
-
test_evaluate_python_self(charges)¶
-
test_evaluate_python_sr(positions, charges)¶
-
-
ppmd.coulomb.ewald.EwaldOrthogonal¶ alias of
ppmd.coulomb.ewald.EwaldOrthoganal
-
ppmd.coulomb.ewald.compute_alpha(N, L, ratio)¶ Compute an optimal alpha to give O(N^{3/2}) scaling for ewald summation. tau_r: Real space time cost per pair of particles (time cost per real space kernel executin) tau_f: Time for reciprocal component per particle per reciprocal vector. :param N: Number of particles :param L: Domain extent (assumes cubic) :param ratio: ratio: tau_r/tau_f. :return: optimal alpha
-
ppmd.coulomb.ewald.compute_rc_nc_cutoff(alpha, L, eps=1e-06)¶