Harmonic Angle Style


Define a three-body potential energy function corresponding to a harmonic angle style

\[U_{ijk} = \frac{1}{2}K(\theta - \theta_0)^2,\]

where \(K, \theta_0\) are parameters that must be set to define the interaction between atoms \(i, j, k\) .

Angles and types can be defined directly within the python input script, read from a LAMMPS data file (using the LAMMPS reader utility), read from a NAMD input file (using the NAMD reader utility) or read from a restart file.

Python Member Functions

Angle types and angles can be set from within the Python environment with simple invocations. In the syntax that follows, parameters with = may be given in any order and are also optionally specified. For example, if an existing angle type has already been set, it is unneccessary to specify its parameters again when creating an angle between three atoms.



Indices for atoms for which the angle is defined.
Spring constant coefficient for harmonic interaction.
Equilbrium angle for harmonic angle interaction (specified in radians if in python).


Adding the fix

#Add Fix for harmonic angle style
anglePot = FixAngleHarmonic(state,'anglePot')

Setting angle type coefficients in python

#Setting angle types

Defining an angle type in python

#Creating an angle between atoms 1,2,3
a=1     # index for atom 1
b=2     # index for atom 2
c=3     # index for atom 3
d=3     # index for atom 4
# create angle and implicitly create type

Activating the fix

#Activate fix

LAMMPS data file parameter order

angle_coeff type k theta0

Table Of Contents

Previous topic

FENE Bond Style

Next topic

CHARMM Angle Style

This Page