make_pppm_coulomb_forces

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 [dimensionless]\mathrm{[dimensionless]}.

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

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

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

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

Ucoulomb=12ni=0N1j=0N1ucoulomb(rjri+n1a1+n2a2+n3a3,qi,qj)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)
ucoulomb(r,qi,qj)=qiqjreαru_\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 n\vec{n}, NN is the number of particles, ri\vec{r}_i is the position of particle ii, qiq_i is the charge of particle ii, α\alpha is the Debye screening parameter, and ak\vec{a}_k are the periodic simulation box lattice vectors.

Note

In HOOMD-blue, the 14πϵ0\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.

Ucoulomb=Ureal space+Ureciprocal spaceU_\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:

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

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

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

  • Uewald,iU_\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 Ucoulomb,additionalU_\mathrm{coulomb,additional} and again in Ucoulomb,iU_{\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.