md.long_range.pppm

Overview

Coulomb

Reciprocal space part of the PPPM Coulomb forces.

make_pppm_coulomb_forces

Long range Coulomb interactions evaluated using the PPPM method.

Details

Long-range potentials evaluated using the PPPM method.

class hoomd.md.long_range.pppm.Coulomb(nlist, resolution, order, r_cut, alpha, pair_force)

Bases: Force

Reciprocal space part of the PPPM Coulomb forces.

Note

Use make_pppm_coulomb_forces to create a connected pair of md.pair.Ewald and md.long_range.pppm.Coulomb instances that together implement the PPPM method for electrostatics.

resolution

Number of grid points in the x, y, and z directions \(\mathrm{[dimensionless]}\).

Type:

tuple[int, int, int]

order

Number of grid points in each direction to assign charges to \(\mathrm{[dimensionless]}\).

Type:

int

r_cut

Cutoff distance between the real space and reciprocal space terms \(\mathrm{[length]}\).

Type:

float

alpha

Debye screening parameter \(\mathrm{[length^{-1}]}\).

Type:

float

property nlist

Neighbor list used to compute the real space term.

hoomd.md.long_range.pppm.make_pppm_coulomb_forces(nlist, resolution, order, r_cut, alpha=0)

Long range Coulomb interactions evaluated using the PPPM method.

Parameters:
  • nlist (hoomd.md.nlist.NeighborList) – Neighbor list.

  • resolution (tuple[int, int, int]) – Number of grid points in the x, y, and z directions \(\mathrm{[dimensionless]}\).

  • order (int) – Number of grid points in each direction to assign charges to \(\mathrm{[dimensionless]}\).

  • r_cut (float) – Cutoff distance between the real space and reciprocal space terms \(\mathrm{[length]}\).

  • alpha (float) – Debye screening parameter \(\mathrm{[length^{-1}]}\).

Evaluate the potential energy \(U_\mathrm{coulomb}\) and apply the corresponding forces to the particles in the simulation.

\[U_\mathrm{coulomb} = \frac{1}{2} \sum_\vec{n} \sum_{i=0}^{N-1} \sum_{j=0}^{N-1} u_\mathrm{coulomb}(\vec{r}_j - \vec{r}_i + n_1 \cdot \vec{a}_1 + n_2 \cdot \vec{a}_2 + n_3 \cdot \vec{a}_3, q_i, q_j)\]
\[u_\mathrm{coulomb}(\vec{r}, q_i, q_j) = \frac{q_i q_j}{r} e^{-\alpha r}\]

where the infinite sum includes all periodic images \(\vec{n}\), \(N\) is the number of particles, \(\vec{r}_i\) is the position of particle \(i\), \(q_i\) is the charge of particle \(i\), \(\alpha\) is the Debye screening parameter, and \(\vec{a}_k\) are the periodic simulation box lattice vectors.

Note

In HOOMD-blue, the \(\frac{1}{4\pi\epsilon_0}\) factor is included in the units of charge.

The particle particle particle mesh (PPPM) method splits this computation into real space and reciprocal space components.

\[U_\mathrm{coulomb} = U_\mathrm{real\ space} + U_\mathrm{reciprocal\ space}\]

md.pair.Ewald to computes the real space term directly and md.long_range.pppm.Coulomb computes the reciprocal space term using fast Fourier transforms performed on a charge density grid. The accuracy of the method is sensitive to the cutoff for the real space part, the order of interpolation and grid resolution.

Exclusions

When nlist contains exclusions, md.pair.Ewald skips the computation of the excluded real space particle-particle interactions. md.long_range.pppm.Coulomb must correct the reciprocal space computation for this. The full energy (Coulomb.energy + Ewald.energy) is the sum of the following terms:

  • \(U_\mathrm{coulomb,additional}\) (Coulomb.additional_energy): Energy from the reciprocal space calculation plus any correction due to 'body' exclusions in the neighbor list.

  • \(U_{\mathrm{coulomb},i}\) (Coulomb.energies): Energies from the non-body neighbor list exclusions.

  • \(U_\mathrm{ewald,additional}\) (Ewald.additional_energy): 0.

  • \(U_\mathrm{ewald,i}\) (Ewald.additional_energy): Energies from the real space calculation for non-excluded particle pairs.

Warning

Do not apply bonds, angles, dihedrals, or impropers between particles in the same rigid body. Doing so will cause the exclusions to be double counted (once in \(U_\mathrm{coulomb,additional}\) and again in \(U_{\mathrm{coulomb},i}\)).

Screening

The Debye screening parameter \(\alpha\) enables the screening of electrostatic interactions with the same functional form as the short range md.pair.Yukawa potential. Use md.long_range.pppm.Coulomb with a non-zeo \(\alpha\) to compute screened electrostatic interactions when the cutoff is so large that the short ranged interactions are inefficient. See Salin, G and Caillol, J. 2000 for details.

Important

In MPI simulations with multiple ranks, the grid resolution must be a power of two in each dimension.

Returns:

real_space_force, reciprocal_space_force

Add both of these forces to the integrator.

Warning

make_pppm_coulomb_forces sets all parameters for the returned Force objects given the input resolution and order. Do not change the parameters of the returned objects directly.