ForceBalance API
1.3
Automated optimization of force fields and empirical potentials
|
Base class for thermodynamical quantity used for fitting. More...
Public Member Functions | |
def | __init__ (self, engname, temperature, pressure, name=None) |
def | __str__ (self) |
def | extract (self, engines, FF, mvals, h, AGrad=True) |
Calculate and extract the quantity from MD results. More... | |
Public Attributes | |
name | |
engname | |
temperature | |
pressure | |
Base class for thermodynamical quantity used for fitting.
This can be any experimental data that can be calculated as an ensemble average from a simulation.
name : string Identifier for the quantity that is specified in quantities
in Target options. engname : string Use this engine to extract the quantity from the simulation results. At present, only gromacs
is supported. temperature : float Calculate the quantity at this temperature (in K). pressure : float Calculate the quantity at this pressure (in bar).
Definition at line 90 of file quantity.py.
def src.quantity.Quantity.__init__ | ( | self, | |
engname, | |||
temperature, | |||
pressure, | |||
name = None |
|||
) |
Definition at line 91 of file quantity.py.
def src.quantity.Quantity.__str__ | ( | self | ) |
Definition at line 97 of file quantity.py.
def src.quantity.Quantity.extract | ( | self, | |
engines, | |||
FF, | |||
mvals, | |||
h, | |||
AGrad = True |
|||
) |
Calculate and extract the quantity from MD results.
How this is done depends on the quantity and the engine so this must be implemented in the subclass.
engines : list A list of Engine objects that are requred to calculate the quantity. FF : FF Force field object. mvals : list Mathematical parameter values. h : float Finite difference step size. AGrad : Boolean Switch that turns derivatives on or off; if off, return all zeros.
result : (float, float, np.array) The returned tuple is (Q, Qerr, Qgrad), where Q is the calculated quantity, Qerr is the calculated standard deviation of the quantity, and Qgrad is a M-array with the calculated gradients for the quantity, with M being the number of force field parameters that are being fitted.
Definition at line 128 of file quantity.py.
src.quantity.Quantity.engname |
Definition at line 93 of file quantity.py.
src.quantity.Quantity.name |
Definition at line 92 of file quantity.py.
src.quantity.Quantity.pressure |
Definition at line 95 of file quantity.py.
src.quantity.Quantity.temperature |
Definition at line 94 of file quantity.py.