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)

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.NList) – 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. 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.

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.

Warning

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 appropriately. Do not change the parameters of real_space_force directly.