md.special_pair

Overview

SpecialPair

Base class special pair forces.

LJ

LJ special pair potential.

Coulomb

Coulomb special pair potential.

Details

Potentials between special pairs of particles

Special pairs are used to implement interactions between designated pairs of particles. They act much like bonds, except that the interaction potential is typically a pair potential, such as LJ.

By themselves, special pairs that have been specified in an initial configuration do nothing. Only when you specify an force (i.e. special_pairs.lj), are forces actually calculated between the listed particles.

class hoomd.md.special_pair.Coulomb

Bases: hoomd.md.special_pair.SpecialPair

Coulomb special pair potential.

Coulomb specifies a Coulomb potential energy between the two particles in each defined pair.

This is useful for implementing e.g. special 1-4 interactions in all-atom force fields. It uses a standard Coulomb interaction with a scaling parameter. This allows for using this for scaled 1-4 interactions like in OPLS where both the 1-4 LJ and Coulomb interactions are scaled by 0.5.

\begin{eqnarray*} V_{\mathrm{Coulomb}}(r) = & \alpha \cdot \left[ \frac{q_{a}q_{b}}{r} \right] & r < r_{\mathrm{cut}} \\ = & 0 & r \ge r_{\mathrm{cut}} \\ \end{eqnarray*}

where \(\vec{r}\) is the vector pointing from one particle to the other in the bond.

params

The parameter of the Coulomb forces for each particle type. The dictionary has the following keys:

  • alpha (float, required) - Coulomb scaling factor (in energy unit)

Type

TypeParameter[special pair type, dict]

r_cut

The cut-off distance for special pair potential (in distance unit)

Type

TypeParameter[special pair type, float]

Examples:

coulomb = special_pair.Coulomb()
coulomb.params['cluster'] = dict(alpha=1.0)
coulomb.r_cut['cluster'] = 2

New in version 2.2.

Changed in version 2.2.

class hoomd.md.special_pair.LJ

Bases: hoomd.md.special_pair.SpecialPair

LJ special pair potential.

LJ specifies a Lennard-Jones potential energy between the two particles in each defined pair.

This is useful for implementing e.g. special 1-4 interactions in all-atom force fields.

The pair potential uses the standard LJ definition.

\begin{eqnarray*} V_{\mathrm{LJ}}(r) = & 4 \varepsilon \left[ \left( \frac{\sigma}{r} \right)^{12} - \alpha \left( \frac{\sigma}{r} \right)^{6} \right] & r < r_{\mathrm{cut}} \\ = & 0 & r \ge r_{\mathrm{cut}} \\ \end{eqnarray*}

where \(\vec{r}\) is the vector pointing from one particle to the other in the bond.

params

The parameter of the lj forces for each particle type. The dictionary has the following keys:

  • epsilon (float, required) - energy parameter (in energy unit)

  • sigma (float, required) - particle size (in distance unit)

Type

TypeParameter[special pair type, dict]

r_cut

The cut-off distance for special pair potential (in distance unit)

Type

TypeParameter[special pair type, float]

Examples:

lj = special_pair.LJ()
lj.params['cluster'] = dict(epsilon=3, sigma=0.5)
lj.r_cut['cluster'] = 5

New in version 2.1.

class hoomd.md.special_pair.SpecialPair

Bases: hoomd.md.force.Force

Base class special pair forces.

Note

SpecialPair is the base class for all special pair potentials. Users should not instantiate this class directly.