|
occ
|
#include <hf.h>
Public Types | |
| enum class | ResponseMode { Exact , Approximate } |
| Operators for a CPHF response: the SCF's own (Exact), or a cheaper stand-in to precondition with (Approximate: RI-J and four-centre exchange; a DFT procedure also coarsens its XC grid). More... | |
| using | COSXGridSchedule = occ::qm::COSXGridSchedule |
| using | ExchangeOperators = std::vector<std::pair<double, double>> |
| Exact-exchange operators (c_t, omega_t) in the energy; HF is {(1, 0)}. | |
Public Member Functions | |
| HartreeFock (const AOBasis &basis) | |
| const auto & | aobasis () const |
| auto | nbf () const |
| bool | usual_scf_energy () const |
| void | update_scf_energy (occ::core::EnergyComponents &) const |
| FockBuildProperties | fock_build_properties () const |
| bool | have_effective_core_potentials () const |
| void | set_density_fitting_basis (const std::string &, double auto_aux_threshold=1e-4) |
| void | set_density_fitting_policy (IntegralEngineDF::Policy policy) |
| void | set_density_fitting_memory_limit (size_t bytes) |
| void | set_coulomb_method (CoulombMethod method) |
| void | set_cosx_exchange (occ::numint::COSXGridLevel level=occ::numint::COSXGridLevel::Grid1) |
| COSX exchange on one fixed grid. | |
| void | set_cosx_settings (const occ::qm::cosx::Settings &settings) |
| void | set_cosx_exchange_scale (double scale) |
| The factor the caller applies to this exchange (a global hybrid's exact exchange fraction). | |
| void | set_cosx_grid_schedule (const COSXGridSchedule &schedule={}) |
| bool | advance_scf_grid (double diis_error, bool converged) |
| SCF hook: called after each iteration's DIIS step. | |
| bool | scf_fock_approximate () const |
| SCF hooks for the frozen grid correction: whether the last Fock build used it (so convergence there is not convergence on the refine grid), and a request that the next build be exact and refresh it. | |
| void | refresh_scf_fock_correction () |
| void | set_scf_fock_incremental (bool incremental) |
| SCF hook: whether the next Fock build is handed a difference density. | |
| double | incremental_fock_floor () const |
| SCF hook: the DIIS error below which difference-density builds stop. | |
| double | final_energy_correction (const MolecularOrbitals &mo) |
| SCF hook: called once at convergence. | |
| double | finalize_cosx_grid (const MolecularOrbitals &mo, const ExchangeOperators &operators) |
| double | cosx_energy_shift_from (occ::numint::COSXGridLevel other, const MolecularOrbitals &mo, const ExchangeOperators &operators={ {1.0, 0.0}}) |
| COSX exchange energy at mo on the current grid minus that on other, non-self-consistently, leaving the current grid in place. | |
| bool | using_cosx () const |
| bool | using_density_fitting () const |
| const IntegralEngine & | integral_engine () const |
| The exact-integral engine (one-electron and point-charge integrals). | |
| HartreeFock | with_new_basis (const AOBasis &new_basis) const |
| Create a new HartreeFock instance with the same settings but different basis. | |
| void | copy_two_electron_setup_to (HartreeFock &other) const |
| Give other (typically the same system at another geometry) this object's two-electron treatment: density fitting (basis rebuilt for other's atoms), Coulomb method and storage policy, and COSX (fixed grid or schedule, and settings). | |
| std::vector< Mat > | factor_response_densities (const std::vector< Mat > &D1, const Mat &C) const |
| Factor each response density as Cx C^T + C Cx^T (no virtual-virtual block); throws otherwise. | |
| IntegralEngineDF * | approximate_coulomb_engine () const |
| RI-J engine for approximate responses: the SCF's own when it fits J, else one built on def2-universal-jkfit (null if unavailable). | |
| IntegralEngineDF * | exchange_df_engine (double omega) const |
| The density-fitting engine for exchange with operator omega (the attenuated twin for omega != 0). | |
| void | set_precision (double precision) |
| double | integral_precision () const |
| double | nuclear_point_charge_interaction_energy (const PointChargeList &) const |
| double | wolf_point_charge_interaction_energy (const PointChargeList &, const std::vector< double > &partial_charges, double alpha, double rc) const |
| Mat | compute_fock (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| Mat3N | additional_atomic_gradients (const MolecularOrbitals &mo) const |
| MatTriple | compute_fock_gradient (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| Mat | compute_fock_mixed_basis (const MolecularOrbitals &mo_minbs, const gto::AOBasis &bs, bool is_shell_diagonal) |
| Mat | compute_fock_from_density (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| Fock matrix from a density already expressed in this method's own basis. | |
| JKPair | compute_JK (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| JKTriple | compute_JK_gradient (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| std::vector< JKPair > | compute_JK_list (const std::vector< MolecularOrbitals > &mo, const Mat &Schwarz=Mat()) const |
| Mat | compute_J (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| Mat | compute_K (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| JKPair | coulomb_and_range_separated_exchange (const MolecularOrbitals &mo, double omega, double alpha, double beta, const Mat &Schwarz=Mat()) |
| MatTriple | compute_J_gradient (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| Mat3N | compute_jk_gradient (const MolecularOrbitals &mo, double jf, double kf, const Mat &Schwarz=Mat()) const |
| Nuclear gradient of jf * E_J + kf * E_K (E_K the full exact-exchange energy), contracted in the integral loop: 3 x natom, no derivative matrices. | |
| Mat3N | compute_k_gradient_long_range (const MolecularOrbitals &mo, double omega, double kf, const Mat &Schwarz=Mat()) const |
| As compute_jk_gradient, exchange only, with the attenuated operator erf(omega r)/r: the gradient of kf * E_K[erf]. | |
| std::vector< Mat > | compute_response_fock (const MolecularOrbitals &mo, const std::vector< Mat > &D1, const Mat &Schwarz=Mat()) const |
| G[D1] = dF/dD . D1 for each first-order density (same layout as mo.D). | |
| std::vector< Mat > | compute_response_jk (const std::vector< Mat > &D1, double jf, double kf, double omega=0.0, const Mat &Schwarz=Mat(), const MolecularOrbitals *ref=nullptr) const |
| jf * 2 J[D1] - kf * K[D1] for each restricted D1; omega != 0 selects the attenuated exchange (then jf must be 0). | |
| std::vector< Mat > | response_occ (const MolecularOrbitals &mo, const std::vector< Mat > &Cx, double jf, const ExchangeOperators &K, const Mat &Schwarz, ResponseMode mode=ResponseMode::Exact) const |
| (jf 2 J[D1] - sum_t c_t K_{omega_t}[D1]) Co for D1 = Cx Co^T + Co Cx^T (restricted), or per spin (jf J[D1^a + D1^b] - sum_t c_t K[D1^s]) Co^s (unrestricted). | |
| std::vector< Mat > | compute_response_fock_occ (const MolecularOrbitals &mo, const std::vector< Mat > &Cx, const Mat &Schwarz=Mat()) const |
| The CPHF response of HF: G[D1] Co with D1 = Cx Co^T + Co Cx^T. | |
| std::vector< Mat > | compute_response_fock_occ_approx (const MolecularOrbitals &mo, const std::vector< Mat > &Cx, const Mat &Schwarz=Mat()) const |
| bool | has_approximate_response () const |
| Whether the approximate response (density-fitted Coulomb, four-centre exchange) is cheaper than the exact one: only when the exact exchange is COSX, since four-centre exchange costs as much as RI-K. | |
| std::string | analytic_hessian_unsupported (SpinorbitalKind kind) const |
| Empty if the analytic Hessian supports this calculation, otherwise why not (the caller falls back to finite differences). | |
| Mat | compute_jk_hessian (const MolecularOrbitals &mo, double jf, const ExchangeOperators &K, const Mat &Schwarz=Mat()) const |
| Skeleton Hessian (fixed density) of jf E_J + sum_t c_t E_K[omega_t], with the SCF's operators (four-centre, RI-J, RI-K; four-centre Coulomb and full-range exchange in one pass). | |
| std::vector< Mat > | compute_jk_derivative_fock (const MolecularOrbitals &mo, double jf, const ExchangeOperators &K, const Mat &Schwarz=Mat()) const |
| Skeleton Fock derivatives of jf 2J - sum_t c_t K[omega_t] for every nuclear coordinate, as full matrices (unrestricted: per spin, alpha rows over beta rows) or contracted with C_o (cphf::contract_occupied). | |
| std::vector< Mat > | compute_jk_derivative_fock_occ (const MolecularOrbitals &mo, double jf, const ExchangeOperators &K, const Mat &Schwarz=Mat()) const |
| std::vector< Mat > | compute_exchange_nonvariational_fock_occ (const MolecularOrbitals &mo, const ExchangeOperators &K) const |
| d/dR (1/2 dE_K/dD - F_K) C_o at fixed density, F_K = -sum_t c_t K_{omega_t} the SCF's exchange: the COSX Fock is not exactly the energy's density derivative, and the analytic gradient's density response sees the latter. | |
| Mat | compute_one_electron_hessian (const Mat &P, const Mat &Q) const |
| sum P h^{xy} - sum Q S^{xy} (3N x 3N), total densities. | |
| void | compute_one_electron_derivative_matrices (std::vector< Mat > &S1, std::vector< Mat > &H1) const |
| S^{(x)} and h^{(x)} for every nuclear coordinate (3N each). | |
| Mat | two_electron_hessian (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| Skeleton two-electron Hessian (fixed density), Coulomb + full exchange. | |
| std::vector< Mat > | two_electron_derivative_fock (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| Skeleton two-electron Fock derivatives (3N matrices). | |
| std::vector< Mat > | two_electron_derivative_fock_occ (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| The same contracted with the occupied coefficients (nbf x nocc each). | |
| std::vector< Mat > | nonvariational_fock_derivative_occ (const MolecularOrbitals &mo) const |
| Mat3N | compute_exchange_gradient (const MolecularOrbitals &mo, double kf, double omega=0.0, const Mat &Schwarz=Mat()) const |
| Gradient of kf * E_K for the exchange operator in use: COSX when it is enabled (consistent with the COSX energy), else exact four-centre. | |
| Mat3N | two_electron_gradient (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| Two-electron part of the HF nuclear gradient (Coulomb + full exchange), with the same exchange approximation as the SCF. | |
| Mat3N | compute_coulomb_gradient (const MolecularOrbitals &mo, const Mat &Schwarz=Mat()) const |
| Gradient of E_J for the Coulomb operator in use: RI-J when the SCF's J is density-fitted, else four-centre. | |
| std::vector< Mat > | compute_J_list (const std::vector< MolecularOrbitals > &mo, const Mat &Schwarz=Mat()) const |
| Mat | compute_kinetic_matrix () const |
| MatTriple | compute_kinetic_gradient () const |
| Mat | compute_overlap_matrix () const |
| Mat | compute_overlap_matrix_for_basis (const occ::gto::AOBasis &basis) const |
| MatTriple | compute_overlap_gradient () const |
| Mat | compute_nuclear_attraction_matrix () const |
| MatTriple | compute_nuclear_attraction_gradient () const |
| MatTriple | compute_rinv_gradient_for_atom (size_t atom_index) const |
| Mat | compute_effective_core_potential_matrix () const |
| Mat3N | compute_ecp_gradient (const MolecularOrbitals &mo) const |
| Nuclear gradient of the ECP energy (3 x natoms), zero without ECPs. | |
| Mat | compute_point_charge_interaction_matrix (const PointChargeList &point_charges, double alpha=1e16) const |
| Mat | compute_wolf_interaction_matrix (const PointChargeList &point_charges, const std::vector< double > &partial_charges, double alpha, double rc) const |
| Mat3N | electronic_electric_field_contribution (const MolecularOrbitals &mo, const Mat3N &) const |
| Vec | electronic_electric_potential_contribution (const MolecularOrbitals &mo, const Mat3N &) const |
| Mat | compute_schwarz_ints () const |
| void | update_core_hamiltonian (const MolecularOrbitals &mo, Mat &H) |
| template<int order> | |
| occ::core::Multipole< order > | compute_electronic_multipoles (const MolecularOrbitals &mo, const Vec3 &o={0.0, 0.0, 0.0}) const |
| template<unsigned int order = 1> | |
| auto | compute_nuclear_multipoles (const Vec3 &o={0.0, 0.0, 0.0}) const |
| template<int order> | |
| auto | compute_multipoles (const MolecularOrbitals &mo, const Vec3 &o={0.0, 0.0, 0.0}) const |
| Mat | compute_K_long_range (const MolecularOrbitals &mo, double omega, const Mat &Schwarz=Mat()) const |
| Exchange built with the attenuated operator erf(omega r)/r. | |
| MatTriple | compute_K_gradient_long_range (const MolecularOrbitals &mo, double omega, const Mat &Schwarz=Mat()) const |
| Exchange gradient with the attenuated operator, as above. | |
| std::string | name () const |
| Public Member Functions inherited from occ::qm::SCFMethodBase | |
| SCFMethodBase (const std::vector< core::Atom > &) | |
| const auto & | atoms () const |
| int | system_charge () const |
| int | total_electrons () const |
| int | active_electrons () const |
| const auto & | frozen_electrons () const |
| Vec3 | center_of_mass () const |
| void | set_system_charge (int charge) |
| double | nuclear_repulsion_energy () const |
| Mat3N | nuclear_repulsion_gradient () const |
| Vec | nuclear_electric_potential_contribution (const Mat3N &) const |
| Mat3N | nuclear_electric_field_contribution (const Mat3N &) const |
| void | set_frozen_electrons (const std::vector< int > &) |
Additional Inherited Members | |
| Protected Member Functions inherited from occ::qm::SCFMethodBase | |
| void | update_electron_count () |
| Protected Attributes inherited from occ::qm::SCFMethodBase | |
| int | m_charge {0} |
| int | m_num_electrons {0} |
| int | m_num_frozen {0} |
| std::vector< occ::core::Atom > | m_atoms |
| std::vector< int > | m_frozen_electrons |
| using occ::qm::HartreeFock::ExchangeOperators = std::vector<std::pair<double, double>> |
Exact-exchange operators (c_t, omega_t) in the energy; HF is {(1, 0)}.
|
strong |
Operators for a CPHF response: the SCF's own (Exact), or a cheaper stand-in to precondition with (Approximate: RI-J and four-centre exchange; a DFT procedure also coarsens its XC grid).
| Enumerator | |
|---|---|
| Exact | |
| Approximate | |
| occ::qm::HartreeFock::HartreeFock | ( | const AOBasis & | basis | ) |
|
inline |
| bool occ::qm::HartreeFock::advance_scf_grid | ( | double | diis_error, |
| bool | converged ) |
|
inline |
Empty if the analytic Hessian supports this calculation, otherwise why not (the caller falls back to finite differences).
|
inline |
| IntegralEngineDF * occ::qm::HartreeFock::approximate_coulomb_engine | ( | ) | const |
RI-J engine for approximate responses: the SCF's own when it fits J, else one built on def2-universal-jkfit (null if unavailable).
|
inline |
Gradient of E_J for the Coulomb operator in use: RI-J when the SCF's J is density-fitted, else four-centre.
|
inline |
Nuclear gradient of the ECP energy (3 x natoms), zero without ECPs.
Contracted with mo's density; the caller applies occ's factor of two. The ECP operator is spin-independent, so open-shell densities are contracted as the sum of their spin blocks. Handing the kernel the stacked 2n x n mo.D would silently read only the alpha block, since it indexes D.block(bf0, bf1, ...).
| Mat occ::qm::HartreeFock::compute_effective_core_potential_matrix | ( | ) | const |
|
inline |
| Mat3N occ::qm::HartreeFock::compute_exchange_gradient | ( | const MolecularOrbitals & | mo, |
| double | kf, | ||
| double | omega = 0.0, | ||
| const Mat & | Schwarz = Mat() ) const |
Gradient of kf * E_K for the exchange operator in use: COSX when it is enabled (consistent with the COSX energy), else exact four-centre.
omega != 0 selects erf(omega r)/r.
| std::vector< Mat > occ::qm::HartreeFock::compute_exchange_nonvariational_fock_occ | ( | const MolecularOrbitals & | mo, |
| const ExchangeOperators & | K ) const |
d/dR (1/2 dE_K/dD - F_K) C_o at fixed density, F_K = -sum_t c_t K_{omega_t} the SCF's exchange: the COSX Fock is not exactly the energy's density derivative, and the analytic gradient's density response sees the latter.
Empty when they coincide (not COSX).
| Mat occ::qm::HartreeFock::compute_fock | ( | const MolecularOrbitals & | mo, |
| const Mat & | Schwarz = Mat() ) const |
|
inline |
Fock matrix from a density already expressed in this method's own basis.
The conventional four-centre build, which reads mo.D and screens on it as well as on Schwarz. Density fitting and COSX cannot serve here: both build exchange from the occupied coefficients, and a guess has a density before it has any orbitals.
Distinct from compute_fock_mixed_basis, which exists to project a density out of a different basis. Handing that function this method's own basis makes it duplicate every shell as auxiliary and run the full four-index loop unscreened – on a 566-function system that cost 256 s against 59 s for the whole rest of an SCF iteration.
| MatTriple occ::qm::HartreeFock::compute_fock_gradient | ( | const MolecularOrbitals & | mo, |
| const Mat & | Schwarz = Mat() ) const |
| Mat occ::qm::HartreeFock::compute_fock_mixed_basis | ( | const MolecularOrbitals & | mo_minbs, |
| const gto::AOBasis & | bs, | ||
| bool | is_shell_diagonal ) |
| Mat occ::qm::HartreeFock::compute_J | ( | const MolecularOrbitals & | mo, |
| const Mat & | Schwarz = Mat() ) const |
| MatTriple occ::qm::HartreeFock::compute_J_gradient | ( | const MolecularOrbitals & | mo, |
| const Mat & | Schwarz = Mat() ) const |
| std::vector< Mat > occ::qm::HartreeFock::compute_J_list | ( | const std::vector< MolecularOrbitals > & | mo, |
| const Mat & | Schwarz = Mat() ) const |
| JKPair occ::qm::HartreeFock::compute_JK | ( | const MolecularOrbitals & | mo, |
| const Mat & | Schwarz = Mat() ) const |
| std::vector< Mat > occ::qm::HartreeFock::compute_jk_derivative_fock | ( | const MolecularOrbitals & | mo, |
| double | jf, | ||
| const ExchangeOperators & | K, | ||
| const Mat & | Schwarz = Mat() ) const |
Skeleton Fock derivatives of jf 2J - sum_t c_t K[omega_t] for every nuclear coordinate, as full matrices (unrestricted: per spin, alpha rows over beta rows) or contracted with C_o (cphf::contract_occupied).
| std::vector< Mat > occ::qm::HartreeFock::compute_jk_derivative_fock_occ | ( | const MolecularOrbitals & | mo, |
| double | jf, | ||
| const ExchangeOperators & | K, | ||
| const Mat & | Schwarz = Mat() ) const |
| JKTriple occ::qm::HartreeFock::compute_JK_gradient | ( | const MolecularOrbitals & | mo, |
| const Mat & | Schwarz = Mat() ) const |
| Mat3N occ::qm::HartreeFock::compute_jk_gradient | ( | const MolecularOrbitals & | mo, |
| double | jf, | ||
| double | kf, | ||
| const Mat & | Schwarz = Mat() ) const |
Nuclear gradient of jf * E_J + kf * E_K (E_K the full exact-exchange energy), contracted in the integral loop: 3 x natom, no derivative matrices.
Always the conventional four-centre engine.
| Mat occ::qm::HartreeFock::compute_jk_hessian | ( | const MolecularOrbitals & | mo, |
| double | jf, | ||
| const ExchangeOperators & | K, | ||
| const Mat & | Schwarz = Mat() ) const |
Skeleton Hessian (fixed density) of jf E_J + sum_t c_t E_K[omega_t], with the SCF's operators (four-centre, RI-J, RI-K; four-centre Coulomb and full-range exchange in one pass).
| std::vector< JKPair > occ::qm::HartreeFock::compute_JK_list | ( | const std::vector< MolecularOrbitals > & | mo, |
| const Mat & | Schwarz = Mat() ) const |
| Mat occ::qm::HartreeFock::compute_K | ( | const MolecularOrbitals & | mo, |
| const Mat & | Schwarz = Mat() ) const |
| MatTriple occ::qm::HartreeFock::compute_K_gradient_long_range | ( | const MolecularOrbitals & | mo, |
| double | omega, | ||
| const Mat & | Schwarz = Mat() ) const |
Exchange gradient with the attenuated operator, as above.
| Mat3N occ::qm::HartreeFock::compute_k_gradient_long_range | ( | const MolecularOrbitals & | mo, |
| double | omega, | ||
| double | kf, | ||
| const Mat & | Schwarz = Mat() ) const |
As compute_jk_gradient, exchange only, with the attenuated operator erf(omega r)/r: the gradient of kf * E_K[erf].
| Mat occ::qm::HartreeFock::compute_K_long_range | ( | const MolecularOrbitals & | mo, |
| double | omega, | ||
| const Mat & | Schwarz = Mat() ) const |
Exchange built with the attenuated operator erf(omega r)/r.
The attenuated operator gets its own engines, fixed to it for the life of the calculation, rather than being produced by toggling omega on the shared ones and toggling it back. Omega is constant for a calculation – it comes from the functional – so the only thing the toggling ever bought was letting one engine serve two operators, and it cost exception safety, const-correctness, and the ability to cache anything that belongs to an operator rather than to a basis.
COSX is the exception and takes omega as a plain argument: nothing in it is cached per operator, so a second grid and shell-pair map would be pure duplication.
| MatTriple occ::qm::HartreeFock::compute_kinetic_gradient | ( | ) | const |
| Mat occ::qm::HartreeFock::compute_kinetic_matrix | ( | ) | const |
|
inline |
| MatTriple occ::qm::HartreeFock::compute_nuclear_attraction_gradient | ( | ) | const |
| Mat occ::qm::HartreeFock::compute_nuclear_attraction_matrix | ( | ) | const |
|
inline |
|
inline |
S^{(x)} and h^{(x)} for every nuclear coordinate (3N each).
|
inline |
sum P h^{xy} - sum Q S^{xy} (3N x 3N), total densities.
| MatTriple occ::qm::HartreeFock::compute_overlap_gradient | ( | ) | const |
| Mat occ::qm::HartreeFock::compute_overlap_matrix | ( | ) | const |
| Mat occ::qm::HartreeFock::compute_overlap_matrix_for_basis | ( | const occ::gto::AOBasis & | basis | ) | const |
| Mat occ::qm::HartreeFock::compute_point_charge_interaction_matrix | ( | const PointChargeList & | point_charges, |
| double | alpha = 1e16 ) const |
| std::vector< Mat > occ::qm::HartreeFock::compute_response_fock | ( | const MolecularOrbitals & | mo, |
| const std::vector< Mat > & | D1, | ||
| const Mat & | Schwarz = Mat() ) const |
G[D1] = dF/dD . D1 for each first-order density (same layout as mo.D).
|
inline |
The CPHF response of HF: G[D1] Co with D1 = Cx Co^T + Co Cx^T.
|
inline |
| std::vector< Mat > occ::qm::HartreeFock::compute_response_jk | ( | const std::vector< Mat > & | D1, |
| double | jf, | ||
| double | kf, | ||
| double | omega = 0.0, | ||
| const Mat & | Schwarz = Mat(), | ||
| const MolecularOrbitals * | ref = nullptr ) const |
jf * 2 J[D1] - kf * K[D1] for each restricted D1; omega != 0 selects the attenuated exchange (then jf must be 0).
ref (the reference orbitals) is needed for density-fitted exchange.
| MatTriple occ::qm::HartreeFock::compute_rinv_gradient_for_atom | ( | size_t | atom_index | ) | const |
| Mat occ::qm::HartreeFock::compute_schwarz_ints | ( | ) | const |
| Mat occ::qm::HartreeFock::compute_wolf_interaction_matrix | ( | const PointChargeList & | point_charges, |
| const std::vector< double > & | partial_charges, | ||
| double | alpha, | ||
| double | rc ) const |
| void occ::qm::HartreeFock::copy_two_electron_setup_to | ( | HartreeFock & | other | ) | const |
Give other (typically the same system at another geometry) this object's two-electron treatment: density fitting (basis rebuilt for other's atoms), Coulomb method and storage policy, and COSX (fixed grid or schedule, and settings).
Finite-difference derivatives need this to stay on one energy surface.
| double occ::qm::HartreeFock::cosx_energy_shift_from | ( | occ::numint::COSXGridLevel | other, |
| const MolecularOrbitals & | mo, | ||
| const ExchangeOperators & | operators = { {1.0, 0.0}} ) |
COSX exchange energy at mo on the current grid minus that on other, non-self-consistently, leaving the current grid in place.
Used to put energies from SCFs on different grids on one surface.
| JKPair occ::qm::HartreeFock::coulomb_and_range_separated_exchange | ( | const MolecularOrbitals & | mo, |
| double | omega, | ||
| double | alpha, | ||
| double | beta, | ||
| const Mat & | Schwarz = Mat() ) |
| Mat3N occ::qm::HartreeFock::electronic_electric_field_contribution | ( | const MolecularOrbitals & | mo, |
| const Mat3N & | ) const |
| Vec occ::qm::HartreeFock::electronic_electric_potential_contribution | ( | const MolecularOrbitals & | mo, |
| const Mat3N & | ) const |
| IntegralEngineDF * occ::qm::HartreeFock::exchange_df_engine | ( | double | omega | ) | const |
The density-fitting engine for exchange with operator omega (the attenuated twin for omega != 0).
| std::vector< Mat > occ::qm::HartreeFock::factor_response_densities | ( | const std::vector< Mat > & | D1, |
| const Mat & | C ) const |
Factor each response density as Cx C^T + C Cx^T (no virtual-virtual block); throws otherwise.
| double occ::qm::HartreeFock::final_energy_correction | ( | const MolecularOrbitals & | mo | ) |
SCF hook: called once at convergence.
With a COSX schedule, moves to the final grid and returns the change in the exact-exchange energy, -sum_t c_t [tr(D K_t,final) - tr(D K_t,current)] for the operators (c_t, omega_t) given (default: full HF exchange).
| double occ::qm::HartreeFock::finalize_cosx_grid | ( | const MolecularOrbitals & | mo, |
| const ExchangeOperators & | operators ) |
|
inline |
|
inline |
Whether the approximate response (density-fitted Coulomb, four-centre exchange) is cheaper than the exact one: only when the exact exchange is COSX, since four-centre exchange costs as much as RI-K.
|
inline |
|
inline |
SCF hook: the DIIS error below which difference-density builds stop.
The COSX charge x density screen is absolute, so each difference build drops a different set of shell pairs and the accumulated exchange carries their error; below this the iterations are full builds, so the SCF converges onto the full build's own fixed point.
|
inline |
The exact-integral engine (one-electron and point-charge integrals).
|
inline |
|
inline |
|
inline |
|
inline |
| double occ::qm::HartreeFock::nuclear_point_charge_interaction_energy | ( | const PointChargeList & | ) | const |
|
inline |
| std::vector< Mat > occ::qm::HartreeFock::response_occ | ( | const MolecularOrbitals & | mo, |
| const std::vector< Mat > & | Cx, | ||
| double | jf, | ||
| const ExchangeOperators & | K, | ||
| const Mat & | Schwarz, | ||
| ResponseMode | mode = ResponseMode::Exact ) const |
(jf 2 J[D1] - sum_t c_t K_{omega_t}[D1]) Co for D1 = Cx Co^T + Co Cx^T (restricted), or per spin (jf J[D1^a + D1^b] - sum_t c_t K[D1^s]) Co^s (unrestricted).
Four-centre Coulomb and full-range exchange share one integral pass when both are four-centre.
|
inline |
SCF hooks for the frozen grid correction: whether the last Fock build used it (so convergence there is not convergence on the refine grid), and a request that the next build be exact and refresh it.
| void occ::qm::HartreeFock::set_cosx_exchange | ( | occ::numint::COSXGridLevel | level = occ::numint::COSXGridLevel::Grid1 | ) |
COSX exchange on one fixed grid.
| void occ::qm::HartreeFock::set_cosx_exchange_scale | ( | double | scale | ) |
The factor the caller applies to this exchange (a global hybrid's exact exchange fraction).
The COSX shell-pair screen is loosened by it, so the absolute screening error in the Fock matrix stays that of HF.
| void occ::qm::HartreeFock::set_cosx_grid_schedule | ( | const COSXGridSchedule & | schedule = {} | ) |
| void occ::qm::HartreeFock::set_cosx_settings | ( | const occ::qm::cosx::Settings & | settings | ) |
| void occ::qm::HartreeFock::set_coulomb_method | ( | CoulombMethod | method | ) |
| void occ::qm::HartreeFock::set_density_fitting_basis | ( | const std::string & | , |
| double | auto_aux_threshold = 1e-4 ) |
| void occ::qm::HartreeFock::set_density_fitting_memory_limit | ( | size_t | bytes | ) |
| void occ::qm::HartreeFock::set_density_fitting_policy | ( | IntegralEngineDF::Policy | policy | ) |
|
inline |
| void occ::qm::HartreeFock::set_scf_fock_incremental | ( | bool | incremental | ) |
SCF hook: whether the next Fock build is handed a difference density.
An incremental build leaves out the frozen grid correction (it is already in the accumulated Fock matrix) and must not refresh it.
|
inline |
Skeleton two-electron Fock derivatives (3N matrices).
|
inline |
The same contracted with the occupied coefficients (nbf x nocc each).
|
inline |
Two-electron part of the HF nuclear gradient (Coulomb + full exchange), with the same exchange approximation as the SCF.
|
inline |
Skeleton two-electron Hessian (fixed density), Coulomb + full exchange.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| HartreeFock occ::qm::HartreeFock::with_new_basis | ( | const AOBasis & | new_basis | ) | const |
Create a new HartreeFock instance with the same settings but different basis.
| new_basis | The new basis set to use |
| double occ::qm::HartreeFock::wolf_point_charge_interaction_energy | ( | const PointChargeList & | , |
| const std::vector< double > & | partial_charges, | ||
| double | alpha, | ||
| double | rc ) const |