md.special_pair#
Overview
Base class special pair forces. |
|
LJ special pair force. |
|
Coulomb special pair force. |
Details
Special pair forces.
Special pair force classes apply a force and virial on every particle in the simulation state commensurate with the potential energy:
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.
Each special pair is defined by an ordered pair of particle tags in the
hoomd.State member pair_group. HOOMD-blue does not compute special pair
groups, users must explicitly define special pairs in the initial condition.
In the special pair group (j,k), \(r\) is the length of the vector between the particle positions \(r= |\mathrm{minimum\_image}(\vec{r}_k - \vec{r}_j)|\).
Special pair force classes assign 1/2 of the potential energy to each of the particles in the bond group:
and similarly for virials.
- class hoomd.md.special_pair.Coulomb#
Bases:
SpecialPairCoulomb special pair force.
Coulombcomputes forces, virials, and energies on all special pairs in the simulation state with:\[\begin{split}U(r) = \begin{cases} \alpha \cdot \left[ \frac{q_{a}q_{b}}{r} \right] & r < r_{\mathrm{cut}} \\ 0 & r \ge r_{\mathrm{cut}} \\ \end{cases}\end{split}\]Note
Use
Coulombto implement special 1-4 interactions in atomistic force fields, such as the scaled 1-4 interactions in OPLS where both the 1-4LJandCoulombinteractions are scaled by 0.5.- params#
The parameter of the Coulomb forces for each particle type. The dictionary has the following keys:
alpha(float, required) - Coulomb scaling factor \([\mathrm{energy}]\)
- Type:
TypeParameter[
special pair type, dict]
- r_cut#
The cut-off distance for special pair potential \([\mathrm{length}]\)
- Type:
TypeParameter[
special pair type, float]
Examples:
coulomb = special_pair.Coulomb() coulomb.params['cluster'] = dict(alpha=1.0) coulomb.r_cut['cluster'] = 2
- class hoomd.md.special_pair.LJ#
Bases:
SpecialPairLJ special pair force.
LJcomputes forces, virials, and energies on all special pairs in the simulation state with:\[\begin{split}U(r) = \begin{cases} 4 \varepsilon \left[ \left( \frac{\sigma}{r} \right)^{12} - \left( \frac{\sigma}{r} \right)^{6} \right] & r < r_{\mathrm{cut}} \\ 0 & r \ge r_{\mathrm{cut}} \\ \end{cases}\end{split}\]Note
Use
LJto implement special 1-4 interactions in atomistic force fields, such as the scaled 1-4 interactions in OPLS where both the 1-4LJandCoulombinteractions are scaled by 0.5.- params#
The parameter of the lj forces for each particle type. The dictionary has the following keys:
epsilon(float, required) - energy parameter \([\mathrm{energy}]\)sigma(float, required) - particle size \([\mathrm{length}]\)
- Type:
TypeParameter[
special pair type, dict]
- r_cut#
The cut-off distance for special pair potential \([\mathrm{length}]\)
- 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
- class hoomd.md.special_pair.SpecialPair#
Bases:
ForceBase class special pair forces.
SpecialPairis the base class for all special pair forces.Warning
This class should not be instantiated by users. The class can be used for
isinstanceorissubclasschecks.