mstk.forcefield.Zff¶
- class mstk.forcefield.Zff(file)¶
Parse ForceField from ZFF file.
ZFF is the default plain text force field format in mstk.
In ZFF file, there is no leading 1/2 for harmonic energy terms. The length is in unit of nm, and angle is in unit of degree. The energies for harmonic bond, harmonic angle and vdW are in unit of kJ/mol/nm^2, kJ/mol/rad^2 and kJ/mol. The two values for LJ interaction are epsilon and sigma.
A force field term describing one topology element should only appear once. If there are duplicated terms, an Exception will be raised.
There are three types of comments: 1. Lines start with ‘#’ are completely ignored by the parser. 2. Lines start with ‘*’ are comments for the force field. They will be stored in the ForceField object as a list of str.
Each such line will be an element of comments.
‘#’ in the middle of line is separator for parameters and comments. These comments will be stored in the FFTerm object as a list of str. The comments in one line can contain several elements, separated by ‘;’
- Parameters:
file (str) –
- forcefield¶
- Type:
Methods
__init__(file)save_to(ff, file)Save ForceField to a ZFF file
- static save_to(ff, file)¶
Save ForceField to a ZFF file
- Parameters:
ff (ForceField) –
file (str) –