mstk.forcefield.Zfp

class mstk.forcefield.Zfp(*files)

Load ForceField from ZFP file.

ZFP is the default format for storing ForceField in mstk. XML language is used by ZFP file to serialize the setting and all the FFTerms in a ForceField object.

Several files can be read at one time. Only one ForceField object will be created and it will contain force field terms from all of the files. Note that the settings of the ForceField is read from the first file. The settings in other files will be ignored.

A force field term describing one topology element should only appear once. If there are duplicated terms, the one appears later will be omitted. e.g. HarmonicAngleTerm(‘c_4’, ‘c_4’, ‘h_1’) and SDKAngleTerm(‘c_4’, ‘c_4’, ‘h_1’) are considered as duplicated, because both of them are describing the angle type (‘c_4’, ‘c_4’, ‘h_1’). LJ126Term(‘c_4’, ‘h_1’) and MieTerm(‘c_4’, ‘h_1’) are also duplicated, because both of them are describing the vdW interactions between atom types ‘c_4’ and ‘h_1’.

Parameters:

files (list of str) –

forcefield
Type:

ForceField

Methods

__init__(*files)

save_to(ff, file)

Save ForceField to a ZFP file

static save_to(ff, file)

Save ForceField to a ZFP file

Parameters: