|
votca 2026-dev
|
Electronic ground-state via Density-Functional Theory. More...
#include <dftengine.h>

Classes | |
| struct | BSEGradientInput |
| struct | BSEGradientResult |
| struct | SpinDensity |
| struct | CDFTConstraintSpec |
Public Member Functions | |
| void | Initialize (tools::Property &options) |
| Read DFT, grid, and SCF settings from the user options tree. | |
| void | setLogger (Logger *pLog) |
| Attach the logger used for SCF progress and diagnostics. | |
| void | setExternalcharges (std::vector< std::unique_ptr< StaticSite > > *externalsites) |
| void | setEwaldgrid (const Vxc_Grid &ewaldgrid) |
| void | setEwaldNuclearEnergy (double energy) |
| void | setWarmStart (bool warm_start) |
| void | setSetupCache (DFTSetupCache *cache) |
| void | setSCFToleranceFloor (double energy, double error) |
| void | ReturnSetupCache () |
| bool | Evaluate (Orbitals &orb) |
| bool | RunCDFT (Orbitals &orb, HirshfeldPartition::Constraint &constraint) |
| bool | EvaluateActiveRegion (Orbitals &orb) |
| bool | EvaluateTruncatedActiveRegion (Orbitals &trunc_orb) |
| std::string | getDFTBasisName () const |
| Return the configured AO basis-set name for the DFT calculation. | |
| std::vector< Eigen::MatrixXd > | StaticResponse (const Orbitals &orb, const std::vector< Eigen::MatrixXd > &perturbations, double tolerance=1e-7, Index max_iterations=100) |
| BSEGradientResult | BSEExcitationGradient (const Orbitals &orb, const BSEGradientInput &input) |
| const std::string & | getGridName () const |
| Name of the integration grid of the SCF (xtpdft.integration_grid). | |
| void | setExternalPotentialMatrix (const Eigen::MatrixXd &v) |
| std::vector< HirshfeldPartition::AtomicReference > | HirshfeldReferences (const QMMolecule &mol) const |
| bool | IsRestrictedOpenShell () const |
| Index | NumberOfRestrictedOccupiedOrbitals () const |
| SpinDensity | BuildSpinDensity (const tools::EigenSystem &MOs) const |
| ConvergenceAcc::options | BuildConvergenceOptions () const |
| void | setForceUKSPath (bool force) |
Static Public Member Functions | |
| static BSEGradientInput | BSEGradientInputFromOrbitals (const Orbitals &orb, bool singlet, Index index) |
| static BSEGradientInput | QPGradientInputFromOrbitals (const Orbitals &orb, const std::vector< Index > &levels) |
Private Member Functions | |
| void | Prepare (Orbitals &orb, Index numofelectrons=-1) |
| Vxc_Potential< Vxc_Grid > | SetupVxc (const QMMolecule &mol) |
| UKSConvergenceAcc::SpinFock | BuildUKSFock (const Eigen::MatrixXd &H0, const Vxc_Potential< Vxc_Grid > &vxcpotential, const Eigen::MatrixXd &alpha_new, const Eigen::MatrixXd &beta_new) |
| Eigen::MatrixXd | RKSOrbitalHessian (const Vxc_Potential< Vxc_Grid > &vxc, const tools::EigenSystem &mos, const Eigen::MatrixXd &F, const Eigen::MatrixXd &X) |
| Eigen::MatrixXd | UKSOrbitalHessian (const Vxc_Potential< Vxc_Grid > &vxc, const tools::EigenSystem &mos_alpha, const tools::EigenSystem &mos_beta, const Eigen::MatrixXd &F_alpha, const Eigen::MatrixXd &F_beta, const Eigen::MatrixXd &X) |
| std::vector< Eigen::MatrixXd > | CoupledResponse (const Vxc_Potential< Vxc_Grid > &vxc, const Eigen::MatrixXd &P0, const Eigen::MatrixXd &C_occ, const Eigen::MatrixXd &C_virt, const std::vector< Eigen::MatrixXd > &U, const Vxc_Potential< Vxc_Grid >::FXCKernel *fxc_kernel=nullptr) |
| Eigen::MatrixXd | OrthogonalizeGuess (const Eigen::MatrixXd &GuessMOs) const |
| Orthonormalize an initial MO guess with respect to the AO overlap matrix. | |
| void | PrintMOs (const Eigen::VectorXd &MOEnergies, Log::Level level) |
| Print a one-spin list of orbital energies and occupations to the logger. | |
| void | PrintMOsUKS (const Eigen::VectorXd &alpha_energies, const Eigen::VectorXd &beta_energies, Log::Level level) const |
| Print separate alpha and beta orbital energies for a UKS calculation. | |
| void | CalcElDipole (const Orbitals &orb) const |
| Evaluate and print the electronic dipole moment from the final density. | |
| std::array< Eigen::MatrixXd, 2 > | CalcERIs_EXX (const Eigen::MatrixXd &MOCoeff, const Eigen::MatrixXd &Dmat, double error) const |
| Eigen::MatrixXd | CalcERIs (const Eigen::MatrixXd &Dmat, double error) const |
| Build the Coulomb matrix contribution from the current density matrix. | |
| void | ComputePolarizability (Orbitals &orb) |
| bool | EvaluateAndTime (Orbitals &orb) |
| Evaluate() without the timing report. | |
| void | ReportDimensionsAndMemory () const |
| Basis dimensions and the memory of the large intermediates. | |
| void | ConfigOrbfile (Orbitals &orb) |
| Propagate basis-set, XC, and metadata settings into the orbital container. | |
| void | SetupInvariantMatrices () |
| Precompute AO matrices that remain unchanged throughout the SCF procedure. | |
| Eigen::MatrixXd | McWeenyPurification (Eigen::MatrixXd &Dmat_in, AOOverlap &overlap) |
| Mat_p_Energy | SetupH0 (const QMMolecule &mol) const |
| Assemble the one-electron core Hamiltonian for the current molecule. | |
| Mat_p_Energy | IntegrateExternalMultipoles (const QMMolecule &mol, const std::vector< std::unique_ptr< StaticSite > > &multipoles) const |
| Mat_p_Energy | IntegrateExternalDensity (const QMMolecule &mol, const Orbitals &extdensity) const |
| Eigen::MatrixXd | IntegrateExternalField (const QMMolecule &mol) const |
| Integrate a homogeneous external electric field into the AO basis. | |
| tools::EigenSystem | IndependentElectronGuess (const Mat_p_Energy &H0) const |
| Generate an initial guess by diagonalizing the core Hamiltonian only. | |
| tools::EigenSystem | ModelPotentialGuess (const Mat_p_Energy &H0, const QMMolecule &mol, const Vxc_Potential< Vxc_Grid > &vxcpotential) const |
| Eigen::MatrixXd | AtomicGuess (const QMMolecule &mol) const |
| Build an atomic-density based initial guess in the AO basis. | |
| Eigen::VectorXd | BuildEHTOrbitalEnergies (const QMMolecule &mol) const |
| Build orbital energies used in the extended-Hückel starting guess. | |
| Eigen::MatrixXd | BuildEHTHamiltonian (const QMMolecule &mol) const |
| Build the extended-Hückel Hamiltonian for the current molecule. | |
| tools::EigenSystem | ExtendedHuckelGuess (const QMMolecule &mol) const |
| tools::EigenSystem | ExtendedHuckelDFTGuess (const Mat_p_Energy &H0, const QMMolecule &mol, const Vxc_Potential< Vxc_Grid > &vxcpotential) const |
| Orbitals | BuildDimerGuessFromMonomerFiles (const QMMolecule &dimer_mol) const |
| Eigen::MatrixXd | RunAtomicDFT_unrestricted (const QMAtom &uniqueAtom, bool use_hunds_rule_occupation=false) const |
| std::map< std::string, Eigen::MatrixXd > | ComputeHirshfeldReferenceDensities (const QMMolecule &mol) const |
| HirshfeldPartition::Constraint | BuildCDFTConstraint (const QMMolecule &mol, const CDFTConstraintSpec &spec) const |
| double | NuclearRepulsion (const QMMolecule &mol) const |
| Compute the classical nucleus-nucleus repulsion energy. | |
| double | ExternalRepulsion (const QMMolecule &mol, const std::vector< std::unique_ptr< StaticSite > > &multipoles) const |
| Eigen::MatrixXd | SphericalAverageShells (const Eigen::MatrixXd &dmat, const AOBasis &dftbasis) const |
| void | TruncateBasis (Orbitals &orb, std::vector< Index > &activeatoms, Mat_p_Energy &H0, Eigen::MatrixXd InitialActiveDensityMatrix, Eigen::MatrixXd v_embedding, Eigen::MatrixXd InitialInactiveMOs) |
| void | TruncMOsFullBasis (Orbitals &orb, std::vector< Index > activeatoms, std::vector< Index > numfuncpatom) |
| Eigen::MatrixXd | InsertZeroCols (Eigen::MatrixXd MOsMatrix, Index startidx, Index numofzerocols) |
| Eigen::MatrixXd | InsertZeroRows (Eigen::MatrixXd MOsMatrix, Index startidx, Index numofzerorows) |
| Insert zero rows into an MO coefficient matrix at the requested position. | |
| bool | EvaluateClosedShell (Orbitals &orb, const Mat_p_Energy &H0, const Vxc_Potential< Vxc_Grid > &vxcpotential) |
| Run the restricted closed-shell SCF loop and store the converged result. | |
| bool | EvaluateUKS (Orbitals &orb, const Mat_p_Energy &H0, const Vxc_Potential< Vxc_Grid > &vxcpotential) |
| void | ComputeAndStoreForces (Orbitals &orb, const Eigen::MatrixXd &Dmat, const Vxc_Potential< Vxc_Grid > &vxcpotential) const |
| Eigen::MatrixXd | ComputeOverlapPulayGradientUKS (const QMMolecule &mol, const tools::EigenSystem &MOs_alpha, const tools::EigenSystem &MOs_beta) const |
| Eigen::MatrixXd | ComputeNonXCGradientUKS (const QMMolecule &mol, const UKSConvergenceAcc::SpinDensity &Dspin, const tools::EigenSystem &MOs_alpha, const tools::EigenSystem &MOs_beta) const |
| void | ComputeAndStoreForcesUKS (Orbitals &orb, const UKSConvergenceAcc::SpinDensity &Dspin, const tools::EigenSystem &MOs_alpha, const tools::EigenSystem &MOs_beta, const Vxc_Potential< Vxc_Grid > &vxcpotential) const |
| std::string | RISetupKey () const |
| bool | UsableAsWarmStart (const Orbitals &orb, const std::string &previous_basis, std::string &reason) const |
Friends | |
| class | DFTEngineTestAccess |
Electronic ground-state via Density-Functional Theory.
This class assembles the one- and two-electron matrix contributions needed for self-consistent Kohn-Sham calculations in a Gaussian AO basis. The SCF machinery supports restricted closed-shell calculations and unrestricted spin-polarized calculations, while reusing the same integral and numerical XC infrastructure whenever possible.
Definition at line 89 of file dftengine.h.
|
private |
Build an atomic-density based initial guess in the AO basis.
Definition at line 2636 of file dftengine.cc.
| DFTEngine::BSEGradientResult votca::xtp::DFTEngine::BSEExcitationGradient | ( | const Orbitals & | orb, |
| const BSEGradientInput & | input ) |
Analytic nuclear gradient of a (TDA or full) BSE excitation energy with static RPA screening and fixed QP corrections, for the closed-shell RI ground state in orb (same basis, functional and grid as this engine): the Lagrangian of the excitation energy with the KS orbital response (Z-vector), the response of the screening, and the integral derivatives (derivation in bsegradient.cc).
Definition at line 130 of file bsegradient.cc.
|
static |
The input of BSEExcitationGradient for BSE state index (0-based) of a GW-BSE run stored in orb: windows, amplitudes, the diagonal of the QP Hamiltonian (RPA input energies outside the QP window) and the RPA input energies. Throws for setups the gradient does not cover (off-diagonal Hqp, QSGW, open shells).
Definition at line 1265 of file bsegradient.cc.
|
private |
Build the HirshfeldPartition::Constraint for spec on mol. The weight matrix is the sum of BuildWeightMatrix over spec.atom_indices (Hirshfeld weights are additive, w_fragment(r) = sum_{i in fragment} w_i(r)). The absolute target population is sum_{i in fragment} Z_i - spec.target_charge.
Definition at line 3095 of file dftengine.cc.
| ConvergenceAcc::options votca::xtp::DFTEngine::BuildConvergenceOptions | ( | ) | const |
Assemble SCF acceleration settings consistent with the current spin treatment and occupation model.
|
private |
Build a dimer guess (separate alpha and beta MOs) from two converged monomer .orb files (dimer_guess_orbA_name_/dimer_guess_orbB_name_), combined via Orbitals::PrepareDimerGuessMixedSpin.
Checks each monomer against dimer_mol: (1) its element sequence must match the first N_A (monomer A) or the remaining (monomer B) atoms; (2) all intra-monomer interatomic distances must match those of the corresponding dimer atoms to a tight tolerance. Absolute positions are not compared, since a monomer may be translated/rotated in the dimer.
Definition at line 3724 of file dftengine.cc.
|
private |
Build the extended-Hückel Hamiltonian for the current molecule.
Definition at line 3667 of file dftengine.cc.
|
private |
Build orbital energies used in the extended-Hückel starting guess.
Definition at line 3639 of file dftengine.cc.
| SpinDensity votca::xtp::DFTEngine::BuildSpinDensity | ( | const tools::EigenSystem & | MOs | ) | const |
Construct alpha and beta density matrices from a shared MO coefficient matrix and the current occupation metadata.
|
private |
C_v^T G[dP_k] C_o for dP_k = 2 (C_v U_k C_o^T + C_o U_k^T C_v^T), with G the closed-shell response of J, 0.5 a_x K and V_xc (f_xc at the density P0): the coupling part of the orbital Hessian, shared by StaticResponse and the second-order SCF.
Definition at line 2700 of file dftengine.cc.
|
private |
Evaluate and print the electronic dipole moment from the final density.
Definition at line 373 of file dftengine.cc.
|
private |
Build the Coulomb matrix contribution from the current density matrix.
Definition at line 739 of file dftengine.cc.
|
private |
Build Coulomb and exact-exchange matrix contributions from the current MO coefficients and density.
Definition at line 713 of file dftengine.cc.
|
private |
Assemble the total ground-state nuclear gradient (one-electron [kinetic + nuclear attraction] + overlap "Pulay force" + nuclear repulsion + RI-J Coulomb + RI-K exact exchange [hybrid functionals]
The overlap Pulay term, -tr(W dS/dR) with the energy-weighted density W, arises because C^T S C = I depends on the geometry through the basis functions; it is distinct from DFTGradient::PulayGradient, the basis-function term of the XC integral.
The exchange gradient uses the asymmetric V^-1 RI fit, which gives the same exchange energy as the symmetric V^-1/2 fit in ERIs::CalculateEXX_mos (exact identity for positive-definite V), so no derivative of V^-1/2 is needed.
Requires RI (auxbasis_name_ non-empty); RIJGradient/RIKGradient have no 4-centre implementation. Only called if compute_forces_ is set (<xtpdft><compute_forces>true</compute_forces></xtpdft>, default false), since it adds non-trivial cost to every SCF.
Definition at line 397 of file dftengine.cc.
|
private |
UKS (open-shell) analog of ComputeAndStoreForces; stores the force via Orbitals::setForces().
Terms: nuclear repulsion; one-electron [kinetic + nuclear attraction] and RI-J with D_total = D_alpha + D_beta; overlap Pulay with W = W_alpha + W_beta (spin densities are not pre-doubled); RI-K for hybrids as 0.5 * ScaHFX_ * [RIKGradient(C_alpha_occ) + RIKGradient(C_beta_occ)], the 0.5 because UKS exchange uses ERIs::CalculateEXX_dmat(P) = 0.5 * ERIs::CalculateEXX_mos(C) for P = C C^T; and XC (PulayGradientUKS + GridWeightGradientUKS, LDA and GGA, including the sigma_aa/sigma_ab/sigma_bb terms), checked against finite differences of IntegrateVXCSpin.
Definition at line 626 of file dftengine.cc.
|
private |
Isolated-atom reference density (in the atom's own basis) for each unique element in mol, keyed by element symbol: the promolecular densities for Hirshfeld-based CDFT. Same structure as AtomicGuess, but with use_hunds_rule_occupation=true, and the per-element densities are returned instead of being assembled into a molecular AO matrix, since Hirshfeld evaluates them in real space on each atom's position.
Definition at line 2678 of file dftengine.cc.
|
private |
Non-XC part of the UKS gradient (nuclear repulsion, one-electron, overlap Pulay, RI-J, RI-K), see ComputeAndStoreForcesUKS. Returns dE/dR (natoms x 3), not the force; the sign flip is done on storage.
Definition at line 583 of file dftengine.cc.
|
private |
UKS overlap Pulay gradient with W = W_alpha + W_beta (no factor of 2, unlike RKS). Separate method because it cannot be checked against a fixed-C finite difference: it accounts for the implicit R-dependence of C through orthonormality and is only valid at an SCF stationary point. test_dftengine_private.cc checks it against the RKS formula for alpha == beta.
Definition at line 550 of file dftengine.cc.
|
private |
Static polarizability of the converged closed-shell state in orb (StaticResponse with the dipole operators), stored in orb.
Definition at line 844 of file dftengine.cc.
|
private |
Propagate basis-set, XC, and metadata settings into the orbital container.
Definition at line 3153 of file dftengine.cc.
|
private |
Definition at line 2876 of file dftengine.cc.
| bool votca::xtp::DFTEngine::Evaluate | ( | Orbitals & | orb | ) |
Run a full ground-state DFT calculation and store the results in the orbital container.
Definition at line 823 of file dftengine.cc.
| bool votca::xtp::DFTEngine::EvaluateActiveRegion | ( | Orbitals & | orb | ) |
Run an embedded active-region DFT calculation for the supplied orbital container.
Definition at line 65 of file embeddingengine.cc.
|
private |
Evaluate() without the timing report.
Definition at line 876 of file dftengine.cc.
|
private |
Run the restricted closed-shell SCF loop and store the converged result.
Definition at line 1146 of file dftengine.cc.
| bool votca::xtp::DFTEngine::EvaluateTruncatedActiveRegion | ( | Orbitals & | trunc_orb | ) |
Run the truncated active-region workflow used for reduced embedded calculations.
Definition at line 388 of file embeddingengine.cc.
|
private |
Run the unrestricted Kohn-Sham SCF loop and store alpha and beta orbitals separately.
Definition at line 1391 of file dftengine.cc.
|
private |
Generate an extended-Hückel based guess refined with the one-electron DFT Hamiltonian.
Definition at line 3700 of file dftengine.cc.
|
private |
Generate an initial guess by diagonalizing the extended-Hückel Hamiltonian.
Definition at line 3687 of file dftengine.cc.
|
private |
Compute the classical interaction energy between nuclei and external multipoles.
Definition at line 3416 of file dftengine.cc.
|
inline |
Return the configured AO basis-set name for the DFT calculation.
Definition at line 162 of file dftengine.h.
|
inline |
Name of the integration grid of the SCF (xtpdft.integration_grid).
Definition at line 265 of file dftengine.h.
| std::vector< HirshfeldPartition::AtomicReference > votca::xtp::DFTEngine::HirshfeldReferences | ( | const QMMolecule & | mol | ) | const |
Free-atom reference densities of the Hirshfeld partition of mol (the ones CDFT uses), as atom-centred references for HirshfeldPartition.
Definition at line 3089 of file dftengine.cc.
|
private |
Generate an initial guess by diagonalizing the core Hamiltonian only.
Definition at line 785 of file dftengine.cc.
| void votca::xtp::DFTEngine::Initialize | ( | tools::Property & | options | ) |
Read DFT, grid, and SCF settings from the user options tree.
Self-consistent Kohn-Sham implementation.
The SCF cycle solves F C = S C eps in a Gaussian AO basis. In the restricted branch a single density matrix is iterated, whereas in the UKS branch separate alpha and beta densities are propagated while sharing the same one-electron Hamiltonian, Coulomb term, and AO overlap matrix.
Relative to the earlier restricted implementation, the UKS extension keeps the spin channels separate only where the equations require it: exchange, spin-resolved XC potentials, occupations, and convergence acceleration.
Definition at line 99 of file dftengine.cc.
|
private |
Insert zero columns into an MO coefficient matrix at the requested position.
|
private |
Insert zero rows into an MO coefficient matrix at the requested position.
Definition at line 721 of file embeddingengine.cc.
|
private |
Integrate an external electron density represented by another orbital container.
Definition at line 3589 of file dftengine.cc.
|
private |
Integrate a homogeneous external electric field into the AO basis.
Definition at line 3469 of file dftengine.cc.
|
private |
Integrate the electrostatic potential generated by external multipoles into the AO basis.
Definition at line 3482 of file dftengine.cc.
|
inline |
Report whether the current electron counts define a spin-polarized reference.
Definition at line 296 of file dftengine.h.
|
private |
Apply McWeeny purification to improve the idempotency of a density-matrix guess.
Definition at line 683 of file embeddingengine.cc.
|
private |
Generate an initial guess from a model potential including numerical XC contributions.
Definition at line 796 of file dftengine.cc.
|
private |
Compute the classical nucleus-nucleus repulsion energy.
Definition at line 3360 of file dftengine.cc.
|
inline |
Return the number of spatial orbitals occupied by at least one electron in a restricted open-shell reference.
Definition at line 302 of file dftengine.h.
|
private |
Orthonormalize an initial MO guess with respect to the AO overlap matrix.
Definition at line 3627 of file dftengine.cc.
Initialize basis sets, integral engines, and electron counts before entering the SCF loop.
Definition at line 3226 of file dftengine.cc.
|
private |
Print a one-spin list of orbital energies and occupations to the logger.
Definition at line 293 of file dftengine.cc.
|
private |
Print separate alpha and beta orbital energies for a UKS calculation.
Definition at line 313 of file dftengine.cc.
|
static |
The input of BSEExcitationGradient for the gradients of the QP energies of levels (absolute MO indices in the QP window) of a GW run stored in orb; no BSE is needed.
Definition at line 1318 of file bsegradient.cc.
|
private |
Basis dimensions and the memory of the large intermediates.
Definition at line 750 of file dftengine.cc.
| void votca::xtp::DFTEngine::ReturnSetupCache | ( | ) |
Definition at line 1923 of file dftengine.cc.
|
private |
Identifies what the RI integrals depend on: basis sets (shell types, primitives, centres) and the pair threshold.
Definition at line 1896 of file dftengine.cc.
|
private |
Definition at line 2738 of file dftengine.cc.
|
private |
Run an unrestricted atomic reference calculation used in open-shell atomic guesses.
use_hunds_rule_occupation: if true, take the alpha/beta electron counts from a Hund's-rule ground-state table for main-group (s/p-block) elements instead of the default parity split (odd Z -> one extra alpha electron, even Z -> alpha == beta). The parity split is wrong for e.g. carbon (triplet, alpha=4, beta=2), which is irrelevant for the SAD guess (AtomicGuess) but not for Hirshfeld reference densities in CDFT. Elements not in the table (d/f-block, where the ground state is functional-dependent) fall back to the parity split with a warning; see HundsRuleAlphaBetaElectrons in dftengine.cc.
Definition at line 2345 of file dftengine.cc.
| bool votca::xtp::DFTEngine::RunCDFT | ( | Orbitals & | orb, |
| HirshfeldPartition::Constraint & | constraint ) |
Run a single, charge-constrained DFT (CDFT) calculation: finds the Lagrange multiplier lambda such that Tr[(P_alpha + P_beta) * constraint.weight_matrix] equals constraint.target_population, then converges the SCF at that lambda (Wu-Van Voorhis outer loop). Each trial SCF is warm-started from the previous trial's converged density via the "orbfile" initial guess, as in CP2K. Always uses EvaluateUKS, since a localized extra charge is usually an open-shell situation.
constraint.lambda is the initial guess for the bisection (0.0 is a reasonable default) and holds the converged value on return. Returns false if no root can be bracketed (constraints_ cleared, lambda unchanged) or if the bisection exhausts max_cdft_iterations_ without reaching cdft_population_tolerance_ (lambda set to the last bracket midpoint). Throws std::runtime_error if an inner SCF does not converge, to distinguish that from running out of outer iterations.
Definition at line 1021 of file dftengine.cc.
|
inline |
Definition at line 104 of file dftengine.h.
|
inline |
Definition at line 114 of file dftengine.h.
|
inline |
Provide external static sites whose electrostatic potential enters the Hamiltonian.
Definition at line 99 of file dftengine.h.
|
inline |
A static one-electron perturbation (AO matrix, Hartree) added to the core Hamiltonian of every following Evaluate: the potential energy operator of an electron, e.g. lambda * W_k for a Hirshfeld-localized potential. Its size must match the DFT basis; an empty matrix removes it. Used for finite-difference response calculations (ChargeResponseFit).
Definition at line 273 of file dftengine.h.
|
inline |
Definition at line 315 of file dftengine.h.
|
inline |
Attach the logger used for SCF progress and diagnostics.
Definition at line 95 of file dftengine.h.
| void votca::xtp::DFTEngine::setSCFToleranceFloor | ( | double | energy, |
| double | error ) |
Raise the SCF convergence thresholds (energy in Hartree, DIIS error) to at least these values; call after Initialize.
Definition at line 1911 of file dftengine.cc.
|
inline |
Reuse setup from, and keep it in, this cache (see DFTSetupCache). The RI integrals are taken out of the cache while the engine runs; call ReturnSetupCache() afterwards to put them back.
Definition at line 125 of file dftengine.h.
|
private |
Assemble the one-electron core Hamiltonian for the current molecule.
Definition at line 1689 of file dftengine.cc.
|
private |
Precompute AO matrices that remain unchanged throughout the SCF procedure.
Definition at line 1936 of file dftengine.cc.
|
private |
Build the numerical exchange-correlation integration object for the current molecule.
Definition at line 3340 of file dftengine.cc.
|
inline |
Use the MOs already in the Orbitals passed to Evaluate as the SCF guess when they fit this calculation (same basis set and size, same electron counts); otherwise the configured initial_guess is used. Set by QM/MM for iterations after the first, where only the environment changed.
Definition at line 120 of file dftengine.h.
|
private |
Average density-matrix elements over functions belonging to the same atomic shell.
Definition at line 3385 of file dftengine.cc.
| std::vector< Eigen::MatrixXd > votca::xtp::DFTEngine::StaticResponse | ( | const Orbitals & | orb, |
| const std::vector< Eigen::MatrixXd > & | perturbations, | ||
| double | tolerance = 1e-7, | ||
| Index | max_iterations = 100 ) |
Static linear response of the converged closed-shell ground state in orb (same basis, functional and grid as this engine) to one-electron perturbations h_k (AO matrices of an electron's potential energy, per unit strength): coupled-perturbed Kohn-Sham, (e_a - e_i) U_ai + [C_v^T G[dP] C_o]_ai = -[C_v^T h C_o]_ai, dP = 2 (C_v U C_o^T + C_o U^T C_v^T), G = J + 0.5 a_x K + f_xc (LDA/GGA, global hybrids), solved by preconditioned conjugate gradients for all h_k together until |residual| < tolerance |rhs|. Returns the first-order density matrices dP_k (total). Throws for open-shell states or if CG does not converge.
Definition at line 2922 of file dftengine.cc.
|
private |
Project the full-system Hamiltonian and densities onto the selected truncated active basis.
Definition at line 530 of file embeddingengine.cc.
|
private |
Expand truncated active-region orbitals back into the full AO basis with zero padding.
Definition at line 704 of file embeddingengine.cc.
|
private |
Definition at line 2776 of file dftengine.cc.
|
private |
Whether orb's MOs (computed in previous_basis) can serve as the guess for this calculation; if not, why not.
Definition at line 996 of file dftengine.cc.
|
friend |
Definition at line 318 of file dftengine.h.
|
private |
Definition at line 679 of file dftengine.h.
|
private |
Definition at line 665 of file dftengine.h.
|
private |
Definition at line 675 of file dftengine.h.
|
private |
Definition at line 666 of file dftengine.h.
|
private |
Definition at line 667 of file dftengine.h.
|
private |
Definition at line 656 of file dftengine.h.
|
private |
Definition at line 595 of file dftengine.h.
|
private |
Definition at line 591 of file dftengine.h.
|
private |
Definition at line 711 of file dftengine.h.
|
private |
Definition at line 710 of file dftengine.h.
|
private |
Definition at line 708 of file dftengine.h.
|
private |
Definition at line 692 of file dftengine.h.
|
private |
Definition at line 697 of file dftengine.h.
|
private |
Definition at line 662 of file dftengine.h.
|
private |
Definition at line 702 of file dftengine.h.
|
private |
Definition at line 626 of file dftengine.h.
|
private |
Definition at line 624 of file dftengine.h.
|
private |
Definition at line 612 of file dftengine.h.
|
private |
Definition at line 594 of file dftengine.h.
|
private |
Definition at line 592 of file dftengine.h.
|
private |
Definition at line 618 of file dftengine.h.
|
private |
Definition at line 619 of file dftengine.h.
|
private |
Definition at line 677 of file dftengine.h.
|
private |
Definition at line 596 of file dftengine.h.
|
private |
Definition at line 593 of file dftengine.h.
|
private |
Definition at line 628 of file dftengine.h.
|
private |
Definition at line 634 of file dftengine.h.
|
private |
Definition at line 685 of file dftengine.h.
|
private |
Definition at line 663 of file dftengine.h.
|
private |
Definition at line 683 of file dftengine.h.
|
private |
Definition at line 644 of file dftengine.h.
|
private |
Definition at line 659 of file dftengine.h.
|
private |
Definition at line 598 of file dftengine.h.
|
private |
Definition at line 693 of file dftengine.h.
|
private |
Definition at line 609 of file dftengine.h.
|
private |
Definition at line 653 of file dftengine.h.
|
private |
Definition at line 671 of file dftengine.h.
|
private |
Definition at line 684 of file dftengine.h.
|
private |
Definition at line 614 of file dftengine.h.
|
private |
Definition at line 672 of file dftengine.h.
|
private |
Definition at line 650 of file dftengine.h.
|
private |
Definition at line 660 of file dftengine.h.
|
private |
Definition at line 668 of file dftengine.h.
|
private |
Definition at line 707 of file dftengine.h.
|
private |
Definition at line 623 of file dftengine.h.
|
private |
Definition at line 687 of file dftengine.h.
|
private |
Definition at line 688 of file dftengine.h.
|
private |
Definition at line 689 of file dftengine.h.
|
private |
Definition at line 690 of file dftengine.h.
|
private |
Definition at line 680 of file dftengine.h.
|
private |
Definition at line 622 of file dftengine.h.
|
private |
Definition at line 652 of file dftengine.h.
|
private |
Definition at line 603 of file dftengine.h.
|
private |
Definition at line 588 of file dftengine.h.
|
private |
Definition at line 606 of file dftengine.h.
|
private |
Definition at line 647 of file dftengine.h.
|
private |
Definition at line 600 of file dftengine.h.
|
private |
Definition at line 633 of file dftengine.h.
|
private |
Definition at line 691 of file dftengine.h.
|
private |
Definition at line 654 of file dftengine.h.
|
mutableprivate |
Definition at line 630 of file dftengine.h.
|
private |
Definition at line 676 of file dftengine.h.
|
private |
Definition at line 674 of file dftengine.h.
|
private |
Definition at line 678 of file dftengine.h.
|
private |
Definition at line 673 of file dftengine.h.
|
private |
Definition at line 631 of file dftengine.h.
|
private |
Definition at line 632 of file dftengine.h.
|
private |
Definition at line 648 of file dftengine.h.