mstk.forcefield.DrudePolarTerm¶
- class mstk.forcefield.DrudePolarTerm(type: str, alpha, thole, k=209200.0, mass=0.4, merge_alpha_H=0.0)¶
Polarization term described by Drude induced dipole.
Currently, only the isotropic Drude polarization is implemented. The energy function for polarization is
>>> E = k * d^2
The charge assigned to the Drude particle is
>>> q = - sqrt(4 * pi * eps_0 * (2k) * alpha)
If this atom is bonded with hydrogen atoms, the argument merge_alpha_H determines the polarizability of neighbour H atoms. The alpha of these H atoms will be merged into the this atom. Therefore, DrudePolarTerm for H atom types should not be provided explicitly. Otherwise, there will be double count. The H atoms are identified by check the
symbolattribute. An atom is considered to be hydrogen if symbol equals ‘H’.- Parameters:
type (str) –
alpha (float) –
thole (float) –
k (float) –
mass (float) –
merge_alpha_H (float) –
- type¶
- Type:
str
- alpha¶
- Type:
float
- thole¶
- Type:
float
- k¶
- Type:
float
- mass¶
- Type:
float
- merge_alpha_H¶
- Type:
float
Methods
__init__(type, alpha, thole[, k, mass, ...])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_charge([alpha])Get the charge offset between parent atom and Drude particle.
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.
- to_zff()¶
Pack the attributes of a term into a string so that can be saved into a line in ZFF file.
Every class to be packed should have a class property _term_attrs. This dict records which attributes should be saved into ZFF file, and it is also used as the arguments for initializing a FFTerm. It also tells the data type of these attributes.
- Returns:
line
- Return type:
string
- get_charge(alpha=None)¶
Get the charge offset between parent atom and Drude particle.
The charge assigned on the Drude particle is the negative of this charge offset.
- Parameters:
alpha (float) – The polarizability of parent atom in unit of nm^3.
- Returns:
charge – The charge offset from Drude particle to parent atom.
- Return type:
float