md.dihedral

Overview

Dihedral

Constructs the dihedral bond potential.

Harmonic

Harmonic dihedral potential.

OPLS

OPLS dihedral force.

Details

Dihedral potentials.

Dihedrals add forces between specified quadruplets of particles and used to model rotation about chemical bonds.

By themselves, dihedrals that have been specified in an input file do nothing. Only when you specify an dihedral force (e.g. dihedral.Harmonic), are forces actually calculated between the listed particles.

Important: There are multiple conventions pertaining to the dihedral angle (phi) in the literature. HOOMD utilizes the convention shown in the following figure, where vectors are defined from the central particles to the outer particles. These vectors correspond to a stretched state (\(\phi = 180\) degrees) when they are anti-parallel and a compact state (\(\phi = 0\)) when they are parallel.

Dihedral angle definition
class hoomd.md.dihedral.Dihedral

Bases: hoomd.md.force.Force

Constructs the dihedral bond potential.

Note

Dihedral is the base class for all dihedral potentials. Users should not instantiate this class directly.

class hoomd.md.dihedral.Harmonic

Bases: hoomd.md.dihedral.Dihedral

Harmonic dihedral potential.

Harmonic specifies a harmonic dihedral potential energy between every defined dihedral quadruplet of particles in the simulation:

\[V(\phi) = \frac{1}{2}k \left( 1 + d \cos\left(n \phi - \phi_0 \right) \right)\]

where \(\phi\) is the angle between two sides of the dihedral.

params

The parameter of the harmonic bonds for each dihedral type. The dictionary has the following keys:

  • k (float, required) - potential constant \(k\) \([\mathrm{energy}]\)

  • d (float, required) - sign factor \(d\)

  • n (int, required) - angle multiplicity factor \(n\)

  • phi0 (float, required) - phase shift \(\phi_0\) \([\mathrm{radians}]\)

Type

TypeParameter [dihedral type, dict]

Examples:

harmonic = dihedral.Harmonic()
harmonic.params['polymer'] = dict(k=3.0, d=-1, n=3, phi0=0)
harmonic.params['backbone'] = dict(k=100.0, d=1, n=4, phi0=math.pi/2)
class hoomd.md.dihedral.OPLS

Bases: hoomd.md.dihedral.Dihedral

OPLS dihedral force.

OPLS specifies an OPLS-style dihedral potential energy between every defined dihedral.

\[V(\phi) = \frac{1}{2}k_1 \left( 1 + \cos\left(\phi \right) \right) + \frac{1}{2}k_2 \left( 1 - \cos\left(2 \phi \right) \right) + \frac{1}{2}k_3 \left( 1 + \cos\left(3 \phi \right) \right) + \frac{1}{2}k_4 \left( 1 - \cos\left(4 \phi \right) \right)\]

where \(\phi\) is the angle between two sides of the dihedral and \(k_n\) are the force coefficients in the Fourier series (in energy units).

params

The parameter of the OPLS bonds for each particle type. The dictionary has the following keys:

  • k1 (float, required) - force constant of the first term \([\mathrm{energy}]\)

  • k2 (float, required) - force constant of the second term \([\mathrm{energy}]\)

  • k3 (float, required) - force constant of the third term \([\mathrm{energy}]\)

  • k4 (float, required) - force constant of the fourth term \([\mathrm{energy}]\)

Type

TypeParameter [dihedral type, dict]

Examples:

opls = dihedral.OPLS()
opls.params['backbone'] = dict(k1=1.0, k2=1.0, k3=1.0, k4=1.0)