MADNESS 0.10.1
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
madness::NemoBase Class Reference

#include <nemo.h>

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

Public Member Functions

 NemoBase (World &w)
 
virtual ~NemoBase ()
 
bool check_convergence (const std::vector< double > energies, const std::vector< double > oldenergies, const double bsh_norm, const double delta_density, const CalculationParameters &param, const double econv, const double dconv) const
 
template<typename T , std::size_t NDIM>
Function< typename Tensor< T >::scalar_type, NDIMcompute_density (const std::vector< Function< T, NDIM > > nemo) const
 
Tensor< double > compute_gradient (const real_function_3d &rhonemo, const Molecule &molecule) const
 compute the nuclear gradients
 
template<typename T , std::size_t NDIM>
double compute_kinetic_energy (const std::vector< Function< T, NDIM > > &nemo) const
 compute kinetic energy as square of the "analytical" expectation value
 
template<typename T , std::size_t NDIM>
double compute_kinetic_energy1 (const std::vector< Function< T, NDIM > > &nemo) const
 compute kinetic energy as square of the "analytical" derivative of the orbitals
 
template<typename T , std::size_t NDIM>
double compute_kinetic_energy1a (const std::vector< Function< T, NDIM > > &nemo) const
 compute kinetic energy as square of the "analytical" derivative of the orbitals
 
template<typename T , std::size_t NDIM>
double compute_kinetic_energy2 (const std::vector< Function< T, NDIM > > &nemo) const
 compute kinetic energy as direct derivative of the orbitals (probably imprecise)
 
void construct_nuclear_correlation_factor (const Molecule &molecule, const std::shared_ptr< PotentialManager > pm, const std::pair< std::string, double > ncf_parameter)
 
std::shared_ptr< NuclearCorrelationFactorget_ncf_ptr () const
 create an instance of the derived object based on the input parameters
 
virtual void invalidate_factors_and_potentials ()
 
virtual std::shared_ptr< Fock< double, 3 > > make_fock_operator () const
 
virtual bool need_recompute_factors_and_potentials (const double thresh) const
 
template<typename T , std::size_t NDIM>
void orthonormalize (std::vector< Function< T, NDIM > > &nemo, const Function< double, NDIM > metric=Function< double, NDIM >(), const double trantol=FunctionDefaults< NDIM >::get_thresh() *0.01) const
 orthonormalize the vectors
 
- Public Member Functions inherited from madness::MolecularOptimizationTargetInterface
virtual Moleculemolecule ()
 return the molecule of the target
 
- Public Member Functions inherited from madness::OptimizationTargetInterface
virtual ~OptimizationTargetInterface ()
 
virtual Tensor< double > gradient (const Tensor< double > &x)
 Should return the derivative of the function.
 
virtual bool provides_gradient () const
 Override this to return true if the derivative is implemented.
 
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.
 
virtual double value (const Tensor< double > &x)=0
 Should return the value of the objective function.
 
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.
 

Static Public Member Functions

template<typename T , std::size_t NDIM>
static void normalize (std::vector< Function< T, NDIM > > &nemo, const Function< double, NDIM > metric=Function< double, NDIM >())
 normalize the nemos
 
template<typename T >
static Tensor< TQ2 (const Tensor< T > &s)
 

Public Attributes

std::shared_ptr< NuclearCorrelationFactorncf
 the nuclear correlation factor
 
real_function_3d R
 the nuclear correlation factor
 
real_function_3d R_square
 the square of the nuclear correlation factor
 
Worldworld
 

Constructor & Destructor Documentation

◆ NemoBase()

madness::NemoBase::NemoBase ( World w)
inline

◆ ~NemoBase()

virtual madness::NemoBase::~NemoBase ( )
inlinevirtual

Member Function Documentation

◆ check_convergence()

bool madness::NemoBase::check_convergence ( const std::vector< double >  energies,
const std::vector< double >  oldenergies,
const double  bsh_norm,
const double  delta_density,
const CalculationParameters param,
const double  econv,
const double  dconv 
) const
inline

◆ compute_density()

template<typename T , std::size_t NDIM>
Function< typename Tensor< T >::scalar_type, NDIM > madness::NemoBase::compute_density ( const std::vector< Function< T, NDIM > >  nemo) const
inline

◆ compute_gradient()

Tensor< double > madness::NemoBase::compute_gradient ( const real_function_3d rhonemo,
const Molecule molecule 
) const

◆ compute_kinetic_energy()

template<typename T , std::size_t NDIM>
double madness::NemoBase::compute_kinetic_energy ( const std::vector< Function< T, NDIM > > &  nemo) const
inline

compute kinetic energy as square of the "analytical" expectation value

Parameters
[in]thenemo orbitals F
Returns
T = 1/2 \sum_i \int R^2 U1.U1 F^2 + 2 R^2 U1.grad(F) + R^2 grad(F)^2

References madness::apply(), axis, madness::dot(), madness::WorldGopInterface::fence(), madness::World::gop, madness::inner(), NDIM, R_square, and world.

Referenced by madness::OEP::compute_and_print_final_energies(), madness::OEP::compute_energy(), madness::Nemo::compute_energy_regularized(), and madness::OEP::selftest().

◆ compute_kinetic_energy1()

template<typename T , std::size_t NDIM>
double madness::NemoBase::compute_kinetic_energy1 ( const std::vector< Function< T, NDIM > > &  nemo) const
inline

compute kinetic energy as square of the "analytical" derivative of the orbitals

Parameters
[in]thenemo orbitals F
Returns
T = 1/2 \sum_i || grad(R)*F_i + R*grad(F_i)||^2

References madness::timer::end(), madness::grad(), madness::norm2(), R, and world.

◆ compute_kinetic_energy1a()

template<typename T , std::size_t NDIM>
double madness::NemoBase::compute_kinetic_energy1a ( const std::vector< Function< T, NDIM > > &  nemo) const
inline

compute kinetic energy as square of the "analytical" derivative of the orbitals

Parameters
[in]thenemo orbitals F
Returns
T = 1/2 \sum_i || grad(R)*F_i + R*grad(F_i)||^2

References madness::apply(), madness::timer::end(), madness::grad(), NDIM, madness::norm2(), R, and world.

◆ compute_kinetic_energy2()

template<typename T , std::size_t NDIM>
double madness::NemoBase::compute_kinetic_energy2 ( const std::vector< Function< T, NDIM > > &  nemo) const
inline

compute kinetic energy as direct derivative of the orbitals (probably imprecise)

Parameters
[in]thenemo orbitals F
Returns
T = 1/2 \sum_i || grad(R*F_i)||^2

References madness::apply(), axis, madness::inner(), R, sum, and world.

◆ construct_nuclear_correlation_factor()

void madness::NemoBase::construct_nuclear_correlation_factor ( const Molecule molecule,
const std::shared_ptr< PotentialManager pm,
const std::pair< std::string, double >  ncf_parameter 
)
inline

◆ get_ncf_ptr()

std::shared_ptr< NuclearCorrelationFactor > madness::NemoBase::get_ncf_ptr ( ) const
inline

create an instance of the derived object based on the input parameters

References ncf.

Referenced by test_ethylene(), and test_ne_boys().

◆ invalidate_factors_and_potentials()

virtual void madness::NemoBase::invalidate_factors_and_potentials ( )
inlinevirtual

◆ make_fock_operator()

virtual std::shared_ptr< Fock< double, 3 > > madness::NemoBase::make_fock_operator ( ) const
inlinevirtual

Reimplemented in madness::Nemo, and madness::OEP.

References MADNESS_EXCEPTION.

Referenced by madness::Fock< T, NDIM >::Fock().

◆ need_recompute_factors_and_potentials()

virtual bool madness::NemoBase::need_recompute_factors_and_potentials ( const double  thresh) const
inlinevirtual

◆ normalize()

template<typename T , std::size_t NDIM>
static void madness::NemoBase::normalize ( std::vector< Function< T, NDIM > > &  nemo,
const Function< double, NDIM metric = Function<double,NDIM>() 
)
inlinestatic

◆ orthonormalize()

template<typename T , std::size_t NDIM>
void madness::NemoBase::orthonormalize ( std::vector< Function< T, NDIM > > &  nemo,
const Function< double, NDIM metric = Function<double,NDIM>(),
const double  trantol = FunctionDefaults<NDIM>::get_thresh()*0.01 
) const
inline

◆ Q2()

template<typename T >
static Tensor< T > madness::NemoBase::Q2 ( const Tensor< T > &  s)
inlinestatic

Member Data Documentation

◆ ncf

std::shared_ptr<NuclearCorrelationFactor> madness::NemoBase::ncf

◆ R

real_function_3d madness::NemoBase::R

◆ R_square

real_function_3d madness::NemoBase::R_square

◆ world

World& madness::NemoBase::world

Referenced by madness::Nemo::Nemo(), madness::OEP::OEP(), madness::Znemo::potentials::potentials(), madness::Znemo::Znemo(), madness::OEP::analyze(), madness::Znemo::analyze(), madness::Znemo::canonicalize(), check_convergence(), madness::Nemo::compute_all_cphf(), madness::OEP::compute_and_print_final_energies(), madness::OEP::compute_coulomb_potential(), madness::Nemo::compute_cphf_parallel_term(), madness::Znemo::compute_current_density(), madness::OEP::compute_dcep_correction(), compute_density(), madness::OEP::compute_density(), madness::OEP::compute_E_first(), madness::Znemo::compute_energy(), madness::OEP::compute_energy(), madness::Nemo::compute_energy_regularized(), madness::OEP::compute_energy_weighted_density_local(), madness::OEP::compute_exchange_energy_conv(), madness::OEP::compute_exchange_energy_vir(), madness::OEP::compute_exchange_potential(), madness::OEP::compute_fock_diagonal_elements(), madness::Nemo::compute_fock_matrix(), compute_gradient(), compute_kinetic_energy(), compute_kinetic_energy1(), compute_kinetic_energy1a(), compute_kinetic_energy2(), madness::Znemo::compute_kinetic_momentum(), madness::Znemo::compute_linear_moment(), madness::Znemo::compute_magnetic_potential_expectation(), madness::Znemo::compute_magnetic_vector_potential(), madness::OEP::compute_mrks_correction(), madness::Nemo::compute_nemo_potentials(), madness::OEP::compute_nemo_potentials(), madness::Znemo::compute_nemo_spin_density(), madness::OEP::compute_ocep_correction(), madness::OEP::compute_Pauli_kinetic_density(), madness::Znemo::compute_potentials(), madness::Znemo::compute_residuals(), madness::OEP::compute_slater_potential(), madness::OEP::compute_total_kinetic_density(), madness::Znemo::compute_vmat(), construct_nuclear_correlation_factor(), madness::Znemo::custom_guess(), madness::Znemo::do_step_restriction(), madness::Znemo::get_initial_orbitals(), madness::Nemo::gradient(), madness::Znemo::gradient(), madness::Znemo::hcore_guess(), madness::Nemo::hessian(), madness::Znemo::iterate(), madness::OEP::iterate(), madness::Nemo::kinetic_energy_potential(), madness::Nemo::load_function(), madness::OEP::load_restartdata(), madness::Nemo::localize(), madness::Nemo::make_cphf_constant_term(), madness::Nemo::make_ddensity(), madness::Nemo::make_density(), madness::Nemo::make_density(), madness::Nemo::make_fock_operator(), madness::OEP::make_fock_operator(), madness::Nemo::make_incomplete_hessian(), madness::Nemo::make_incomplete_hessian_response_part(), madness::Nemo::make_laplacian_density(), madness::Nemo::make_plots(), madness::Nemo::make_sigma(), madness::Znemo::normalize(), normalize(), madness::Znemo::orthonormalize(), orthonormalize(), madness::Znemo::read_complex_guess(), madness::Znemo::read_explicit_guess_functions(), madness::Znemo::read_real_guess(), madness::Znemo::read_reference(), madness::Znemo::read_restartaodata(), madness::Znemo::recompute_factors_and_potentials(), madness::OEP::recompute_HF(), madness::Znemo::rotate_subspace(), madness::Nemo::rotate_subspace(), madness::Nemo::save_function(), madness::Znemo::save_orbitals(), madness::OEP::save_restartdata(), madness::OEP::selftest(), madness::Nemo::set_protocol(), madness::Nemo::solve(), madness::OEP::solve(), madness::Nemo::solve_cphf(), madness::Znemo::test_compute_current_density(), madness::Znemo::test_landau_wave_function(), madness::Znemo::test_U_potentials(), madness::Znemo::potentials::transform(), madness::Nemo::value(), and madness::OEP::value().


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