MADNESS  version 0.9
Classes | Public Member Functions | List of all members
madness::MP2 Class Reference

a class for computing the first order wave function and MP2 pair energies More...

#include <mp2.h>

Inheritance diagram for madness::MP2:
Inheritance graph
[legend]
Collaboration diagram for madness::MP2:
Collaboration graph
[legend]

Public Member Functions

 MP2 (World &world, const std::string &input)
 ctor More...
 
ElectronPairpair (const int i, const int j)
 return a reference to the electron pair for electrons i and j More...
 
const ElectronPairpair (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...
 
HartreeFockget_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 ()
 

Detailed Description

a class for computing the first order wave function and MP2 pair energies

Constructor & Destructor Documentation

madness::MP2::MP2 ( World world,
const std::string &  input 
)

Member Function Documentation

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

Returns
the energy <ij | g Q f | kl>

References a(), madness::ElectronPair::i, madness::inner(), madness::ElectronPair::j, k, madness::matrix_inner(), and madness::constants::pi.

double madness::MP2::coord_chksum ( ) const
inline

return a checksum for the geometry

Referenced by value().

HartreeFock& madness::MP2::get_hf ( )
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
ElectronPair& madness::MP2::pair ( const int  i,
const int  j 
)
inline

return a reference to the electron pair for electrons i and j

Parameters
[in]iindex for electron 1
[in]jindex for electron 2
Returns
reference to the electron pair ij

Referenced by MP2(), and value().

const ElectronPair& madness::MP2::pair ( const int  i,
const int  j 
) const
inline

return a reference to the electron pair for electrons i and j

Parameters
[in]iindex for electron 1
[in]jindex for electron 2
Returns
reference to the electron pair ij
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
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)
double madness::MP2::thresh ( ) const
inline

return the accuracy

Referenced by MP2().

double madness::MP2::value ( )

return the molecular correlation energy energy (without the HF energy)

double madness::MP2::value ( const Tensor< double > &  x)
virtual
double madness::MP2::zeroth_order_energy ( const int  i,
const int  j 
) const
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().


The documentation for this class was generated from the following files: