ForceBalance API  1.3
Automated optimization of force fields and empirical potentials
List of all members | Classes | Public Member Functions
src.evaluator_io.Evaluator_SMIRNOFF Class Reference

A custom optimisation target which employs the openff-evaluator package to rapidly estimate a collection of condensed phase physical properties at each optimisation epoch. More...

Inheritance diagram for src.evaluator_io.Evaluator_SMIRNOFF:
[legend]
Collaboration diagram for src.evaluator_io.Evaluator_SMIRNOFF:
[legend]

Classes

class  OptionsFile
 Represents the set of options that a Evaluator_SMIRNOFF target will be run with. More...
 

Public Member Functions

def __init__ (self, options, tgt_opts, forcefield)
 
def submit_jobs (self, mvals, AGrad=True, AHess=True)
 Submit jobs for evaluating the objective function. More...
 
def wq_complete (self)
 Check if all jobs are finished This function should have a sleep in it if not finished. More...
 
def get (self, mvals, AGrad=True, AHess=True)
 Get the objective function value, gradient, and hessian. More...
 
def indicate (self)
 print information into the output file about the last objective function evaluated This function should be called after get() More...
 

Detailed Description

A custom optimisation target which employs the openff-evaluator package to rapidly estimate a collection of condensed phase physical properties at each optimisation epoch.

Definition at line 46 of file evaluator_io.py.

Constructor & Destructor Documentation

◆ __init__()

def src.evaluator_io.Evaluator_SMIRNOFF.__init__ (   self,
  options,
  tgt_opts,
  forcefield 
)

Definition at line 172 of file evaluator_io.py.

Here is the call graph for this function:

Member Function Documentation

◆ get()

def src.evaluator_io.Evaluator_SMIRNOFF.get (   self,
  mvals,
  AGrad = True,
  AHess = True 
)

Get the objective function value, gradient, and hessian.

Parameters

mvals: np.ndarray mvals array containing the math values of the parameters AGrad: bool Flag for computing gradients of not AHess: bool Flag for computing hessian or not

Returns

Answer: dict Answer = {'X':obj_value, 'G':obj_grad, 'H':obj_hess} obj_value: float obj_grad: np.ndarray of shape (n_param, ) obj_hess: np.ndarray of shape (n_param, n_param)

Notes

  1. obj_grad is all zero when AGrad == False
  2. obj_hess is all zero when AHess == False or AGrad == False, because the hessian estimate depends on gradients

Definition at line 721 of file evaluator_io.py.

Here is the call graph for this function:

◆ indicate()

def src.evaluator_io.Evaluator_SMIRNOFF.indicate (   self)

print information into the output file about the last objective function evaluated This function should be called after get()

Definition at line 821 of file evaluator_io.py.

Here is the call graph for this function:

◆ submit_jobs()

def src.evaluator_io.Evaluator_SMIRNOFF.submit_jobs (   self,
  mvals,
  AGrad = True,
  AHess = True 
)

Submit jobs for evaluating the objective function.

Parameters

mvals: np.ndarray mvals array containing the math values of the parameters AGrad: bool Flag for computing gradients of not AHess: bool Flag for computing hessian or not

Notes

  1. This function is called before wq_complete() and get().
  2. This function should not block.

Definition at line 437 of file evaluator_io.py.

Here is the call graph for this function:

◆ wq_complete()

def src.evaluator_io.Evaluator_SMIRNOFF.wq_complete (   self)

Check if all jobs are finished This function should have a sleep in it if not finished.

Returns

finished: bool True if all jobs are finished, False if not

Definition at line 685 of file evaluator_io.py.


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