ForceBalance API  1.3
Automated optimization of force fields and empirical potentials
List of all members | Public Member Functions | Public Attributes
src.tinkerio.Tinker_Reader Class Reference

Finite state machine for parsing TINKER force field files. More...

Inheritance diagram for src.tinkerio.Tinker_Reader:
[legend]
Collaboration diagram for src.tinkerio.Tinker_Reader:
[legend]

Public Member Functions

def __init__ (self, fnm)
 
def feed (self, line)
 Given a line, determine the interaction type and the atoms involved (the suffix). More...
 

Public Attributes

 pdict
 The parameter dictionary (defined in this file) More...
 
 atom
 The atom numbers in the interaction (stored in the TINKER parser) More...
 
 itype
 
 suffix
 

Detailed Description

Finite state machine for parsing TINKER force field files.

This class is instantiated when we begin to read in a file. The feed(line) method updates the state of the machine, informing it of the current interaction type. Using this information we can look up the interaction type and parameter type for building the parameter ID.

Definition at line 97 of file tinkerio.py.

Constructor & Destructor Documentation

◆ __init__()

def src.tinkerio.Tinker_Reader.__init__ (   self,
  fnm 
)

Definition at line 99 of file tinkerio.py.

Member Function Documentation

◆ feed()

def src.tinkerio.Tinker_Reader.feed (   self,
  line 
)

Given a line, determine the interaction type and the atoms involved (the suffix).

TINKER generally has stuff like this:

         bond-cubic              -2.55
         bond-quartic            3.793125
 
         vdw           1               3.4050     0.1100
         vdw           2               2.6550     0.0135      0.910 # PRM 4
 
         multipole     2    1    2               0.25983
                                                -0.03859    0.00000   -0.05818
                                                -0.03673
                                                 0.00000   -0.10739
                                                -0.00203    0.00000    0.14412

The '#PRM 4' has no effect on TINKER but it indicates that we are tuning the fourth field on the line (the 0.910 value).

Todo:
Put the rescaling factors for TINKER parameters in here. Currently we're using the initial value to determine the rescaling factor which is not very good.
     Every parameter line is prefaced by the interaction type
     except for 'multipole' which is on multiple lines.  Because
     the lines that come after 'multipole' are predictable, we just
     determine the current line using the previous line.

     Random note: Unit of force is kcal / mole / angstrom squared.

Definition at line 140 of file tinkerio.py.

Member Data Documentation

◆ atom

src.tinkerio.Tinker_Reader.atom

The atom numbers in the interaction (stored in the TINKER parser)

Definition at line 104 of file tinkerio.py.

◆ itype

src.tinkerio.Tinker_Reader.itype

Definition at line 148 of file tinkerio.py.

◆ pdict

src.tinkerio.Tinker_Reader.pdict

The parameter dictionary (defined in this file)

Definition at line 102 of file tinkerio.py.

◆ suffix

src.tinkerio.Tinker_Reader.suffix

Definition at line 170 of file tinkerio.py.


The documentation for this class was generated from the following file: