MADNESS
version 0.9
|
a class for computing the first order wave function and MP2 pair energies More...
#include <mp2.h>
Public Member Functions | |
MP2 (World &world, const std::string &input) | |
ctor More... | |
ElectronPair & | pair (const int i, const int j) |
return a reference to the electron pair for electrons i and j More... | |
const ElectronPair & | pair (const int i, const int j) const |
return a reference to the electron pair for electrons i and j More... | |
double | coord_chksum () const |
return a checksum for the geometry More... | |
double | value () |
return the molecular correlation energy energy (without the HF energy) More... | |
double | value (const Tensor< double > &x) |
return the molecular correlation energy as a function of the coordinates More... | |
void | print_info (World &world) const |
print the SCF parameters More... | |
HartreeFock & | get_hf () |
return the underlying HF reference More... | |
double | thresh () const |
return the accuracy More... | |
double | zeroth_order_energy (const int i, const int j) const |
return the 0th order energy of pair ij (= sum of orbital energies) More... | |
void | solve_residual_equations (ElectronPair &pair) const |
solve the residual equation for electron pair (i,j) More... | |
real_function_6d | make_Rpsi (const ElectronPair &pair) const |
void | increment (ElectronPair &pair, real_convolution_6d &green) |
compute increments: psi^1 = C + GV C + GVGV C + GVGVGV C + .. More... | |
real_function_6d | swap_particles (const real_function_6d &f) const |
swap particles 1 and 2 More... | |
double | asymmetry (const real_function_6d &f, const std::string s) const |
void | test (const std::string filename) |
double | compute_gQf (const int i, const int j, ElectronPair &pair) const |
compute the matrix element <ij | g12 Q12 f12 | phi^0> More... | |
Public Member Functions inherited from madness::OptimizationTargetInterface | |
virtual bool | provides_gradient () const |
Override this to return true if the derivative is implemented. More... | |
virtual Tensor< double > | gradient (const Tensor< double > &x) |
Should return the derivative of the function. More... | |
virtual void | value_and_gradient (const Tensor< double > &x, double &value, Tensor< double > &gradient) |
Reimplement if more efficient to evaluate both value and gradient in one call. More... | |
double | test_gradient (Tensor< double > &x, double value_precision, bool doprint=true) |
Numerical test of the derivative ... optionally prints to stdout, returns max abs error. More... | |
virtual | ~OptimizationTargetInterface () |
a class for computing the first order wave function and MP2 pair energies
madness::MP2::MP2 | ( | World & | world, |
const std::string & | input | ||
) |
ctor
References madness::WorldGopInterface::broadcast_serializable(), madness::CalculationParameters::econv, madness::f, madness::World::gop, madness::ElectronPair::load_pair(), madness::SCF::molecule, pair(), madness::SCF::param, madness::position_stream(), madness::print(), madness::Molecule::print(), print_info(), madness::World::rank(), madness::Molecule::set_eprec(), madness::SCF::set_protocol(), and thresh().
double madness::MP2::asymmetry | ( | const real_function_6d & | f, |
const std::string | s | ||
) | const |
double madness::MP2::compute_gQf | ( | const int | i, |
const int | j, | ||
ElectronPair & | pair | ||
) | const |
compute the matrix element <ij | g12 Q12 f12 | phi^0>
scales quartically. I think I can get this down to cubically by setting Q12 = (1 - O1)(1 - O2) = 1- O1(1 - 0.5 O2) - O2 (1 - 0.5 O1) as for the formulas cf the article mra_molecule
References a(), madness::ElectronPair::i, madness::inner(), madness::ElectronPair::j, k, madness::matrix_inner(), and madness::constants::pi.
|
inline |
return a checksum for the geometry
Referenced by value().
|
inline |
return the underlying HF reference
void madness::MP2::increment | ( | ElectronPair & | pair, |
real_convolution_6d & | green | ||
) |
compute increments: psi^1 = C + GV C + GVGV C + GVGVGV C + ..
for pre-optimization of the mp1 wave function no restart option here for now param[inout] pair the electron pair param[in] green the Green's function
apply the convolution
References madness::ElectronPair::function, madness::ElectronPair::i, madness::ElectronPair::iteration, madness::ElectronPair::j, madness::load_balance(), madness::Function< T, NDIM >::norm2(), madness::print(), madness::Function< T, NDIM >::print_size(), madness::World::rank(), madness::Function< T, NDIM >::scale(), madness::Function< T, NDIM >::thresh(), madness::Function< T, NDIM >::truncate(), and madness::wall_time().
real_function_6d madness::MP2::make_Rpsi | ( | const ElectronPair & | pair | ) | const |
|
inline |
|
inline |
return a reference to the electron pair for electrons i and j
[in] | i | index for electron 1 |
[in] | j | index for electron 2 |
void madness::MP2::print_info | ( | World & | world | ) | const |
print the SCF parameters
References madness::print(), and madness::World::rank().
Referenced by MP2().
void madness::MP2::solve_residual_equations | ( | ElectronPair & | pair | ) | const |
solve the residual equation for electron pair (i,j)
References madness::ElectronPair::constant_term, madness::ElectronPair::converged, energy(), madness::ElectronPair::function, madness::ElectronPair::i, madness::ElectronPair::iteration, madness::ElectronPair::j, madness::load_balance(), madness::Function< T, NDIM >::norm2(), madness::print(), madness::ElectronPair::print_energy(), madness::Function< T, NDIM >::print_size(), madness::World::rank(), madness::Function< T, NDIM >::scale(), sqrt(), madness::ElectronPair::store_pair(), madness::Function< T, NDIM >::thresh(), madness::truncate(), madness::Function< T, NDIM >::truncate(), madness::wall_time(), and zeroth_order_energy().
Referenced by value().
real_function_6d madness::MP2::swap_particles | ( | const real_function_6d & | f | ) | const |
swap particles 1 and 2
param[in] f a function of 2 particles f(1,2) return the input function with particles swapped g(1,2) = f(2,1)
References madness::mapdim().
Referenced by asymmetry(), and test().
void madness::MP2::test | ( | const std::string | filename | ) |
References madness::multiply(), R, swap_particles(), and madness::truncate().
|
inline |
return the accuracy
Referenced by MP2().
double madness::MP2::value | ( | ) |
return the molecular correlation energy energy (without the HF energy)
|
virtual |
return the molecular correlation energy as a function of the coordinates
Implements madness::OptimizationTargetInterface.
References madness::ElectronPair::converged, coord_chksum(), madness::ElectronPair::e_singlet, madness::ElectronPair::e_triplet, mpfr::fabs(), madness::ElectronPair::iteration, pair(), madness::print(), madness::World::rank(), madness::StrongOrthogonalityProjector< T, NDIM >::set_spaces(), and solve_residual_equations().
|
inline |
return the 0th order energy of pair ij (= sum of orbital energies)
References madness::HartreeFock< T, NDIM >::orbital_energy().
Referenced by solve_residual_equations().