votca 2024-dev
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
votca::xtp::BFGSTRM Class Reference

#include <bfgs_trm.h>

Collaboration diagram for votca::xtp::BFGSTRM:
Collaboration graph
[legend]

Public Member Functions

 BFGSTRM (Optimiser_costfunction &costfunction)
 
void setLog (Logger *pLog)
 
void setTrustRadius (double trust_radius)
 
double getTrustRadius () const
 
void setCallbacks (const std::vector< std::function< void()> > &callbacks)
 
void setNumofIterations (Index iterations)
 
void Optimize (const Eigen::VectorXd &initialparameters)
 
bool Success () const
 
std::string getErrorMessage () const
 
double getCost () const
 
Index getIteration () const
 
const Eigen::VectorXd getParameters () const
 
void setInitialHessian (const Eigen::MatrixXd &hessian)
 

Private Member Functions

void UpdateHessian (const Eigen::VectorXd &delta_pos, const Eigen::VectorXd &delta_gradient)
 
double QuadraticEnergy (const Eigen::VectorXd &gradient, const Eigen::VectorXd &delta_pos) const
 
bool AcceptRejectStep (const Eigen::VectorXd &delta_pos, const Eigen::VectorXd &gradient, double energy_delta)
 

Private Attributes

Optimiser_costfunctioncostfunction_
 
std::string errormessage_
 
bool success_ = true
 
Index iteration_ = 0
 
std::vector< std::function< void()> > callbacks_
 
Eigen::MatrixXd hessian_
 
Eigen::VectorXd parameters_
 
double cost_ = std::numeric_limits<double>::max()
 
double trust_radius_ = 0.1
 
Index max_iteration_ = 200
 
LoggerpLog_
 

Detailed Description

Definition at line 35 of file bfgs_trm.h.

Constructor & Destructor Documentation

◆ BFGSTRM()

votca::xtp::BFGSTRM::BFGSTRM ( Optimiser_costfunction costfunction)
inline

Definition at line 37 of file bfgs_trm.h.

Member Function Documentation

◆ AcceptRejectStep()

bool votca::xtp::BFGSTRM::AcceptRejectStep ( const Eigen::VectorXd &  delta_pos,
const Eigen::VectorXd &  gradient,
double  energy_delta 
)
private

Definition at line 84 of file bfgs_trm.cc.

◆ getCost()

double votca::xtp::BFGSTRM::getCost ( ) const
inline

Definition at line 59 of file bfgs_trm.h.

◆ getErrorMessage()

std::string votca::xtp::BFGSTRM::getErrorMessage ( ) const
inline

Definition at line 57 of file bfgs_trm.h.

◆ getIteration()

Index votca::xtp::BFGSTRM::getIteration ( ) const
inline

Definition at line 61 of file bfgs_trm.h.

◆ getParameters()

const Eigen::VectorXd votca::xtp::BFGSTRM::getParameters ( ) const
inline

Definition at line 63 of file bfgs_trm.h.

◆ getTrustRadius()

double votca::xtp::BFGSTRM::getTrustRadius ( ) const
inline

Definition at line 46 of file bfgs_trm.h.

◆ Optimize()

void votca::xtp::BFGSTRM::Optimize ( const Eigen::VectorXd &  initialparameters)

Definition at line 31 of file bfgs_trm.cc.

◆ QuadraticEnergy()

double votca::xtp::BFGSTRM::QuadraticEnergy ( const Eigen::VectorXd &  gradient,
const Eigen::VectorXd &  delta_pos 
) const
private

Definition at line 149 of file bfgs_trm.cc.

◆ setCallbacks()

void votca::xtp::BFGSTRM::setCallbacks ( const std::vector< std::function< void()> > &  callbacks)
inline

Definition at line 48 of file bfgs_trm.h.

◆ setInitialHessian()

void votca::xtp::BFGSTRM::setInitialHessian ( const Eigen::MatrixXd &  hessian)
inline

Definition at line 65 of file bfgs_trm.h.

◆ setLog()

void votca::xtp::BFGSTRM::setLog ( Logger pLog)
inline

Definition at line 42 of file bfgs_trm.h.

◆ setNumofIterations()

void votca::xtp::BFGSTRM::setNumofIterations ( Index  iterations)
inline

Definition at line 52 of file bfgs_trm.h.

◆ setTrustRadius()

void votca::xtp::BFGSTRM::setTrustRadius ( double  trust_radius)
inline

Definition at line 44 of file bfgs_trm.h.

◆ Success()

bool votca::xtp::BFGSTRM::Success ( ) const
inline

Definition at line 56 of file bfgs_trm.h.

◆ UpdateHessian()

void votca::xtp::BFGSTRM::UpdateHessian ( const Eigen::VectorXd &  delta_pos,
const Eigen::VectorXd &  delta_gradient 
)
private

Definition at line 134 of file bfgs_trm.cc.

Member Data Documentation

◆ callbacks_

std::vector<std::function<void()> > votca::xtp::BFGSTRM::callbacks_
private

Definition at line 81 of file bfgs_trm.h.

◆ cost_

double votca::xtp::BFGSTRM::cost_ = std::numeric_limits<double>::max()
private

Definition at line 86 of file bfgs_trm.h.

◆ costfunction_

Optimiser_costfunction& votca::xtp::BFGSTRM::costfunction_
private

Definition at line 68 of file bfgs_trm.h.

◆ errormessage_

std::string votca::xtp::BFGSTRM::errormessage_
private

Definition at line 77 of file bfgs_trm.h.

◆ hessian_

Eigen::MatrixXd votca::xtp::BFGSTRM::hessian_
private

Definition at line 83 of file bfgs_trm.h.

◆ iteration_

Index votca::xtp::BFGSTRM::iteration_ = 0
private

Definition at line 79 of file bfgs_trm.h.

◆ max_iteration_

Index votca::xtp::BFGSTRM::max_iteration_ = 200
private

Definition at line 90 of file bfgs_trm.h.

◆ parameters_

Eigen::VectorXd votca::xtp::BFGSTRM::parameters_
private

Definition at line 84 of file bfgs_trm.h.

◆ pLog_

Logger* votca::xtp::BFGSTRM::pLog_
private

Definition at line 92 of file bfgs_trm.h.

◆ success_

bool votca::xtp::BFGSTRM::success_ = true
private

Definition at line 78 of file bfgs_trm.h.

◆ trust_radius_

double votca::xtp::BFGSTRM::trust_radius_ = 0.1
private

Definition at line 88 of file bfgs_trm.h.


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