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

A target for fitting general experimental data sets. More...

Inheritance diagram for src.thermo.Thermo:
[legend]
Collaboration diagram for src.thermo.Thermo:
[legend]

Public Member Functions

def __init__ (self, options, tgt_opts, forcefield)
 
def retrieve (self, dp)
 Retrieve the molecular dynamics (MD) results and store the calculated quantities in the Point object dp. More...
 
def submit_jobs (self, mvals, AGrad=True, AHess=True)
 This routine is called by Objective.stage() and will run before "get". More...
 
def indicate (self)
 Shows optimization state. More...
 
def objective_term (self, quantity)
 Calculates the contribution to the objective function (the term) for a given quantity. More...
 
def get (self, mvals, AGrad=True, AHess=True)
 Return the contribution to the total objective function. More...
 

Public Attributes

 loop_over_snapshots
 Initialize base class. More...
 
 simpfx
 
 points
 
 denoms
 
 weights
 
 Xp
 
 Wp
 
 Pp
 
 Gp
 
 Objective
 

Detailed Description

A target for fitting general experimental data sets.

The experimental data is described in a .txt file and is handled with a Quantity subclass.

Definition at line 78 of file thermo.py.

Constructor & Destructor Documentation

◆ __init__()

def src.thermo.Thermo.__init__ (   self,
  options,
  tgt_opts,
  forcefield 
)

Definition at line 79 of file thermo.py.

Here is the call graph for this function:

Member Function Documentation

◆ get()

def src.thermo.Thermo.get (   self,
  mvals,
  AGrad = True,
  AHess = True 
)

Return the contribution to the total objective function.

This is a weighted average of the calculated quantities.

Parameters

mvals : list Mathematical parameter values. AGrad : Boolean Switch to turn on analytic gradient. AHess : Boolean Switch to turn on analytic Hessian.

Returns

Answer : dict Contribution to the objective function. Answer is a dict with keys X for the objective function, G for its gradient and H for its Hessian.

Definition at line 417 of file thermo.py.

Here is the call graph for this function:

◆ indicate()

def src.thermo.Thermo.indicate (   self)

Shows optimization state.

Definition at line 276 of file thermo.py.

Here is the call graph for this function:

◆ objective_term()

def src.thermo.Thermo.objective_term (   self,
  quantity 
)

Calculates the contribution to the objective function (the term) for a given quantity.

Parameters

quantity : string Calculate the objective term for this quantity.

Returns

term : dict term is a dict with keys X, G, H and info. The values of these keys are the objective term itself (X), its gradient (G), its Hessian (H), and an OrderedDict with print information on individiual data points (info).

Definition at line 329 of file thermo.py.

Here is the call graph for this function:

◆ retrieve()

def src.thermo.Thermo.retrieve (   self,
  dp 
)

Retrieve the molecular dynamics (MD) results and store the calculated quantities in the Point object dp.

Parameters

dp : Point Store the calculated quantities in this point.

Returns

Nothing

Definition at line 197 of file thermo.py.

Here is the call graph for this function:

◆ submit_jobs()

def src.thermo.Thermo.submit_jobs (   self,
  mvals,
  AGrad = True,
  AHess = True 
)

This routine is called by Objective.stage() and will run before "get".

It submits the jobs and the stage() function will wait for jobs to complete.

Parameters

mvals : list Mathematical parameter values. AGrad : Boolean Switch to turn on analytic gradient. AHess : Boolean Switch to turn on analytic Hessian.

Returns

Nothing.

Definition at line 236 of file thermo.py.

Here is the call graph for this function:

Member Data Documentation

◆ denoms

src.thermo.Thermo.denoms

Definition at line 104 of file thermo.py.

◆ Gp

src.thermo.Thermo.Gp

Definition at line 474 of file thermo.py.

◆ loop_over_snapshots

src.thermo.Thermo.loop_over_snapshots

Initialize base class.

Parameters Reference experimental data Variables LPW 2018-02-11: This is set to True if the target calculates a single-point property over several existing snapshots.

Definition at line 98 of file thermo.py.

◆ Objective

src.thermo.Thermo.Objective

Definition at line 476 of file thermo.py.

◆ points

src.thermo.Thermo.points

Definition at line 102 of file thermo.py.

◆ Pp

src.thermo.Thermo.Pp

Definition at line 471 of file thermo.py.

◆ simpfx

src.thermo.Thermo.simpfx

Definition at line 100 of file thermo.py.

◆ weights

src.thermo.Thermo.weights

Definition at line 106 of file thermo.py.

◆ Wp

src.thermo.Thermo.Wp

Definition at line 469 of file thermo.py.

◆ Xp

src.thermo.Thermo.Xp

Definition at line 468 of file thermo.py.


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