MADNESS 0.10.1
madness::HartreeFock< T, NDIM > Class Template Reference

#include <hartreefock.h>

Inheritance diagram for madness::HartreeFock< T, NDIM >:
Collaboration diagram for madness::HartreeFock< T, NDIM >:

Public Types

typedef Function< T, NDIM > funcT

Public Member Functions

 HartreeFock (World &world, funcT V, std::vector< funcT > phis, std::vector< double > eigs, bool bCoulomb, bool bExchange, double thresh)
 HartreeFock (World &world, std::shared_ptr< Nemo > nemo)
virtual ~HartreeFock ()
funcT calculate_coulomb (funcT psi)
double calculate_coulomb_energy (const std::vector< funcT > &phis, const funcT &psi)
funcT calculate_exchange (funcT psi)
double calculate_exchange_energy (const std::vector< funcT > &phis, const funcT &psi)
double calculate_ke_sp (funcT psi)
double calculate_pe_sp (funcT psi)
double calculate_tot_coulomb_energy (const std::vector< funcT > &phis)
double calculate_tot_exchange_energy (const std::vector< funcT > &phis)
double calculate_tot_ke_sp (const std::vector< funcT > &phis)
double calculate_tot_pe_sp (const std::vector< funcT > &phis)
double coord_chksum () const
const std::vector< double > & eigs ()
SCF & get_calc ()
const SCF & get_calc () const
real_function_3d get_coulomb_potential () const
 return the Coulomb potential
double get_eig (int indx)
real_function_3d get_nuclear_potential () const
 return the nuclear potential
funcT get_phi (int indx)
World & get_world ()
Tensor< double > gradient (const Tensor< double > &x)
void hartree_fock (int maxits)
bool include_coulomb ()
bool include_exchange ()
virtual void iterateOutput (const std::vector< funcT > &phis, const std::vector< double > &eigs, const funcT &rho, const int &iter)
T matrix_element (const funcT &phii, const funcT &phij)
real_function_3d nemo (const int i) const
 return nemo i, which is the regularized orbital
std::vector< real_function_3d > nemos () const
 return nemo, which are the regularized orbitals
int nocc () const
 return the number of occupied orbitals
real_function_3d orbital (const int i) const
 return full orbital i, multiplied with the nuclear correlation factor
double orbital_energy (const int i) const
 return orbital energy i
std::vector< real_function_3d > orbitals () const
 return full orbitals, multiplied with the nuclear correlation factor
const std::vector< funcT > & phis ()
bool provides_gradient () const
real_function_3d R2orbital (const int i) const
 return orbital i, multiplied with the square nuclear correlation factor
std::vector< real_function_3d > R2orbitals () const
 return orbitals, multiplied with the square nuclear correlation factor
void reset_orbitals (const MolecularOrbitals< double, 3 > &mos)
double value ()
double value (const Tensor< double > &x)
Public Member Functions inherited from madness::IEigSolverObserver< T, NDIM >
virtual ~IEigSolverObserver ()
virtual void iterateOutput (const std::vector< funcT > &phis, const std::vector< double > &eigs, const Function< double, NDIM > &rho, const int &iter, bool periodic)=0

Public Attributes

std::shared_ptr< Nemo > nemo_ptr

Private Member Functions

double thresh ()
World & world ()

Private Attributes

bool _bCoulomb
bool _bExchange
EigSolver< T, NDIM > * _solver
double _thresh
funcT _V
World & _world
double coords_sum
real_function_3d coulomb
std::vector< real_function_3d > orbitals_
 reconstructed orbitals: R * phi, where R is the nuclear correlation factor
std::vector< real_function_3d > R2orbitals_
World & world

Member Typedef Documentation

◆ funcT

template<typename T, int NDIM>
typedef Function<T,NDIM> madness::HartreeFock< T, NDIM >::funcT

Constructor & Destructor Documentation

◆ HartreeFock() [1/2]

template<typename T, int NDIM>
madness::HartreeFock< T, NDIM >::HartreeFock ( World & world,
funcT V,
std::vector< funcT > phis,
std::vector< double > eigs,
bool bCoulomb,
bool bExchange,
double thresh )

◆ ~HartreeFock()

template<typename T, int NDIM>
madness::HartreeFock< T, NDIM >::~HartreeFock ( )
virtual

References _solver.

◆ HartreeFock() [2/2]

template<typename T, int NDIM>
madness::HartreeFock< T, NDIM >::HartreeFock ( World & world,
std::shared_ptr< Nemo > nemo )
inline

References coords_sum, nemo(), nemo_ptr, and world.

Member Function Documentation

◆ calculate_coulomb()

template<typename T, int NDIM>
funcT madness::HartreeFock< T, NDIM >::calculate_coulomb ( funcT psi)

References psi().

◆ calculate_coulomb_energy()

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::calculate_coulomb_energy ( const std::vector< funcT > & phis,
const funcT & psi )

◆ calculate_exchange()

template<typename T, int NDIM>
funcT madness::HartreeFock< T, NDIM >::calculate_exchange ( funcT psi)

References phis(), and psi().

◆ calculate_exchange_energy()

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::calculate_exchange_energy ( const std::vector< funcT > & phis,
const funcT & psi )

◆ calculate_ke_sp()

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::calculate_ke_sp ( funcT psi)

References axis, diff(), madness::inner(), and psi().

Referenced by calculate_tot_ke_sp().

◆ calculate_pe_sp()

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::calculate_pe_sp ( funcT psi)

References _V, and psi().

Referenced by calculate_tot_pe_sp().

◆ calculate_tot_coulomb_energy()

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::calculate_tot_coulomb_energy ( const std::vector< funcT > & phis)

References calculate_coulomb_energy(), phis(), pi, and psi().

Referenced by iterateOutput().

◆ calculate_tot_exchange_energy()

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::calculate_tot_exchange_energy ( const std::vector< funcT > & phis)

References calculate_exchange_energy(), phis(), pi, and psi().

Referenced by iterateOutput().

◆ calculate_tot_ke_sp()

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::calculate_tot_ke_sp ( const std::vector< funcT > & phis)

References calculate_ke_sp(), phis(), pi, and psi().

Referenced by iterateOutput().

◆ calculate_tot_pe_sp()

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::calculate_tot_pe_sp ( const std::vector< funcT > & phis)

References calculate_pe_sp(), phis(), pi, and psi().

Referenced by iterateOutput().

◆ coord_chksum()

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::coord_chksum ( ) const
inline

References coords_sum.

◆ eigs()

template<typename T, int NDIM>
const std::vector< double > & madness::HartreeFock< T, NDIM >::eigs ( )
inline

References _solver.

Referenced by HartreeFock(), and iterateOutput().

◆ get_calc() [1/2]

template<typename T, int NDIM>
SCF & madness::HartreeFock< T, NDIM >::get_calc ( )
inline

References nemo_ptr.

◆ get_calc() [2/2]

template<typename T, int NDIM>
const SCF & madness::HartreeFock< T, NDIM >::get_calc ( ) const
inline

References nemo_ptr.

◆ get_coulomb_potential()

template<typename T, int NDIM>
real_function_3d madness::HartreeFock< T, NDIM >::get_coulomb_potential ( ) const
inline

◆ get_eig()

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::get_eig ( int indx)
inline

References _solver.

◆ get_nuclear_potential()

template<typename T, int NDIM>
real_function_3d madness::HartreeFock< T, NDIM >::get_nuclear_potential ( ) const
inline

return the nuclear potential

References nemo_ptr.

◆ get_phi()

template<typename T, int NDIM>
funcT madness::HartreeFock< T, NDIM >::get_phi ( int indx)
inline

References _solver.

◆ get_world()

template<typename T, int NDIM>
World & madness::HartreeFock< T, NDIM >::get_world ( )
inline

References world.

◆ gradient()

template<typename T, int NDIM>
Tensor< double > madness::HartreeFock< T, NDIM >::gradient ( const Tensor< double > & x)
inline

References nemo_ptr, and value().

◆ hartree_fock()

template<typename T, int NDIM>
void madness::HartreeFock< T, NDIM >::hartree_fock ( int maxits)

References _solver.

◆ include_coulomb()

template<typename T, int NDIM>
bool madness::HartreeFock< T, NDIM >::include_coulomb ( )
inline

References _bCoulomb.

Referenced by calculate_coulomb_energy().

◆ include_exchange()

template<typename T, int NDIM>
bool madness::HartreeFock< T, NDIM >::include_exchange ( )
inline

References _bExchange.

Referenced by calculate_exchange_energy().

◆ iterateOutput()

template<typename T, int NDIM>
void madness::HartreeFock< T, NDIM >::iterateOutput ( const std::vector< funcT > & phis,
const std::vector< double > & eigs,
const funcT & rho,
const int & iter )
virtual

◆ matrix_element()

template<typename T, int NDIM>
T madness::HartreeFock< T, NDIM >::matrix_element ( const funcT & phii,
const funcT & phij )
inline

References _solver.

◆ nemo()

template<typename T, int NDIM>
real_function_3d madness::HartreeFock< T, NDIM >::nemo ( const int i) const
inline

return nemo i, which is the regularized orbital

note that nemo() and orbital() are the same if no nuclear correlation factor is used

References MADNESS_ASSERT, and nemo_ptr.

Referenced by HartreeFock().

◆ nemos()

template<typename T, int NDIM>
std::vector< real_function_3d > madness::HartreeFock< T, NDIM >::nemos ( ) const
inline

return nemo, which are the regularized orbitals

note that nemo() and orbital() are the same if no nuclear correlation factor is used

References MADNESS_ASSERT, and nemo_ptr.

Referenced by get_coulomb_potential().

◆ nocc()

template<typename T, int NDIM>
int madness::HartreeFock< T, NDIM >::nocc ( ) const
inline

return the number of occupied orbitals

References MADNESS_ASSERT, and nemo_ptr.

◆ orbital()

template<typename T, int NDIM>
real_function_3d madness::HartreeFock< T, NDIM >::orbital ( const int i) const
inline

return full orbital i, multiplied with the nuclear correlation factor

note that nemo() and orbital() are the same if no nuclear correlation factor is used

References MADNESS_ASSERT, nemo_ptr, and orbitals_.

◆ orbital_energy()

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::orbital_energy ( const int i) const
inline

return orbital energy i

References MADNESS_ASSERT, and nemo_ptr.

◆ orbitals()

template<typename T, int NDIM>
std::vector< real_function_3d > madness::HartreeFock< T, NDIM >::orbitals ( ) const
inline

return full orbitals, multiplied with the nuclear correlation factor

note that nemo() and orbital() are the same if no nuclear correlation factor is used

References MADNESS_ASSERT, nemo_ptr, and orbitals_.

◆ phis()

◆ provides_gradient()

template<typename T, int NDIM>
bool madness::HartreeFock< T, NDIM >::provides_gradient ( ) const
inline

◆ R2orbital()

template<typename T, int NDIM>
real_function_3d madness::HartreeFock< T, NDIM >::R2orbital ( const int i) const
inline

return orbital i, multiplied with the square nuclear correlation factor

note that nemo() and orbital() are the same if no nuclear correlation factor is used

References MADNESS_ASSERT, nemo_ptr, and R2orbitals_.

◆ R2orbitals()

template<typename T, int NDIM>
std::vector< real_function_3d > madness::HartreeFock< T, NDIM >::R2orbitals ( ) const
inline

return orbitals, multiplied with the square nuclear correlation factor

note that nemo() and orbital() are the same if no nuclear correlation factor is used

References MADNESS_ASSERT, nemo_ptr, and R2orbitals_.

◆ reset_orbitals()

template<typename T, int NDIM>
void madness::HartreeFock< T, NDIM >::reset_orbitals ( const MolecularOrbitals< double, 3 > & mos)
inline

◆ thresh()

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::thresh ( )
inlineprivate

References _thresh.

Referenced by HartreeFock().

◆ value() [1/2]

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::value ( )
inline

References nemo_ptr, and value().

Referenced by gradient(), and value().

◆ value() [2/2]

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::value ( const Tensor< double > & x)
inline

◆ world()

template<typename T, int NDIM>
World & madness::HartreeFock< T, NDIM >::world ( )
inlineprivate

References _world.

Member Data Documentation

◆ _bCoulomb

template<typename T, int NDIM>
bool madness::HartreeFock< T, NDIM >::_bCoulomb
private

Referenced by HartreeFock(), and include_coulomb().

◆ _bExchange

template<typename T, int NDIM>
bool madness::HartreeFock< T, NDIM >::_bExchange
private

Referenced by HartreeFock(), and include_exchange().

◆ _solver

template<typename T, int NDIM>
EigSolver<T,NDIM>* madness::HartreeFock< T, NDIM >::_solver
private

◆ _thresh

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::_thresh
private

◆ _V

template<typename T, int NDIM>
funcT madness::HartreeFock< T, NDIM >::_V
private

Referenced by HartreeFock(), and calculate_pe_sp().

◆ _world

template<typename T, int NDIM>
World& madness::HartreeFock< T, NDIM >::_world
private

◆ coords_sum

template<typename T, int NDIM>
double madness::HartreeFock< T, NDIM >::coords_sum
mutableprivate

Referenced by HartreeFock(), coord_chksum(), and value().

◆ coulomb

template<typename T, int NDIM>
real_function_3d madness::HartreeFock< T, NDIM >::coulomb
mutableprivate

Referenced by get_coulomb_potential().

◆ nemo_ptr

◆ orbitals_

template<typename T, int NDIM>
std::vector<real_function_3d> madness::HartreeFock< T, NDIM >::orbitals_
private

reconstructed orbitals: R * phi, where R is the nuclear correlation factor

Referenced by orbital(), orbitals(), and reset_orbitals().

◆ R2orbitals_

template<typename T, int NDIM>
std::vector<real_function_3d> madness::HartreeFock< T, NDIM >::R2orbitals_
private

R^2 * phi, where R is the nuclear correlation factor, corresponds to the bra space of the transformed operators

Referenced by R2orbital(), R2orbitals(), and reset_orbitals().

◆ world

template<typename T, int NDIM>
World& madness::HartreeFock< T, NDIM >::world
private

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