md.angle

Overview

Angle

Constructs the angular bond potential.

Harmonic

Harmonic angle potential.

Cosinesq

Cosine squared angle potential.

Details

Angle potentials.

class hoomd.md.angle.Angle

Bases: hoomd.md.force.Force

Constructs the angular bond potential.

Note

Angle is the base class for all angular potentials. Users should not instantiate this class directly.

class hoomd.md.angle.Cosinesq

Bases: hoomd.md.angle.Angle

Cosine squared angle potential.

Cosinesq specifies a cosine squared potential energy between every triplet of particles with an angle specified between them.

\[V(\theta) = \frac{1}{2} k \left( \cos\theta - \cos\theta_0 \right)^2\]

where \(\theta\) is the angle between the triplet of particles. This angle style is also known as g96, since they were used in the gromos96 force field. These are also the types of angles used with the coarse-grained MARTINI force field.

params

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

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

  • t0 (float, required) - rest angle \(\theta_0\) \([\mathrm{radians}]\)

Type

TypeParameter[angle type, dict]

Parameters \(k\) and \(\theta_0\) must be set for each type of angle in the simulation. Note that the value of \(k\) for this angle potential is not comparable to the value of \(k\) for harmonic angles, as they have different units.

Examples:

cosinesq = angle.Cosinesq()
cosinesq.params['polymer'] = dict(k=3.0, t0=0.7851)
cosinesq.params['backbone'] = dict(k=100.0, t0=1.0)
class hoomd.md.angle.Harmonic

Bases: hoomd.md.angle.Angle

Harmonic angle potential.

Harmonic specifies a harmonic potential energy between every triplet of particles with an angle specified between them.

\[V(\theta) = \frac{1}{2} k \left( \theta - \theta_0 \right)^2\]

where \(\theta\) is the angle between the triplet of particles.

params

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

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

  • t0 (float, required) - rest angle \(\theta_0\) \([\mathrm{radians}]\)

Type

TypeParameter[angle type, dict]

Examples:

harmonic = angle.Harmonic()
harmonic.params['polymer'] = dict(k=3.0, t0=0.7851)
harmonic.params['backbone'] = dict(k=100.0, t0=1.0)