ForceBalance API  1.3
Automated optimization of force fields and empirical potentials
Classes | Functions | Variables
src.opt_geo_target Namespace Reference

Classes

class  OptGeoTarget
 Subclass of Target for fitting MM optimized geometries to QM optimized geometries. More...
 

Functions

def periodic_diff (a, b, v_periodic)
 convenient function for computing the minimum difference in periodic coordinates

Parameters

a: np.ndarray or float Reference values in a numpy array b: np.ndarray or float Target values in a numpy arrary v_periodic: float > 0 Value of the periodic boundary More...
 
def compute_rmsd (ref, tar, v_periodic=None)
 Compute the RMSD between two arrays, supporting periodic difference. More...
 

Variables

 logger = getLogger(__name__)
 
int RADIAN_2_DEGREE = 180 / np.pi
 

Function Documentation

◆ compute_rmsd()

def src.opt_geo_target.compute_rmsd (   ref,
  tar,
  v_periodic = None 
)

Compute the RMSD between two arrays, supporting periodic difference.

Definition at line 61 of file opt_geo_target.py.

Here is the call graph for this function:

◆ periodic_diff()

def src.opt_geo_target.periodic_diff (   a,
  b,
  v_periodic 
)

convenient function for computing the minimum difference in periodic coordinates

Parameters

a: np.ndarray or float Reference values in a numpy array b: np.ndarray or float Target values in a numpy arrary v_periodic: float > 0 Value of the periodic boundary

Returns

diff: np.ndarray The array of same shape containing the difference between a and b All return values are in range [-v_periodic/2, v_periodic/2), "( )" means exclusive, "[ ]" means inclusive

Examples

periodic_diff(0.0, 2.1, 2.0) => -0.1 periodic_diff(0.0, 1.9, 2.0) => 0.1 periodic_diff(0.0, 1.0, 2.0) => -1.0 periodic_diff(1.0, 0.0, 2.0) => -1.0 periodic_diff(1.0, 0.1, 2.0) => -0.9 periodic_diff(1.0, 10.1, 2.0) => 0.9 periodic_diff(1.0, 9.9, 2.0) => -0.9

Definition at line 52 of file opt_geo_target.py.

Variable Documentation

◆ logger

src.opt_geo_target.logger = getLogger(__name__)

Definition at line 20 of file opt_geo_target.py.

◆ RADIAN_2_DEGREE

int src.opt_geo_target.RADIAN_2_DEGREE = 180 / np.pi

Definition at line 22 of file opt_geo_target.py.