mstk.forcefield.PaduaLJScaler

class mstk.forcefield.PaduaLJScaler(file)

PaduaLJScaler implements the empirical LJ scaling scheme of Goloviznina Kateryna.

A scaling file should be providing, which provides information about fragments, dimers, atom types belongs to each fragments, charges and dipoles of each fragments and distances of dimers.

Scaling factor can also be provided directly in DIMERS section. K_SAPT2 section is ignored.

After the scaling file been loaded, all the LJ126Terms in a ForceField can be scaled by calling function scale().

Examples

>>> scaler = PaduaLJScaler('ljscale.txt')
>>> ff = ForceField.open('input.ff')
>>> scaler.scale(ff)
Parameters:

file (str) –

scale_sigma

Scaling factor for sigma, which equals to 1.0 by default. Other value can be provided by the input file by adding a line SCALE_SIGMA value

Type:

float

Methods

__init__(file)

predict_scale_epsilon(at1, at2)

Predict the scaling factor for epsilon of the LJ126Term between two atom types with empirical formulation.

scale(ff)

Scale epsilon and sigma of all the LJ126Terms in a ForceField.

scale_lj(term)

Scale the epsilon and sigma of a LJ126Term.

scale(ff)

Scale epsilon and sigma of all the LJ126Terms in a ForceField.

Both the self-vdW terms and pairwise-vdW terms are scaled, as long as it is LJ126Term.

Parameters:

ff (ForceField) –

Returns:

all_scaled – Whether or not all the vdW terms are been scaled. If it’s False, it means fragment or dimer data not found for some LJ126Terms.

Return type:

bool

scale_lj(term)

Scale the epsilon and sigma of a LJ126Term.

If scaling factor for epsilon is successfully predicted, then epsilon will be scaled by this factor, and sigma will be scaled by predefined scaling factor. If scaling factor for epsilon is not predicted (because of fragment or dimer not found), then both epsilon and sigma will be untouched.

Parameters:

term (LJ126Term) –

Returns:

scaled

Return type:

bool

predict_scale_epsilon(at1, at2)

Predict the scaling factor for epsilon of the LJ126Term between two atom types with empirical formulation.

Parameters:
  • at1 (str) – The first atom type

  • at2 (str) – The second atom type

Returns:

k – float value means successful prediction. None means fragment or dimer data not found.

Return type:

float or None