occ
Loading...
Searching...
No Matches
occ::opt Namespace Reference

Classes

class  AngleCoordinate
 
struct  BernyOptimizer
 Berny geometry optimizer implementing the Berny algorithm. More...
 
class  BondCoordinate
 
struct  ConvergenceCriteria
 
struct  ConvergenceInfo
 
class  DihedralCoordinate
 
class  InternalCoordinates
 
struct  OptimizationState
 
struct  OptPoint
 
struct  SpeciesData
 

Functions

Mat3N transform_step_to_cartesian (const Vec &internal_step, const InternalCoordinates &coords, const Mat3N &positions, const Mat &B_inv)
 
std::pair< Vec, Mat3Nupdate_geometry (const Vec &current_q, const Vec &internal_step, const InternalCoordinates &coords, const Mat3N &positions, const Mat &B_inv)
 
std::pair< double, double > fit_cubic (double y0, double y1, double g0, double g1)
 Perform cubic polynomial fitting for linear search.
 
std::pair< double, double > fit_quartic (double y0, double y1, double g0, double g1)
 Perform quartic polynomial fitting for linear search.
 
std::pair< double, double > linear_search (double E0, double E1, double g0, double g1)
 Perform linear search between two points using polynomial interpolation.
 
ConvergenceInfo check_convergence (const Vec &gradient, const Vec &step, double energy_change, const ConvergenceCriteria &criteria)
 
ConvergenceInfo check_convergence (const Vec &gradient, const Vec &step, const ConvergenceCriteria &criteria)
 
Mat pseudoinverse (Eigen::Ref< const Mat > A)
 
float get_covalent_radius (int atomic_number)
 
float get_vdw_radius (int atomic_number)
 

Variables

constexpr size_t SPECIES_COUNT = sizeof(SPECIES_DATA) / sizeof(SpeciesData)
 

Function Documentation

◆ check_convergence() [1/2]

ConvergenceInfo occ::opt::check_convergence ( const Vec gradient,
const Vec step,
const ConvergenceCriteria criteria 
)
inline

◆ check_convergence() [2/2]

ConvergenceInfo occ::opt::check_convergence ( const Vec gradient,
const Vec step,
double  energy_change,
const ConvergenceCriteria criteria 
)
inline

◆ fit_cubic()

std::pair< double, double > occ::opt::fit_cubic ( double  y0,
double  y1,
double  g0,
double  g1 
)

Perform cubic polynomial fitting for linear search.

Fits a cubic polynomial through two points with known function values and derivatives, then finds the minimum of the polynomial.

Parameters
y0Function value at x=0
y1Function value at x=1
g0Derivative at x=0
g1Derivative at x=1
Returns
Pair of (x_min, y_min) where the cubic has its minimum, or (NaN, NaN) if no valid minimum exists in [0,1]

◆ fit_quartic()

std::pair< double, double > occ::opt::fit_quartic ( double  y0,
double  y1,
double  g0,
double  g1 
)

Perform quartic polynomial fitting for linear search.

Fits a quartic polynomial through two points with known function values and derivatives, then finds the minimum of the polynomial.

Parameters
y0Function value at x=0
y1Function value at x=1
g0Derivative at x=0
g1Derivative at x=1
Returns
Pair of (x_min, y_min) where the quartic has its minimum, or (NaN, NaN) if no valid minimum exists

◆ get_covalent_radius()

float occ::opt::get_covalent_radius ( int  atomic_number)
inline

◆ get_vdw_radius()

float occ::opt::get_vdw_radius ( int  atomic_number)
inline

◆ linear_search()

std::pair< double, double > occ::opt::linear_search ( double  E0,
double  E1,
double  g0,
double  g1 
)

Perform linear search between two points using polynomial interpolation.

This implements a linear search algorithm, which attempts quartic interpolation first, falls back to cubic if quartic fails, and finally uses simple selection if both polynomial fits fail.

Parameters
E0Energy at current point
E1Energy at best point
g0Directional derivative at current point
g1Directional derivative at best point
Returns
Pair of (t, E) where t is the interpolation parameter [0,1] and E is the interpolated energy

◆ pseudoinverse()

Mat occ::opt::pseudoinverse ( Eigen::Ref< const Mat A)

◆ transform_step_to_cartesian()

Mat3N occ::opt::transform_step_to_cartesian ( const Vec internal_step,
const InternalCoordinates coords,
const Mat3N positions,
const Mat B_inv 
)

◆ update_geometry()

std::pair< Vec, Mat3N > occ::opt::update_geometry ( const Vec current_q,
const Vec internal_step,
const InternalCoordinates coords,
const Mat3N positions,
const Mat B_inv 
)

Variable Documentation

◆ SPECIES_COUNT

constexpr size_t occ::opt::SPECIES_COUNT = sizeof(SPECIES_DATA) / sizeof(SpeciesData)
constexpr