RDKit
Open-source cheminformatics and machine learning.
BFGSOpt.h File Reference
#include <math.h>
#include <RDGeneral/Invariant.h>
#include <cstring>
#include <algorithm>

Go to the source code of this file.

Namespaces

 BFGSOpt
 

Macros

#define CLEANUP()
 

Functions

template<typename EnergyFunctor >
void BFGSOpt::linearSearch (unsigned int dim, double *oldPt, double oldVal, double *grad, double *dir, double *newPt, double &newVal, EnergyFunctor func, double maxStep, int &resCode)
 Do a Quasi-Newton minimization along a line. More...
 
template<typename EnergyFunctor , typename GradientFunctor >
int BFGSOpt::minimize (unsigned int dim, double *pos, double gradTol, unsigned int &numIters, double &funcVal, EnergyFunctor func, GradientFunctor gradFunc, double funcTol=TOLX, unsigned int maxIts=MAXITS)
 Do a BFGS minimization of a function. More...
 

Variables

const double BFGSOpt::FUNCTOL =1e-4
 Default tolerance for function convergence in the minimizer. More...
 
const double BFGSOpt::MOVETOL =1e-7
 Default tolerance for x changes in the minimizer. More...
 
const int BFGSOpt::MAXITS =200
 Default maximum number of iterations. More...
 
const double BFGSOpt::EPS =3e-8
 Default gradient tolerance in the minimizer. More...
 
const double BFGSOpt::TOLX =4.*EPS
 Default direction vector tolerance in the minimizer. More...
 
const double BFGSOpt::MAXSTEP =100.0
 Default maximim step size in the minimizer. More...
 

Macro Definition Documentation

#define CLEANUP ( )
Value:
{ delete [] grad; delete [] dGrad; delete [] hessDGrad;\
delete [] newPos; delete [] xi; delete [] invHessian; }

Definition at line 147 of file BFGSOpt.h.

Referenced by BFGSOpt::minimize().