ForceBalance API
1.3
Automated optimization of force fields and empirical potentials
|
The 'reader' class. More...
Public Member Functions | |
def | __init__ (self, fnm) |
def | Split (self, line) |
def | Whites (self, line) |
def | feed (self, line) |
def | build_pid (self, pfld) |
Returns the parameter type (e.g. More... | |
Public Attributes | |
ln | |
itype | |
suffix | |
pdict | |
adict | |
The mapping of (this residue, atom number) to (atom name) for building atom-specific interactions in [ bonds ], [ angles ] etc. More... | |
molatom | |
The mapping of (molecule name) to a dictionary of of atom types for the atoms in that residue. More... | |
Molecules | |
AtomTypes | |
The 'reader' class.
It serves two main functions:
1) When parsing a text force field file, the 'feed' method is called once for every line. Calling the 'feed' method stores the internal variables that are needed for making the unique parameter identifier.
2) The 'reader' also stores the 'pdict' dictionary, which is needed for building the matrix of rescaling factors. This is not needed for the XML force fields, so in XML force fields pdict is replaced with a string called "XML_Override".
Definition at line 85 of file __init__.py.
def src.BaseReader.__init__ | ( | self, | |
fnm | |||
) |
Definition at line 87 of file __init__.py.
def src.BaseReader.build_pid | ( | self, | |
pfld | |||
) |
Returns the parameter type (e.g.
K in BONDSK) based on the current interaction type.
Both the 'pdict' dictionary (see gmxio.pdict) and the interaction type 'state' (here, BONDS) are needed to get the parameter type.
If, however, 'pdict' does not contain the ptype value, a suitable substitute is simply the field number.
Note that if the interaction type state is not set, then it defaults to the file name, so a generic parameter ID is 'filename.line_num.field_num'
Definition at line 128 of file __init__.py.
def src.BaseReader.feed | ( | self, | |
line | |||
) |
Definition at line 109 of file __init__.py.
def src.BaseReader.Split | ( | self, | |
line | |||
) |
Definition at line 103 of file __init__.py.
def src.BaseReader.Whites | ( | self, | |
line | |||
) |
Definition at line 106 of file __init__.py.
src.BaseReader.adict |
The mapping of (this residue, atom number) to (atom name) for building atom-specific interactions in [ bonds ], [ angles ] etc.
Definition at line 93 of file __init__.py.
src.BaseReader.AtomTypes |
Definition at line 101 of file __init__.py.
src.BaseReader.itype |
Definition at line 89 of file __init__.py.
src.BaseReader.ln |
Definition at line 88 of file __init__.py.
src.BaseReader.molatom |
The mapping of (molecule name) to a dictionary of of atom types for the atoms in that residue.
self.moleculedict = OrderedDict() The listing of 'RES:ATOMNAMES' for atom names in the line This is obviously a placeholder.
Definition at line 98 of file __init__.py.
src.BaseReader.Molecules |
Definition at line 100 of file __init__.py.
src.BaseReader.pdict |
Definition at line 91 of file __init__.py.
src.BaseReader.suffix |
Definition at line 90 of file __init__.py.