MADNESS 0.10.1
madness::NemoBase Class Reference

#include <nemo.h>

Inheritance diagram for madness::NemoBase:
Collaboration diagram for madness::NemoBase:

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, NDIM > compute_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< NuclearCorrelationFactor > get_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
template<typename T, std::size_t NDIM>
void reproject_mos (std::vector< Function< T, NDIM > > &nemo, const Function< double, NDIM > &metric) const
 reproject a set of nemos onto the current k and thresh
Public Member Functions inherited from madness::MolecularOptimizationTargetInterface
virtual Molecule & molecule ()
 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< T > Q2 (const Tensor< T > &s)

Public Attributes

std::shared_ptr< NuclearCorrelationFactor > ncf
 the nuclear correlation factor
real_function_3d R
 the nuclear correlation factor
real_function_3d R_square
 the square of the nuclear correlation factor
real_function_3d U1dotU1
 U1.U1 = |grad R|^2 / R^2, by which the physical kinetic energy exceeds the regularized one.
World & world

Constructor & Destructor Documentation

◆ NemoBase()

madness::NemoBase::NemoBase ( World & w)
inlineexplicit

◆ ~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::free_space_derivative(), madness::inner(), ncf, NDIM, madness::nemo, R_square, U1dotU1, and world.

Referenced by madness::OEP::compute_and_print_final_energies(), madness::OEP::compute_energy(), 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(), ncf, madness::nemo, 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(), madness::gradient_operator(), ncf, NDIM, madness::nemo, 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::free_space_derivative(), madness::inner(), madness::nemo, R, sum, and world.

◆ construct_nuclear_correlation_factor()

◆ 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.

◆ 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< double, 3 >::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>
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>
Tensor< T > madness::NemoBase::Q2 ( const Tensor< T > & s)
inlinestatic

◆ reproject_mos()

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

reproject a set of nemos onto the current k and thresh

The counterpart of SCF::project (chem/SCF.cc) for regularized orbitals. SCF::project must NOT be used here: it normalizes with the plain L2 metric, while nemos are normalized against R^2. Without this, a protocol step that changes k leaves the nemos at the old polynomial order while FunctionDefaults, R and the potentials have already moved to the new one.

References madness::FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::thresh, madness::FunctionDefaults< NDIM >::get_k(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::nemo, normalize(), madness::print(), madness::project(), madness::reconstruct(), madness::set_thresh(), madness::truncate(), and world.

Referenced by madness::Nemo::set_protocol().

Member Data Documentation

◆ ncf

◆ R

◆ R_square

◆ U1dotU1

real_function_3d madness::NemoBase::U1dotU1

U1.U1 = |grad R|^2 / R^2, by which the physical kinetic energy exceeds the regularized one.

Referenced by madness::Nemo::compute_energy_regularized(), compute_kinetic_energy(), construct_nuclear_correlation_factor(), invalidate_factors_and_potentials(), and need_recompute_factors_and_potentials().

◆ world

World& madness::NemoBase::world

Referenced by madness::Nemo::Nemo(), madness::Nemo::Nemo(), NemoBase(), madness::Nemo::NemoCalculationParameters::NemoCalculationParameters(), madness::OEP::OEP(), madness::OEP::OEP(), madness::Znemo::potentials::potentials(), madness::Znemo::Znemo(), madness::Nemo::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::OEP::compute_energy(), madness::Znemo::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::OEP::compute_nemo_potentials(), madness::Nemo::compute_nemo_potentials_impl(), 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::OEP::iterate(), madness::Znemo::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_plots(), madness::Nemo::make_sigma(), normalize(), madness::Znemo::normalize(), orthonormalize(), madness::Znemo::orthonormalize(), madness::Nemo::population_analysis(), madness::Nemo::purify_hessian(), 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(), reproject_mos(), madness::Znemo::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: