21#ifndef VOTCA_XTP_CONVERGENCEACC_H
22#define VOTCA_XTP_CONVERGENCEACC_H
132 std::max(
opt_.number_alpha_electrons,
opt_.number_beta_electrons);
164 const Eigen::MatrixXd& X)>;
181 if (
totE_.size() < 2) {
193 if (
totE_.size() < 2) {
221 Eigen::MatrixXd
Iterate(
const Eigen::MatrixXd& dmat, Eigen::MatrixXd&
H,
226 void Levelshift(Eigen::MatrixXd&
H,
const Eigen::MatrixXd& MOs_old)
const;
245 const Eigen::MatrixXd& MOs)
const;
253 const Eigen::MatrixXd& MOs)
const;
262 const Eigen::MatrixXd&
H,
bool HistoryIsAligned() const
Eigen::MatrixXd DensityMatrix(const tools::EigenSystem &MOs) const
void Configure(const ConvergenceAcc::options &opt)
static constexpr double kMeanRatioTolerance
trah::StepOptions trah_options_
tools::EigenSystem trah_pre_MOs_
Index iterations_since_reset_
static constexpr Index kTrailingWindow
static constexpr double kRemovedShift
Eigen::MatrixXd DensityMatrixGroundState_unres(const Eigen::MatrixXd &MOs) const
std::vector< double > error_history_
std::vector< Eigen::MatrixXd > mathist_
OrbitalHessian orbital_hessian_
void setLogger(Logger *log)
Attach the logger used for convergence diagnostics.
Eigen::MatrixXd Iterate(const Eigen::MatrixXd &dmat, Eigen::MatrixXd &H, tools::EigenSystem &MOs, double totE)
double getDIIsError() const
Return the DIIS commutator norm from the latest iteration.
bool getUseMixing() const
static constexpr double kDensityMismatchTolerance
static constexpr Index kAutoStartIteration
tools::EigenSystem SolveFockmatrix(const Eigen::MatrixXd &H) const
Solve the generalized eigenvalue problem for the current Fock matrix.
static constexpr double kMinTrustRadius
Eigen::MatrixXd trah_pre_H_
bool SecondOrderActive() const
Eigen::MatrixXd Sminusahalf
std::vector< double > errhist_
void setOrbitalHessian(const OrbitalHessian &hessian)
void PrintConfigOptions() const
Print the active convergence-acceleration settings to the logger.
void Levelshift(Eigen::MatrixXd &H, const Eigen::MatrixXd &MOs_old) const
Apply a virtual-space level shift in the molecular-orbital basis.
static constexpr double EnergyGradientScale
static constexpr Index kResetCooldown
double getDeltaE() const
Return the total-energy change between the two most recent SCF iterations.
bool SecondOrderStalled() const
static constexpr Index kMaxEnergyResets
Eigen::MatrixXd DensityMatrixGroundState_frac(const tools::EigenSystem &MOs) const
Construct a fractional-occupation density matrix from orbital occupations.
bool SecondOrderAvailable() const
std::vector< double > totE_
static constexpr Index kMaxConsecutiveFailures
trah::Subspace trah_subspace_
Eigen::MatrixXd SecondOrderStep(const Eigen::MatrixXd &dmat, const Eigen::MatrixXd &H, tools::EigenSystem &MOs, double totE)
Index consecutive_failures_
void setOverlap(AOOverlap &S, double etol)
Precompute overlap-dependent quantities used when solving the Fock matrix.
Eigen::MatrixXd removed_projector_
Eigen::MatrixXd DensityMatrixGroundState(const Eigen::MatrixXd &MOs) const
Eigen::MatrixXd best_dmat_
static constexpr double kInitialTrustRadius
std::function< Eigen::MatrixXd( const tools::EigenSystem &MOs, const Eigen::MatrixXd &F, const Eigen::MatrixXd &X)> OrbitalHessian
std::vector< Eigen::MatrixXd > dmatHist_
KSmode
Occupation model used when constructing density matrices.
static constexpr double kEnergyRiseForADIIS
SpinDensity DensityMatrixSpinResolved(const tools::EigenSystem &MOs) const
SpinDensity DensityMatrixGroundState_restricted_open(const Eigen::MatrixXd &MOs) const
Logger is used for thread-safe output of messages.
Provides a means for comparing floating point numbers.
Spin-resolved density matrices returned for open-shell SCF updates.
Eigen::MatrixXd total() const
Return the total density P = P^alpha + P^beta.
Eigen::MatrixXd spin() const
Return the spin density P^alpha - P^beta.
Index number_beta_electrons
Index number_alpha_electrons