MADNESS 0.10.1
|
#include <PNO.h>
Public Types | |
typedef std::shared_ptr< operatorT> | poperatorT |
Public Member Functions | |
PNO (World &world, const Nemo &nemo, const PNOParameters ¶meters, const F12Parameters ¶mf12) | |
PNOPairs | adaptive_solver (PNOPairs &pairs) const |
Solve with adaptive solver descriped in the JPC paper. | |
void | canonicalize (PNOPairs &v) const |
void | check_orthonormality (const vector_real_function_3d &v) const |
vector_real_function_3d | compute_CIS_potentials (const vector_real_function_3d &xcis) const |
get the CIS potentials without Fock residue, i.e Q(2tJ - 2tK)|i> , with transformed K and J | |
PairEnergies | compute_cispd_correction_es (const vector_real_function_3d &xcis, PNOPairs &pairs) const |
PairEnergies | compute_cispd_correction_gs (const vector_real_function_3d &xcis, const PNOPairs &pairs) const |
PairEnergies | compute_cispd_f12_correction_es (const vector_real_function_3d &xcis, PairEnergies &energies) const |
only the f12 part of the excited state correction of CIS(D) (namely the terms s2b and s2c) | |
PairEnergies | compute_cispd_f12_correction_gs (const vector_real_function_3d &xcis, PairEnergies &energies) const |
The f12 part of the ground state correction of CIS(D) (s4a, s4b, s4c) | |
Tensor< double > | compute_cispd_fluctuation_matrix (const ElectronPairIterator &it, PNOPairs &pairs) const |
PNOPairs | compute_cispd_fluctuation_potential (const ElectronPairIterator &it, PNOPairs &pairs) const |
Compute the CIS(D) fluctuation potential of a specific pair. | |
Tensor< double > | compute_fluctuation_matrix (const ElectronPairIterator &it, const vector_real_function_3d &pnos, const vector_real_function_3d &Kpnos_in=vector_real_function_3d()) const |
PNOPairs | compute_fluctuation_potential (const ElectronPairIterator &it, PNOPairs &pairs) const |
Compute the MP2 fluctuation potential of a speficif pair. | |
PairEnergies | compute_projected_mp2_energies (PNOPairs &pairs) const |
template<typename projector > | |
vector_real_function_3d | compute_V_aj_i (const real_function_3d &moi, const real_function_3d &moj, const vector_real_function_3d &virtuals, const projector &Qpr) const |
template<typename projector > | |
vector_real_function_3d | compute_Vreg_aj_i (const real_function_3d &moi, const real_function_3d &moj, const vector_real_function_3d &virtuals, const projector &Qpr, const vector_real_function_3d &Kpno=vector_real_function_3d()) const |
vector_real_function_3d | compute_Vreg_aj_i (const size_t &i, const size_t &j, const vector_real_function_3d &virtuals, const vector_real_function_3d &Kpno) const |
vector_real_function_3d | compute_Vreg_aj_i_commutator_response (const real_function_3d &moi, const real_function_3d &moj, const vector_real_function_3d &virtuals, const vector_real_function_3d &Vx) const |
vector_real_function_3d | compute_Vreg_aj_i_fock_residue (const real_function_3d &ket1, const real_function_3d &ket2, const vector_real_function_3d &virtuals) const |
EnergyType | energytype () const |
convenience | |
PNOPairs | freeze_insignificant_pairs (PNOPairs &pairs) const |
std::pair< size_t, size_t > | get_average_rank (const std::valarray< vector_real_function_3d > &va) const |
compute the average and the maximum rank of a set of PNOs | |
PNOPairs | grow_rank (PNOPairs &pairs, std::string exop) const |
vector_real_function_3d | guess_virtuals (const vector_real_function_3d &f=vector_real_function_3d(), const GuessType &inpgt=UNKNOWN_GUESSTYPE) const |
PNOPairs | initialize_pairs (PNOPairs &pairs, const GuessType &inpgt=UNKNOWN_GUESSTYPE) const |
bool | is_guess_from_scratch (const PairType &ct) const |
PNOPairs | iterate_pairs (PNOPairs &pairs) const |
PNOPairs | iterate_pairs_internal (PNOPairs &pairs, const int maxiter, const double econv) const |
PNOPairs | load_pnos (PNOPairs &pairs) const |
load PNOs from disc | |
std::vector< poperatorT > | make_bsh_operators (World &world, const tensorT &evals) const |
Convenience function to initialize all bsh operators. | |
size_t | nact () const |
std::string | name () const |
size_t | nocc () const |
convenience | |
OrbitalIterator | oit () const |
convenience | |
PNOPairs | orthonormalize_cholesky (PNOPairs &pairs) const |
convenience | |
ElectronPairIterator | pit () const |
std::valarray< Tensor< double > > | pno_compress (PNOPairs &pairs, const double tpno) const |
Compress the PNOs -> lose all PNOs which eigenvalue is below tpno. | |
void | print_ranks (const PNOPairs &pairs) const |
Print information about the PNO rank of all pairs (i.e. the number of PNO functions) | |
void | save_pnos (const PNOPairs &pairs) const |
save PNOs on disc | |
virtual bool | selftest () |
void | solve () const |
void | solve (std::vector< PNOPairs > &all_pairs) const |
Solve for the PairType that is given. | |
std::vector< PNOPairs > | solve_cispd (std::vector< PNOPairs > &pairs) const |
solve the PNO-CIS(D) equations | |
PNOPairs | solve_mp2 (PNOPairs &pairs) const |
void | solve_mp2 (std::vector< PNOPairs > &pairs) const |
solve PNO-MP2 equations | |
PairEnergies | t_solve (PNOPairs &pairs, const Tensor< double > &F_occ, const double R_convergence_threshold=1e-6, const size_t max_niter=100) const |
solve the MP2 and CIS(D) amplitude equations | |
PNOPairs | transform_pairs (PNOPairs &pairs, const std::valarray< Tensor< double > > &U_ij) const |
transform the pnos and all the intermediates/potentials and matrices stored in the PNOPair structure | |
PNOPairs | truncate_pair_ranks (PNOPairs &pairs) const |
Truncate the ranks of pairs to the given maxrank. | |
PNOPairs | truncate_pairs (PNOPairs &pairs) const |
void | update_fluctuation_potentials (PNOPairs &pairs) const |
compute all fluctuation potentials and store them in the pair structure | |
bool | update_pno (PNOPairs &pairs, const std::valarray< Tensor< double > > &rdm_evals_ij, const Tensor< double > &F_occ) const |
Static Public Member Functions | |
static void | help () |
static void | print_parameters () |
Public Attributes | |
BasisFunctions | basis |
class which holds all methods to read or create guess functions for PNO or CABS | |
Fock< double, 3 > | F |
F12Potentials | f12 |
Coulomb< double, 3 > | J |
ParametrizedExchange | K |
CCMessenger | msg |
Nemo | nemo |
PNOParameters | param |
calculation parameters | |
std::shared_ptr< real_convolution_3d > | poisson |
QProjector< double, 3 > | Q |
Kinetic< double, 3 > | T |
Nuclear< double, 3 > | V |
World & | world |
typedef std::shared_ptr<operatorT> madness::PNO::poperatorT |
|
inline |
Solve with adaptive solver descriped in the JPC paper.
References madness::PNOPairs::clear_intermediates(), madness::PNOParameters::econv_macro(), madness::PNOParameters::econv_micro(), madness::PNOParameters::econv_pairs(), madness::PairEnergies::eij, madness::PNOPairs::empty(), madness::EMPTY_GUESSTYPE, madness::PNOPairs::energies, energy, madness::PNOParameters::exop(), freeze_insignificant_pairs(), madness::PNOPairs::frozen_ij, grow_rank(), initialize_pairs(), iterate_pairs_internal(), madness::guessfactory::make_predefined_exop_strings(), madness::PNOParameters::maxiter_macro(), madness::PNOParameters::maxiter_micro(), madness::PNOParameters::maxrank(), madness::PNOPairs::maxranks_ij, msg, madness::PNOPairs::name(), madness::PNOPairs::npairs, madness::CCMessenger::output(), PAIRLOOP, param, madness::PNOPairs::pno_ij, madness::World::rank(), madness::PNOParameters::rank_increase(), madness::CCMessenger::section(), madness::PairEnergies::total_energy(), and world.
Referenced by iterate_pairs().
void madness::PNO::canonicalize | ( | PNOPairs & | v | ) | const |
[in,out] | A | on input = real symmetric matrix, on output = diagonal matrix of eigenvalues (from smallest to largest) |
[in,out] | v | on input = basis in which input A is represented, on output = the eigenbasis of A |
References madness::PNOPairs::F_ij, madness::PNOPairs::npairs, PAIRLOOP, madness::PNOPairs::pno_ij, madness::PNOPairs::rdm_evals_ij, madness::syev(), and transform_pairs().
Referenced by iterate_pairs_internal().
void madness::PNO::check_orthonormality | ( | const vector_real_function_3d & | v | ) | const |
vector_real_function_3d madness::PNO::compute_CIS_potentials | ( | const vector_real_function_3d & | xcis | ) | const |
get the CIS potentials without Fock residue, i.e Q(2tJ - 2tK)|i> , with transformed K and J
References madness::F12Potentials::acmos, f12, J, K, param, poisson, Q, madness::PNOParameters::thresh(), madness::truncate(), and world.
Referenced by iterate_pairs_internal().
PairEnergies madness::PNO::compute_cispd_correction_es | ( | const vector_real_function_3d & | xcis, |
PNOPairs & | pairs | ||
) | const |
excited state correction of CIS(D) (namely the terms s2b and s2c) f12 part is excluded (no need to recompute after every iteration)
References a, madness::F12Potentials::acmos, madness::apply(), b, madness::CISPD_PAIRTYPE, madness::PairEnergies::eijt, madness::PNOPairs::energies, f12, MADNESS_ASSERT, madness::matrix_inner(), msg, madness::PNOPairs::name(), pit(), madness::PNOPairs::pno_ij, poisson, madness::timer::print(), madness::PNOPairs::t_ij, TIMER, madness::transpose(), madness::PNOPairs::type, madness::PairEnergies::update(), world, and xi.
Referenced by solve_cispd(), and t_solve().
PairEnergies madness::PNO::compute_cispd_correction_gs | ( | const vector_real_function_3d & | xcis, |
const PNOPairs & | pairs | ||
) | const |
ground state correction of CIS(D) (s4a, s4b, s4c) f12 is excluded to avoid recomputation in iterations
References a, madness::F12Potentials::acmos, madness::apply(), b, madness::PairEnergies::eijs, f12, ij(), madness::inner(), k, MADNESS_ASSERT, madness::matrix_inner(), madness::MP2_PAIRTYPE, msg, madness::PNOPairs::name(), madness::PNOPairs::npairs, pit(), madness::PNOPairs::pno_ij, poisson, madness::timer::print(), madness::BaseTensor::size(), madness::MyTimer::start(), madness::PNOPairs::t_ij, madness::transpose(), madness::PNOPairs::type, madness::PairEnergies::update(), world, and xi.
Referenced by solve_cispd().
PairEnergies madness::PNO::compute_cispd_f12_correction_es | ( | const vector_real_function_3d & | xcis, |
PairEnergies & | energies | ||
) | const |
only the f12 part of the excited state correction of CIS(D) (namely the terms s2b and s2c)
References madness::F12Potentials::acmos, madness::apply(), madness::F12Potentials::compute_fQg_integral(), madness::PairEnergies::eijt_f12, f12, madness::F12Potentials::fop, madness::inner(), msg, pit(), poisson, madness::timer::print(), Q, TIMER, madness::PairEnergies::update(), world, and xi.
Referenced by solve_cispd().
PairEnergies madness::PNO::compute_cispd_f12_correction_gs | ( | const vector_real_function_3d & | xcis, |
PairEnergies & | energies | ||
) | const |
The f12 part of the ground state correction of CIS(D) (s4a, s4b, s4c)
References madness::F12Potentials::acmos, madness::apply(), madness::F12Potentials::compute_fQg_integral(), madness::PairEnergies::eijs_f12, f12, madness::PNOParameters::f12(), madness::F12Potentials::fop, ij(), madness::inner(), k, msg, param, pit(), poisson, madness::timer::print(), Q, madness::BaseTensor::size(), madness::MyTimer::start(), world, and xi.
Referenced by solve_cispd().
Tensor< double > madness::PNO::compute_cispd_fluctuation_matrix | ( | const ElectronPairIterator & | it, |
PNOPairs & | pairs | ||
) | const |
References a, madness::F12Potentials::acKmos, madness::F12Potentials::acmos, b, madness::PNOPairs::cis, madness::Tensor< T >::clear(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::F12Potentials::compute_xyab_integrals(), madness::ElectronPairIterator::diagonal(), f12, madness::PNOParameters::f12(), madness::F12Potentials::fop, madness::ElectronPairIterator::i(), madness::ElectronPairIterator::ij(), madness::ElectronPairIterator::j(), k, K, madness::PNOPairs::Kpno_ij, madness::CISData::Kx, madness::matrix_inner(), param, madness::PNOPairs::pno_ij, poisson, madness::timer::print(), TIMER, madness::transpose(), madness::CISData::Vx, madness::PNOPairs::W_ij, world, madness::CISData::x, and xi.
Referenced by iterate_pairs_internal().
PNOPairs madness::PNO::compute_cispd_fluctuation_potential | ( | const ElectronPairIterator & | it, |
PNOPairs & | pairs | ||
) | const |
Compute the CIS(D) fluctuation potential of a specific pair.
References madness::F12Potentials::acmos, madness::PNOPairs::cis, compute_V_aj_i(), compute_Vreg_aj_i(), compute_Vreg_aj_i_commutator_response(), compute_Vreg_aj_i_fock_residue(), madness::ElectronPairIterator::diagonal(), f12, madness::PNOParameters::f12(), madness::ElectronPairIterator::i(), madness::ElectronPairIterator::ij(), madness::ElectronPairIterator::j(), K, madness::PNOPairs::Kpno_ij, param, madness::PNOPairs::pno_ij, Q, TIMER, madness::CISData::Vx, madness::PNOPairs::W_ij_i, madness::PNOPairs::W_ij_j, madness::CISData::x, and xi.
Referenced by update_fluctuation_potentials().
Tensor< double > madness::PNO::compute_fluctuation_matrix | ( | const ElectronPairIterator & | it, |
const vector_real_function_3d & | pnos, | ||
const vector_real_function_3d & | Kpnos_in = vector_real_function_3d() |
||
) | const |
References madness::F12Potentials::acmos, madness::apply(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::ElectronPairIterator::diagonal(), f12, madness::PNOParameters::f12(), madness::WorldGopInterface::fence(), madness::get_size(), madness::World::gop, madness::ElectronPairIterator::i(), madness::ElectronPairIterator::j(), K, madness::matrix_inner(), madness::mul(), param, poisson, madness::World::rank(), madness::transpose(), vi, and world.
Referenced by iterate_pairs_internal().
PNOPairs madness::PNO::compute_fluctuation_potential | ( | const ElectronPairIterator & | it, |
PNOPairs & | pairs | ||
) | const |
Compute the MP2 fluctuation potential of a speficif pair.
References madness::F12Potentials::acmos, compute_V_aj_i(), compute_Vreg_aj_i(), madness::ElectronPairIterator::diagonal(), f12, madness::PNOParameters::f12(), madness::ElectronPairIterator::i(), madness::ElectronPairIterator::ij(), madness::ElectronPairIterator::j(), madness::PNOPairs::Kpno_ij, param, madness::PNOPairs::pno_ij, Q, madness::PNOPairs::W_ij_i, and madness::PNOPairs::W_ij_j.
Referenced by update_fluctuation_potentials().
madness::PairEnergies madness::PNO::compute_projected_mp2_energies | ( | PNOPairs & | pairs | ) | const |
Compute the projected MP2 energies: 2<ij|g|uij> - <ji|g|uij> for all pairs gives back the PairEnergies structure with all singlet and triplet energies
References a, madness::F12Potentials::acmos, madness::apply(), b, madness::PairEnergies::eijs, madness::PairEnergies::eijt, madness::PNOPairs::energies, madness::PairEnergies::energy, f12, madness::matrix_inner(), PAIRLOOP, madness::PNOPairs::pno_ij, poisson, madness::PNOPairs::t_ij, madness::transpose(), madness::PairEnergies::update(), and world.
Referenced by t_solve().
vector_real_function_3d madness::PNO::compute_V_aj_i | ( | const real_function_3d & | moi, |
const real_function_3d & | moj, | ||
const vector_real_function_3d & | virtuals, | ||
const projector & | Qpr | ||
) | const |
the terms are expanded as follows: Q (-J1 +K1) | i(1) > < a(2) | j(2) >
References madness::apply(), madness::PNOParameters::f12(), MADNESS_ASSERT, madness::mul(), param, poisson, madness::PNOParameters::thresh(), madness::truncate(), and world.
Referenced by compute_cispd_fluctuation_potential(), and compute_fluctuation_potential().
vector_real_function_3d madness::PNO::compute_Vreg_aj_i | ( | const real_function_3d & | moi, |
const real_function_3d & | moj, | ||
const vector_real_function_3d & | virtuals, | ||
const projector & | Qpr, | ||
const vector_real_function_3d & | Kpno = vector_real_function_3d() |
||
) | const |
vector_real_function_3d madness::PNO::compute_Vreg_aj_i | ( | const size_t & | i, |
const size_t & | j, | ||
const vector_real_function_3d & | virtuals, | ||
const vector_real_function_3d & | Kpno | ||
) | const |
References madness::F12Potentials::acKmos, madness::F12Potentials::acmos, madness::F12Potentials::apply_regularized_potential(), f12, madness::PNOParameters::f12(), MADNESS_ASSERT, param, Q, madness::PNOParameters::thresh(), madness::truncate(), and world.
Referenced by compute_cispd_fluctuation_potential(), and compute_fluctuation_potential().
vector_real_function_3d madness::PNO::compute_Vreg_aj_i_commutator_response | ( | const real_function_3d & | moi, |
const real_function_3d & | moj, | ||
const vector_real_function_3d & | virtuals, | ||
const vector_real_function_3d & | Vx | ||
) | const |
References madness::F12Potentials::acmos, madness::apply(), f12, madness::F12Potentials::fop, madness::MyTimer::print(), Q, madness::MyTimer::start(), madness::MyTimer::stop(), and world.
Referenced by compute_cispd_fluctuation_potential().
vector_real_function_3d madness::PNO::compute_Vreg_aj_i_fock_residue | ( | const real_function_3d & | ket1, |
const real_function_3d & | ket2, | ||
const vector_real_function_3d & | virtuals | ||
) | const |
References madness::apply(), f12, madness::F12Potentials::fop, madness::MyTimer::print(), Q, madness::MyTimer::start(), madness::MyTimer::stop(), and world.
Referenced by compute_cispd_fluctuation_potential().
|
inline |
convenience
References madness::F12Parameters::energytype(), f12, madness::PNOParameters::f12(), madness::HYLLERAAS_ENERGYTYPE, param, madness::F12Potentials::param, and madness::PROJECTED_ENERGYTYPE.
Referenced by t_solve().
change the state of insignificant pairs to frozen This is based on:
freeze pairs which do not contribute significantly frozen pairs will not be further optimized
References madness::PNOParameters::active_pairs_of_orbital(), madness::PNOParameters::econv_pairs(), madness::PairEnergies::eij, madness::PNOPairs::energies, madness::PNOParameters::freeze(), madness::PNOParameters::freeze_pairs(), madness::PNOParameters::freeze_pairs_of_orbital(), madness::PNOPairs::frozen_ij, msg, madness::PNOPairs::name(), PAIRLOOP, param, madness::PNOParameters::thresh(), and madness::PairEnergies::update().
Referenced by adaptive_solver().
std::pair< size_t, size_t > madness::PNO::get_average_rank | ( | const std::valarray< vector_real_function_3d > & | va | ) | const |
compute the average and the maximum rank of a set of PNOs
Referenced by main(), solve_cispd(), and solve_mp2().
Grow the rank of pairs by creating guess functions and adding them The type of guess is controlled by the parameters
References madness::append(), basis, madness::PNOPairs::cis, madness::PNOPairs::clear_intermediates(), madness::PNOParameters::exop_trigo(), madness::PNOParameters::freeze(), madness::PNOPairs::frozen_ij, madness::Nemo::get_calc(), madness::BasisFunctions::guess_with_exop(), MADNESS_ASSERT, madness::PNOParameters::maxrank(), msg, nemo, orthonormalize_cholesky(), PAIRLOOP, param, madness::PNOPairs::pno_ij, madness::timer::print(), Q, TIMER, madness::CISData::x, and xi.
Referenced by adaptive_solver().
vector_real_function_3d madness::PNO::guess_virtuals | ( | const vector_real_function_3d & | f = vector_real_function_3d() , |
const GuessType & | inpgt = UNKNOWN_GUESSTYPE |
||
) | const |
interfaces the BasisFunctions class guesses a set of virtuals depending on the guesstype and what was specified in the parameters
References basis, madness::EMPTY_GUESSTYPE, madness::PNOParameters::exop(), madness::EXOP_GUESSTYPE, madness::PNOParameters::exop_trigo(), madness::f, madness::FROM_FILE_GUESSTYPE, madness::Nemo::get_calc(), madness::BasisFunctions::guess_contracted_virtuals_from_file(), madness::BasisFunctions::guess_virtuals_internal(), madness::BasisFunctions::guess_with_exop(), madness::BasisFunctions::guess_with_psi4(), madness::PNOParameters::guesstype(), MADNESS_EXCEPTION, nemo, param, madness::PNOParameters::partial_wave(), madness::PARTIAL_WAVE_GUESSTYPE, madness::PNOParameters::predefined_guess(), madness::BasisFunctions::predefined_guess(), madness::PREDEFINED_GUESSTYPE, madness::PSI4_GUESSTYPE, Q, madness::SCF_GUESSTYPE, test(), and madness::UNKNOWN_GUESSTYPE.
Referenced by initialize_pairs().
|
inlinestatic |
References madness::print(), and madness::print_header2().
Referenced by main().
PNOPairs madness::PNO::initialize_pairs | ( | PNOPairs & | pairs, |
const GuessType & | inpgt = UNKNOWN_GUESSTYPE |
||
) | const |
Initialize PNO pairs If the guesstype is the default (UNKNOWN_GUESSTYPE) this will take the guess type from the parameters
References madness::ALL_PAIRTYPE, madness::append(), madness::PNOPairs::cis, madness::CISPD_PAIRTYPE, madness::PNOParameters::diagonal(), madness::EMPTY_GUESSTYPE, madness::EXOP_GUESSTYPE, madness::PNOParameters::freeze(), madness::PNOPairs::frozen_ij, madness::Nemo::get_calc(), madness::get_size(), guess_virtuals(), madness::PNOParameters::guesstype(), load_pnos(), madness::PNOParameters::maxrank(), madness::PNOPairs::maxranks_ij, msg, nemo, madness::PNOParameters::no_guess(), madness::ElectronPairIterator::npairs(), orthonormalize_cholesky(), madness::orthonormalize_rrcd(), PAIRLOOP, param, pit(), madness::PNOPairs::pno_ij, madness::timer::print(), Q, madness::World::rank(), madness::PNOParameters::restart(), madness::PNOPairs::t_ij, madness::PNOParameters::thresh(), TIMER, madness::truncate(), madness::PNOPairs::type, madness::UNKNOWN_GUESSTYPE, madness::PNOPairs::verify(), world, madness::CISData::x, and xi.
Referenced by adaptive_solver(), and iterate_pairs().
|
inline |
References madness::ALL_PAIRTYPE, param, and madness::PNOParameters::restart().
Iterate the pairs The type of iteration depends on the parameters and the type of PNOPairs structure This will call iterate_pairs_internal at some point Depending on the parameters the pairs will be iterated adaptively or just once with one initial guess
References madness::PNOParameters::adaptive_solver(), adaptive_solver(), madness::ALL_PAIRTYPE, madness::PNOParameters::econv_micro(), madness::PNOPairs::empty(), madness::EXOP_GUESSTYPE, madness::PNOParameters::guesstype(), initialize_pairs(), iterate_pairs_internal(), MADNESS_EXCEPTION, madness::PNOParameters::maxiter_micro(), madness::PNOParameters::maxrank(), madness::PNOPairs::maxranks_ij, msg, madness::PNOPairs::npairs, madness::CCMessenger::output(), PAIRLOOP, param, print_ranks(), madness::CCMessenger::section(), madness::PNOPairs::type, and madness::CCMessenger::warning().
Referenced by solve_cispd(), and solve_mp2().
PNOPairs madness::PNO::iterate_pairs_internal | ( | PNOPairs & | pairs, |
const int | maxiter, | ||
const double | econv | ||
) | const |
The actual function which interates the pairs Guess functions have to be created before
References std::abs(), madness::F12Potentials::acmos, madness::ALL_PAIRTYPE, canonicalize(), madness::PNOParameters::canonicalize_pno(), madness::PNOParameters::chunk(), madness::PNOPairs::cis, madness::CISPD_PAIRTYPE, compute_CIS_potentials(), compute_cispd_fluctuation_matrix(), compute_fluctuation_matrix(), dist(), std::distance(), madness::PNOPairs::energies, energy, madness::PNOPairs::extract(), F, f12, madness::PNOPairs::F_ij, madness::PNOParameters::freeze(), madness::PNOPairs::frozen_ij, madness::Nemo::get_calc(), madness::get_size(), ij(), PNOTensors::Tensor_IJ_IK< T >::is_initialized(), PNOTensors::Tensor_IJ_KJ< T >::is_initialized(), J, k, K, madness::PNOPairs::Kpno_ij, madness::CISData::Kx, MADNESS_ASSERT, MADNESS_EXCEPTION, madness::matrix_inner(), maxiter, madness::PNOParameters::maxiter(), madness::PNOPairs::maxranks_ij, madness::PNOPairs::meminfo, msg, madness::PNOPairs::name(), nemo, madness::PNOParameters::no_compute(), madness::PNOParameters::no_opt(), madness::PNOParameters::no_opt_in_first_iteration(), madness::F12Potentials::npairs(), madness::CISData::number, oit(), omega, madness::CISData::omega, orthonormalize_cholesky(), PAIRLOOP, param, pit(), madness::F12Potentials::pit(), pno_compress(), madness::PNOPairs::pno_ij, madness::MyTimer::print(), madness::print(), print_ranks(), madness::World::rank(), madness::PNOPairs::rdm_evals_ij, madness::PNOPairs::reassemble(), PNOTensors::Tensor_IJ_IK< T >::reset(), PNOTensors::Tensor_IJ_KJ< T >::reset(), madness::PNOParameters::restart(), madness::PNOPairs::S_ij_ik, madness::PNOPairs::S_ij_kj, save_pnos(), PNOTensors::Tensor_IJ_IK< T >::set(), PNOTensors::Tensor_IJ_KJ< T >::set(), madness::MyTimer::start(), madness::MyTimer::stop(), madness::CCMessenger::subsection(), T, madness::PNOPairs::t_ij, t_solve(), TIMER, madness::PairEnergies::total_energy(), madness::PNOParameters::tpno(), madness::PNOParameters::tpno_tight(), madness::ElectronPairIterator::tridx(), truncate_pairs(), madness::PNOPairs::type, update_fluctuation_potentials(), madness::PNOPairs::update_meminfo(), update_pno(), V, madness::PNOPairs::verify(), madness::CISData::Vx, madness::PNOPairs::W_ij, madness::PNOPairs::W_ij_i, madness::PNOPairs::W_ij_j, madness::wall_time(), world, and madness::CISData::x.
Referenced by adaptive_solver(), and iterate_pairs().
load PNOs from disc
References madness::load_function(), MADNESS_ASSERT, msg, name(), madness::PNOPairs::name(), pit(), madness::PNOPairs::pno_ij, and world.
Referenced by initialize_pairs().
std::vector< PNO::poperatorT > madness::PNO::make_bsh_operators | ( | World & | world, |
const tensorT & | evals | ||
) | const |
Convenience function to initialize all bsh operators.
References madness::BSHOperatorPtr3D(), madness::Nemo::get_calc(), MADNESS_EXCEPTION, nemo, madness::PNOParameters::op_thresh(), param, PROFILE_MEMBER_FUNC, madness::BaseTensor::size(), and world.
Referenced by update_pno().
|
inline |
References madness::PNOParameters::freeze(), madness::Nemo::get_calc(), nemo, and param.
|
inlinevirtual |
Implements madness::QCPropertyInterface.
Referenced by load_pnos(), print_ranks(), save_pnos(), and solve_cispd().
|
inline |
convenience
References madness::Nemo::get_calc(), and nemo.
Referenced by solve_cispd(), and solve_mp2().
|
inline |
convenience
References madness::PNOParameters::freeze(), madness::Nemo::get_calc(), nemo, and param.
Referenced by iterate_pairs_internal(), solve(), t_solve(), transform_pairs(), and update_pno().
convenience
References madness::PNOPairs::F_ij, madness::PNOPairs::frozen_ij, madness::FunctionDefaults< NDIM >::get_thresh(), madness::inverse(), madness::PNOPairs::Kpno_ij, L, madness::matrix_inner(), msg, madness::PNOPairs::name(), PAIRLOOP, madness::PNOPairs::pno_ij, madness::timer::print(), madness::rr_cholesky(), madness::PNOPairs::t_ij, TIMER, transform_pairs(), madness::transpose(), madness::PNOPairs::W_ij, madness::PNOPairs::W_ij_i, madness::PNOPairs::W_ij_j, and world.
Referenced by grow_rank(), initialize_pairs(), and iterate_pairs_internal().
|
inline |
References f12, and madness::F12Potentials::pit().
Referenced by compute_cispd_correction_es(), compute_cispd_correction_gs(), compute_cispd_f12_correction_es(), compute_cispd_f12_correction_gs(), initialize_pairs(), iterate_pairs_internal(), load_pnos(), pno_compress(), save_pnos(), solve(), solve_cispd(), solve_mp2(), t_solve(), transform_pairs(), and update_pno().
std::valarray< Tensor< double > > madness::PNO::pno_compress | ( | PNOPairs & | pairs, |
const double | tpno | ||
) | const |
Compress the PNOs -> lose all PNOs which eigenvalue is below tpno.
References madness::_(), madness::PNOPairs::frozen_ij, ij(), madness::inner(), k, madness::PNOPairs::maxranks_ij, msg, madness::PNOPairs::nocc, PNOTensors::ntri(), pit(), madness::PNOPairs::pno_ij, madness::timer::print(), madness::print(), madness::World::rank(), madness::syev(), T, madness::PNOPairs::t_ij, TIMER, transform_pairs(), and world.
Referenced by iterate_pairs_internal().
|
inlinestatic |
References param, madness::QCCalculationParametersBase::print(), madness::print(), and madness::Molecule::print_parameters().
Referenced by main().
void madness::PNO::print_ranks | ( | const PNOPairs & | pairs | ) | const |
Print information about the PNO rank of all pairs (i.e. the number of PNO functions)
References madness::PNOPairs::frozen_ij, msg, name(), madness::PNOPairs::name(), PAIRLOOP, madness::PNOPairs::pno_ij, and sum.
Referenced by iterate_pairs(), and iterate_pairs_internal().
void madness::PNO::save_pnos | ( | const PNOPairs & | pairs | ) | const |
save PNOs on disc
References name(), madness::PNOPairs::name(), pit(), madness::PNOPairs::pno_ij, madness::timer::print(), madness::save_function(), and TIMER.
Referenced by iterate_pairs_internal().
|
inlinevirtual |
Implements madness::QCPropertyInterface.
|
inline |
void madness::PNO::solve | ( | std::vector< PNOPairs > & | all_pairs | ) | const |
Solve for the PairType that is given.
References madness::F12Potentials::acmos, madness::PNOParameters::cispd(), madness::PNOParameters::debug(), f12, madness::PNOParameters::f12(), madness::MP2_PAIRTYPE, oit(), param, madness::F12Potentials::param, pit(), madness::QCCalculationParametersBase::print(), madness::print(), madness::World::rank(), madness::set_thresh(), solve_cispd(), solve_mp2(), madness::PNOParameters::thresh(), and world.
solve the PNO-CIS(D) equations
References madness::F12Potentials::acmos, madness::ALL_PAIRTYPE, madness::PNOPairs::cis, madness::PNOParameters::cispd(), madness::CISPD_PAIRTYPE, compute_cispd_correction_es(), compute_cispd_correction_gs(), compute_cispd_f12_correction_es(), compute_cispd_f12_correction_gs(), madness::PNOPairs::energies, f12, madness::PNOParameters::f12(), madness::PNOParameters::freeze(), get_average_rank(), iterate_pairs(), madness::load(), MADNESS_ASSERT, madness::MP2_PAIRTYPE, msg, name(), madness::PNOParameters::no_compute(), nocc(), madness::ElectronPairIterator::nocc(), madness::PNOPairs::npairs, omega, madness::CISData::omega, param, pit(), madness::PNOPairs::pno_ij, madness::MyTimer::print(), madness::F12Potentials::print_pair_energies(), madness::World::rank(), madness::CCMessenger::section(), solve_mp2(), madness::MyTimer::start(), madness::MyTimer::stop(), madness::PairEnergies::total_energy(), madness::PairEnergies::update(), and world.
Referenced by solve().
References madness::F12Potentials::compute_f12_energies(), madness::F12Potentials::compute_projected_f12_energies(), madness::PairEnergies::eijs, madness::PairEnergies::eijs_f12, madness::PairEnergies::eijt, madness::PairEnergies::eijt_f12, madness::PNOPairs::energies, madness::PairEnergies::energy, madness::PairEnergies::energy_f12, madness::F12Parameters::energytype(), f12, madness::PNOParameters::f12(), get_average_rank(), madness::HYLLERAAS_ENERGYTYPE, iterate_pairs(), madness::MP2_PAIRTYPE, msg, nocc(), madness::ElectronPairIterator::nocc(), madness::F12Potentials::npairs(), madness::PNOPairs::npairs, param, madness::F12Potentials::param, pit(), madness::PNOPairs::pno_ij, madness::MyTimer::print(), madness::F12Potentials::print_f12_energies(), madness::F12Potentials::print_pair_energies(), madness::PROJECTED_ENERGYTYPE, madness::World::rank(), madness::CCMessenger::section(), madness::MyTimer::start(), madness::MyTimer::stop(), madness::PNOPairs::type, madness::PairEnergies::update(), and world.
|
inline |
solve PNO-MP2 equations
References madness::F12Potentials::acmos, f12, madness::MP2_PAIRTYPE, and solve_mp2().
Referenced by solve(), solve_cispd(), and solve_mp2().
madness::PairEnergies madness::PNO::t_solve | ( | PNOPairs & | pairs, |
const Tensor< double > & | F_occ, | ||
const double | R_convergence_threshold = 1e-6 , |
||
const size_t | max_niter = 100 |
||
) | const |
solve the MP2 and CIS(D) amplitude equations
References a, b, madness::PNOPairs::cis, madness::CISPD_PAIRTYPE, compute_cispd_correction_es(), compute_projected_mp2_energies(), madness::PNOParameters::debug(), madness::XNonlinearSolver< T, C, Alloc >::do_print, madness::PairEnergies::eijs, madness::PairEnergies::eijt, madness::PNOPairs::energies, energy, madness::PairEnergies::energy, energytype(), f12, madness::PNOPairs::F_ij, madness::flatten(), madness::PNOPairs::frozen_ij, madness::HYLLERAAS_ENERGYTYPE, ij(), madness::inner(), k, madness::PNOParameters::kain(), madness::PNOParameters::kain_subspace(), MADNESS_ASSERT, madness::PNOParameters::maxiter_t(), madness::MP2_PAIRTYPE, msg, oit(), omega, madness::CISData::omega, PAIRLOOP, param, pit(), madness::F12Potentials::pit(), madness::PNOPairs::pno_ij, madness::print(), madness::F12Potentials::print_pair_energies(), madness::World::rank(), madness::PNOPairs::S_ij_ik, madness::PNOPairs::S_ij_kj, madness::XNonlinearSolver< T, C, Alloc >::set_maxsub(), madness::PNOPairs::t_ij, madness::ElectronPairIterator::tridx(), madness::PNOPairs::type, madness::PairEnergies::update(), madness::XNonlinearSolver< T, C, Alloc >::update(), madness::PNOPairs::W_ij, madness::CCMessenger::warning(), world, and madness::CISData::x.
Referenced by iterate_pairs_internal().
PNOPairs madness::PNO::transform_pairs | ( | PNOPairs & | pairs, |
const std::valarray< Tensor< double > > & | U_ij | ||
) | const |
transform the pnos and all the intermediates/potentials and matrices stored in the PNOPair structure
References madness::append(), madness::compress(), madness::PNOPairs::extract(), f12, madness::PNOPairs::F_ij, madness::FunctionDefaults< NDIM >::get_thresh(), ij(), madness::inner(), k, madness::PNOPairs::Kpno_ij, oit(), PAIRLOOP, pit(), madness::F12Potentials::pit(), madness::PNOPairs::pno_ij, madness::PNOPairs::S_ij_ik, madness::PNOPairs::S_ij_kj, madness::PNOPairs::t_ij, thresh, TIMER, madness::transform(), madness::ElectronPairIterator::tridx(), madness::truncate(), madness::PNOPairs::W_ij, madness::PNOPairs::W_ij_i, madness::PNOPairs::W_ij_j, and world.
Referenced by canonicalize(), orthonormalize_cholesky(), and pno_compress().
Truncate the ranks of pairs to the given maxrank.
References madness::PNOPairs::clear_intermediates(), madness::PNOPairs::maxranks_ij, msg, PAIRLOOP, and madness::PNOPairs::pno_ij.
Do MRA truncation on all pairs pairs are extracted into one large vector and then compressed and truncated this saves time since there are less fences
References madness::append(), madness::compress(), madness::PNOPairs::extract(), madness::PNOPairs::Kpno_ij, madness::PNOPairs::meminfo, msg, PAIRLOOP, param, madness::PNOPairs::pno_ij, madness::timer::print(), thresh, madness::PNOParameters::thresh(), TIMER, madness::truncate(), madness::PNOPairs::update_meminfo(), madness::PNOPairs::W_ij_i, madness::PNOPairs::W_ij_j, and world.
Referenced by iterate_pairs_internal().
void madness::PNO::update_fluctuation_potentials | ( | PNOPairs & | pairs | ) | const |
compute all fluctuation potentials and store them in the pair structure
References madness::CISPD_PAIRTYPE, compute_cispd_fluctuation_potential(), compute_fluctuation_potential(), madness::PNOPairs::frozen_ij, msg, madness::PNOPairs::name(), PAIRLOOP, madness::timer::print(), TIMER, and madness::PNOPairs::type.
Referenced by iterate_pairs_internal().
bool madness::PNO::update_pno | ( | PNOPairs & | pairs, |
const std::valarray< Tensor< double > > & | rdm_evals_ij, | ||
const Tensor< double > & | F_occ | ||
) | const |
Update all PNOs: i.e. compute Fock-residue potential (V+2J-K, K is reused if Kpno_ij intermeidate in pairs is initialized) and apply the Green's function The fluctuation potentials have to be precomputed and stored in the pairs structure
References a, madness::append(), madness::apply(), b, c, madness::PNOParameters::chunk(), madness::PNOPairs::cis, madness::CISPD_PAIRTYPE, madness::PNOPairs::clear_intermediates(), madness::PNOParameters::dconv(), madness::PNOParameters::debug(), dist(), std::distance(), e(), madness::PNOPairs::extract(), f12, madness::PNOPairs::F_ij, madness::PNOPairs::frozen_ij, PNOTensors::Tensor_IJ_IK< T >::get(), PNOTensors::Tensor_IJ_KJ< T >::get(), madness::get_size(), ij(), madness::inner(), PNOTensors::Tensor_IJ_IK< T >::is_initialized(), PNOTensors::Tensor_IJ_KJ< T >::is_initialized(), J, k, K, madness::PNOPairs::Kpno_ij, MADNESS_ASSERT, make_bsh_operators(), msg, madness::PNOPairs::name(), madness::PNOPairs::nocc, oit(), omega, madness::CISData::omega, PAIRLOOP, param, pit(), madness::F12Potentials::pit(), madness::PNOPairs::pno_ij, madness::timer::print(), madness::print(), Q, madness::World::rank(), madness::PNOPairs::reassemble(), PNOTensors::Tensor_IJ_IK< T >::reset(), PNOTensors::Tensor_IJ_KJ< T >::reset(), madness::PNOPairs::S_ij_ik, madness::PNOPairs::S_ij_kj, madness::scale(), PNOTensors::Tensor_IJ_IK< T >::set(), PNOTensors::Tensor_IJ_KJ< T >::set(), T, madness::PNOPairs::t_ij, TIMER, madness::ElectronPairIterator::tridx(), madness::truncate(), madness::ParametrizedExchange::type, madness::PNOPairs::type, V, madness::PNOPairs::W_ij, madness::PNOPairs::W_ij_i, madness::PNOPairs::W_ij_j, madness::wall_time(), and world.
Referenced by iterate_pairs_internal().
BasisFunctions madness::PNO::basis |
class which holds all methods to read or create guess functions for PNO or CABS
Referenced by grow_rank(), and guess_virtuals().
Fock<double,3> madness::PNO::F |
Referenced by iterate_pairs_internal().
F12Potentials madness::PNO::f12 |
Referenced by PNO(), compute_CIS_potentials(), compute_cispd_correction_es(), compute_cispd_correction_gs(), compute_cispd_f12_correction_es(), compute_cispd_f12_correction_gs(), compute_cispd_fluctuation_matrix(), compute_cispd_fluctuation_potential(), compute_fluctuation_matrix(), compute_fluctuation_potential(), compute_projected_mp2_energies(), compute_Vreg_aj_i(), compute_Vreg_aj_i(), compute_Vreg_aj_i_commutator_response(), compute_Vreg_aj_i_fock_residue(), energytype(), iterate_pairs_internal(), pit(), solve(), solve_cispd(), solve_mp2(), solve_mp2(), t_solve(), transform_pairs(), and update_pno().
Coulomb<double,3> madness::PNO::J |
Referenced by compute_CIS_potentials(), iterate_pairs_internal(), and update_pno().
ParametrizedExchange madness::PNO::K |
CCMessenger madness::PNO::msg |
Referenced by adaptive_solver(), compute_cispd_correction_es(), compute_cispd_correction_gs(), compute_cispd_f12_correction_es(), compute_cispd_f12_correction_gs(), freeze_insignificant_pairs(), grow_rank(), initialize_pairs(), iterate_pairs(), iterate_pairs_internal(), load_pnos(), orthonormalize_cholesky(), pno_compress(), print_ranks(), solve_cispd(), solve_mp2(), t_solve(), truncate_pair_ranks(), truncate_pairs(), update_fluctuation_potentials(), and update_pno().
Nemo madness::PNO::nemo |
Referenced by PNO(), grow_rank(), guess_virtuals(), initialize_pairs(), iterate_pairs_internal(), make_bsh_operators(), nact(), nocc(), and oit().
PNOParameters madness::PNO::param |
calculation parameters
Referenced by PNO(), adaptive_solver(), compute_CIS_potentials(), compute_cispd_f12_correction_gs(), compute_cispd_fluctuation_matrix(), compute_cispd_fluctuation_potential(), compute_fluctuation_matrix(), compute_fluctuation_potential(), compute_V_aj_i(), compute_Vreg_aj_i(), compute_Vreg_aj_i(), energytype(), freeze_insignificant_pairs(), grow_rank(), guess_virtuals(), initialize_pairs(), is_guess_from_scratch(), iterate_pairs(), iterate_pairs_internal(), make_bsh_operators(), nact(), oit(), print_parameters(), solve(), solve_cispd(), solve_mp2(), t_solve(), truncate_pairs(), and update_pno().
std::shared_ptr<real_convolution_3d> madness::PNO::poisson |
Referenced by PNO(), compute_CIS_potentials(), compute_cispd_correction_es(), compute_cispd_correction_gs(), compute_cispd_f12_correction_es(), compute_cispd_f12_correction_gs(), compute_cispd_fluctuation_matrix(), compute_fluctuation_matrix(), compute_projected_mp2_energies(), and compute_V_aj_i().
QProjector<double, 3> madness::PNO::Q |
Referenced by compute_CIS_potentials(), compute_cispd_f12_correction_es(), compute_cispd_f12_correction_gs(), compute_cispd_fluctuation_potential(), compute_fluctuation_potential(), compute_Vreg_aj_i(), compute_Vreg_aj_i_commutator_response(), compute_Vreg_aj_i_fock_residue(), grow_rank(), guess_virtuals(), initialize_pairs(), and update_pno().
Kinetic<double, 3> madness::PNO::T |
Referenced by iterate_pairs_internal(), pno_compress(), and update_pno().
Nuclear<double,3> madness::PNO::V |
Referenced by iterate_pairs_internal(), and update_pno().
World& madness::PNO::world |
Referenced by PNO(), adaptive_solver(), check_orthonormality(), compute_CIS_potentials(), compute_cispd_correction_es(), compute_cispd_correction_gs(), compute_cispd_f12_correction_es(), compute_cispd_f12_correction_gs(), compute_cispd_fluctuation_matrix(), compute_fluctuation_matrix(), compute_projected_mp2_energies(), compute_V_aj_i(), compute_Vreg_aj_i(), compute_Vreg_aj_i(), compute_Vreg_aj_i_commutator_response(), compute_Vreg_aj_i_fock_residue(), initialize_pairs(), iterate_pairs_internal(), load_pnos(), make_bsh_operators(), orthonormalize_cholesky(), pno_compress(), solve(), solve_cispd(), solve_mp2(), t_solve(), transform_pairs(), truncate_pairs(), and update_pno().