mstk.forcefield.MorseBondTerm¶
- class mstk.forcefield.MorseBondTerm(type1, type2, length, k, depth)¶
Bond term in Morse function form
The energy function is
>>> U = depth*(1-exp(-alpha*(r-b0)))^2 >>> alpha = (k / depth) ** 0.5
The k corresponds to the force constant k in HarmonicBondTerm.
Note its difference to the MorseVdwTerm. MorseVdwTerm has zero energy when two atoms are far away, while MorseBondTerm has zero energy at equilibrium distance.
During the initialization, the two atom types will be sorted by their string.
- Parameters:
type1 (str) –
type2 (str) –
length (float) –
k (float) –
depth (float) –
- type1¶
- Type:
str
- type2¶
- Type:
str
- length¶
- Type:
float
- k¶
- Type:
float
- depth¶
- Type:
float
Methods
__init__(type1, type2, length, k, depth)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
Attributes
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