mstk.forcefield.OplsDihedralTerm¶
- class mstk.forcefield.OplsDihedralTerm(type1, type2, type3, type4, k1, k2, k3, k4)¶
Dihedral term in OPLS form
The energy function is
>>> U = k_1*(1+cos(phi)) + k_2*(1-cos(2*phi)) + k_3*(1+cos(3*phi)) + k_4*(1-cos(4*phi))
OPLS form is commonly used, therefore we don’t generalize it with
PeriodicDihedralTerm.During the initialization, the sequence of atom types to use i-j-k-l or l-k-j-i will be determined by their string order.
DihedralTerm allows wildcard(*) for side atoms. For sorting purpose, the wildcard will always be the last. During force field matching, the terms with wildcard will have lower priority. The terms with wildcard will be used only if exact match cannot be found.
- Parameters:
type1 (str) –
type2 (str) –
type3 (str) –
type4 (str) –
k1 (float) –
k2 (float) –
k3 (float) –
k4 (float) –
- type1¶
- Type:
str
- type2¶
- Type:
str
- type3¶
- Type:
str
- type4¶
- Type:
str
- k1¶
- Type:
float
- k2¶
- Type:
float
- k3¶
- Type:
float
- k4¶
- Type:
float
Methods
__init__(type1, type2, type3, type4, k1, k2, ...)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
Get the equivalent PeriodicDihedralTerm
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
Attributes
Whether or not this dihedral terms always give zero energy.
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_zero¶
Whether or not this dihedral terms always give zero energy.
For linear groups like alkyne and nitrile, dihedral terms are presented in topology. But the parameters for these terms usually equal to zero.
- Returns:
is
- Return type:
bool
- to_periodic_term()¶
Get the equivalent PeriodicDihedralTerm
- Returns:
term
- Return type: