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

Base class for thermodynamical quantity used for fitting. More...

Inheritance diagram for src.quantity.Quantity:
[legend]
Collaboration diagram for src.quantity.Quantity:
[legend]

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
 

Detailed Description

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.

Data attributes

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.

Constructor & Destructor Documentation

◆ __init__()

def src.quantity.Quantity.__init__ (   self,
  engname,
  temperature,
  pressure,
  name = None 
)

Definition at line 91 of file quantity.py.

Member Function Documentation

◆ __str__()

def src.quantity.Quantity.__str__ (   self)

Definition at line 97 of file quantity.py.

◆ extract()

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.

Parameters

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.

Returns

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.

Member Data Documentation

◆ engname

src.quantity.Quantity.engname

Definition at line 93 of file quantity.py.

◆ name

src.quantity.Quantity.name

Definition at line 92 of file quantity.py.

◆ pressure

src.quantity.Quantity.pressure

Definition at line 95 of file quantity.py.

◆ temperature

src.quantity.Quantity.temperature

Definition at line 94 of file quantity.py.


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