ForceBalance API
1.3
Automated optimization of force fields and empirical potentials
|
Target subclass for matching the counterpoise correction. More...
Public Member Functions | |
def | __init__ (self, options, tgt_opts, forcefield) |
To instantiate Counterpoise, we read the coordinates and counterpoise data. More... | |
def | loadxyz (self, fnm) |
Parse an XYZ file which contains several xyz coordinates, and return their elements. More... | |
def | load_cp (self, fnm) |
Load in the counterpoise data, which is easy; the file consists of floating point numbers separated by newlines. More... | |
def | get (self, mvals, AGrad=False, AHess=False) |
Gets the objective function for fitting the counterpoise correction. More... | |
Public Attributes | |
loop_over_snapshots | |
Number of snapshots. More... | |
xyzs | |
XYZ elements and coordinates. More... | |
cpqm | |
Counterpoise correction data. More... | |
na | |
Number of atoms. More... | |
ns | |
Target subclass for matching the counterpoise correction.
Definition at line 36 of file counterpoise.py.
def src.counterpoise.Counterpoise.__init__ | ( | self, | |
options, | |||
tgt_opts, | |||
forcefield | |||
) |
To instantiate Counterpoise, we read the coordinates and counterpoise data.
Definition at line 40 of file counterpoise.py.
def src.counterpoise.Counterpoise.get | ( | self, | |
mvals, | |||
AGrad = False , |
|||
AHess = False |
|||
) |
Gets the objective function for fitting the counterpoise correction.
As opposed to AbInitio_GMXX2, which calls an external program, this script actually computes the empirical interaction given the force field parameters.
It loops through the snapshots and atom pairs, and computes pairwise contributions to an energy term according to hard-coded functional forms.
One potential issue is that we go through all atom pairs instead of looking only at atom pairs between different fragments. This means that even for two infinitely separated fragments it will predict a finite CP correction. While it might be okay to apply such a potential in practice, there will be some issues for the fitting. Thus, we assume the last snapshot to be CP-free and subtract that value of the potential back out.
Note that forces and parametric derivatives are not implemented.
[in] | mvals | Mathematical parameter values |
[in] | AGrad | Switch to turn on analytic gradient (not implemented) |
[in] | AHess | Switch to turn on analytic Hessian (not implemented) |
Definition at line 130 of file counterpoise.py.
def src.counterpoise.Counterpoise.load_cp | ( | self, | |
fnm | |||
) |
Load in the counterpoise data, which is easy; the file consists of floating point numbers separated by newlines.
Definition at line 101 of file counterpoise.py.
def src.counterpoise.Counterpoise.loadxyz | ( | self, | |
fnm | |||
) |
Parse an XYZ file which contains several xyz coordinates, and return their elements.
[in] | fnm | The input XYZ file name |
Definition at line 69 of file counterpoise.py.
src.counterpoise.Counterpoise.cpqm |
Counterpoise correction data.
Definition at line 59 of file counterpoise.py.
src.counterpoise.Counterpoise.loop_over_snapshots |
Number of snapshots.
LPW 2018-02-11: This is set to True if the target calculates a single-point property over several existing snapshots.
Definition at line 55 of file counterpoise.py.
src.counterpoise.Counterpoise.na |
Number of atoms.
Definition at line 82 of file counterpoise.py.
src.counterpoise.Counterpoise.ns |
Definition at line 95 of file counterpoise.py.
src.counterpoise.Counterpoise.xyzs |
XYZ elements and coordinates.
Definition at line 57 of file counterpoise.py.