mstk.forcefield.MieTerm¶
- class mstk.forcefield.MieTerm(type1, type2, epsilon, sigma, repulsion, attraction)¶
vdW term with generalized LJ function form.
The energy function is
>>> U = C * epsilon * ((sigma/r)^n - (sigma/r)^m) >>> C = n/(n-m) * (n/m)^(m/(n-m)) >>> r_min = (n/m)^(1/(n-m)) * sigma
This term is mainly used for Coarse-Grained force field.
During the initialization, the two atom types will be sorted by their string.
- Parameters:
type1 (str) –
type2 (str) –
epsilon (float) –
sigma (float) –
repulsion (float) –
attraction (float) –
- type1¶
- Type:
str
- type2¶
- Type:
str
- epsilon¶
- Type:
float
- sigma¶
- Type:
float
- repulsion¶
- Type:
float
- attraction¶
- Type:
float
Methods
__init__(type1, type2, epsilon, sigma, ...)Evaluate the energy for a force field term like HarmonicBondTerm, PeriodicDihedralTerm, etc...
Get the energy pre-factor of the Mie function.
Get the converting factor from sigma to the distance of energy minimum.
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
SDK CGFF use LJ-9-6 and LJ-12-4
nameThe name of this force field term.
- evaluate_energy(r)¶
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
- factor_energy()¶
Get the energy pre-factor of the Mie function.
>>> C = n/(n-m) * (n/m)^(m/(n-m))
- Returns:
factor
- Return type:
float
- factor_r_min()¶
Get the converting factor from sigma to the distance of energy minimum.
>>> f = (n/m)^(1/(n-m))
- Returns:
factor
- Return type:
float
- property is_sdk¶
SDK CGFF use LJ-9-6 and LJ-12-4
- Returns:
is
- Return type:
bool