# 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 are typically 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 (i.e. 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 deg) when they are anti-parallel and a compact state (phi=0 deg) when they are parallel. class hoomd.md.dihedral.Dihedral

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

Harmonic dihedral potential.

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

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

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

params

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

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

OPLS dihedral force

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

$V(r) = \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 (in units of energy)

• k2 (float, required) - force constant of the second term (in units of energy)

• k3 (float, required) - force constant of the third term (in units of energy)

• k4 (float, required) - force constant of the fourth term (in units of 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)