mstk.forcefield.HarmonicAngleTerm¶
- class mstk.forcefield.HarmonicAngleTerm(type1, type2, type3, theta, k, fixed=False)¶
Angle term in harmonic function form
The energy function is
>>> U = k * (theta-theta0)^2
The angle is in unit of radian, and the force constant is in unit of kJ/mol/rad^2.
During the initialization, the two side atom types will be sorted by their string.
- Parameters:
type1 (str) –
type2 (str) –
type3 (str) –
theta (float) –
k (float) –
fixed (bool) –
- type1¶
- Type:
str
- type2¶
- Type:
str
- type3¶
- Type:
str
- theta¶
- Type:
float
- k¶
- Type:
float
- fixed¶
- Type:
bool
Methods
__init__(type1, type2, type3, theta, k[, fixed])evaluate_energy(val)Evaluate the energy for a force field term like HarmonicBondTerm, PeriodicDihedralTerm, etc...
get_alias()Return a short alias for the name of this class
to_zff()Pack the attributes of a term into a string so that can be saved into a line in ZFF file.
to_zff_header()Header string to explain a line in ZFF format
to_zfp()Pack the attributes of a term into a dict so that can be saved into ZFP xml file.
Attributes
Whether or not this angle term is linear.
nameThe name of this force field term.
- evaluate_energy(val)¶
Evaluate the energy for a force field term like HarmonicBondTerm, PeriodicDihedralTerm, etc…
It is mainly for debugging. It is not (and can not be) implemented for all terms.
- Parameters:
val (float) – The value of distance, angle, dihedral or improper.
- Returns:
energy
- Return type:
float
- property is_linear¶
Whether or not this angle term is linear.
- Returns:
is
- Return type:
bool