mstk.forcefield.ChargeIncrementTerm¶
- class mstk.forcefield.ChargeIncrementTerm(type1, type2, value)¶
ChargeIncrementTerm describes the offset of charge between two atom types when they are bonded.
Two atom types and the offset from the second to first should be provided to construct this term. e.g. The following example means when h_1 and c_4 are bonded, 0.06 element charges will be transferred from c_4 to h_1.
>>> term = ChargeIncrementTerm('h_1', 'c_4', 0.06)
During the initialization, the two atom types will be sorted by their string. The value will be modified to represent the offset from the second to the first atom types after sorting.
>>> print(term.type1, term.type2, term.value) c_4 h_1 -0.06
- Parameters:
type1 (str) – The string of first atom type
type2 (str) – The string of second atom type
value (float) – The offset from type2 to type1
- type1¶
The string of first atom type
- Type:
str
- type2¶
The string of second atom type
- Type:
str
- value¶
The offset from type2 to type1
- Type:
float
Methods
__init__(type1, type2, value)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
The name of this force field term.
- property name¶
The name of this force field term.
- Returns:
name
- Return type:
str