MADNESS 0.10.1
|
Solves the Hartree-Fock and MP2 equations for the helium atom. More...
#include <madness/mra/mra.h>
#include <madness/mra/operator.h>
#include <madness/mra/funcplot.h>
#include <madness/mra/lbdeux.h>
#include <iostream>
Classes | |
struct | LBCost |
struct | true_if_n_gt_op |
struct | true_op |
class | YetAnotherWrapperClass |
Functions | |
void | compute_energy (World &world, const real_function_3d &psi, const real_function_3d &pot, double &ke, double &pe) |
void | compute_energy (World &world, const real_function_6d &pair, const real_function_3d &pot1, const real_function_3d &pot2, double &ke, double &pe) |
static double | coul (const coord_6d &r) |
void | distances (const coord_6d &r, double &r1, double &r2, double &r12) |
static double | gauss_3d (const coord_3d &r) |
static double | gauss_6d (const coord_6d &r) |
static double | guess (const coord_3d &r) |
static double | h_orbital (const coord_3d &r) |
static double | he_correlation (const coord_6d &r) |
static double | he_orbital_3d (const coord_3d &r) |
static double | he_orbital_McQuarrie (const coord_3d &r) |
static double | he_orbitals (const coord_6d &r) |
static double | he_plus_orbital (const coord_3d &r) |
static double | helium_pot (const coord_6d &r) |
static double | HO_3d (const coord_3d &r) |
static double | HO_6d (const coord_6d &r) |
static double | HO_vphi_3d (const coord_3d &r) |
static double | hylleraas_3term (const coord_6d &r) |
void | iterate (World &world, const real_function_3d &V, real_function_3d &psi, double &eps) |
void | iterate (World &world, real_function_6d &Vpsi, real_function_6d &psi, double &eps) |
template<size_t NDIM> | |
void | load_function (World &world, Function< double, NDIM > &pair, const std::string name) |
int | main (int argc, char **argv) |
real_function_6d | multiply_by_V (const real_function_6d &psi) |
template<size_t NDIM> | |
void | save_function (World &world, const Function< double, NDIM > &pair, const std::string name) |
Key< 6 > | simpt2key (const Vector< double, 6 > &pt, Level n) |
Returns the box at level n that contains the given point in simulation coordinates. | |
void | solve (World &world, real_function_6d &pair, double &energy, long maxiter, double dcut) |
void | test_adaptive_tree (World &world, const bool restart, const std::string restartname) |
void | test_compress (World &world) |
void | test_modified (World &world) |
void | test_recursive_application (World &world) |
void | test_truncation (World &world) |
static double | u (double r, double c) |
static double | V (const coord_3d &r) |
static double | V (const coord_6d &r) |
static double | V_1 (const coord_6d &r) |
static double | V_times_phi (const coord_6d &r) |
static double | Z1 (const coord_3d &r) |
static double | Z2 (const coord_3d &r) |
Variables | |
static const double | dcut =1.e-5 |
static const double | r12cut =1.e-3 |
static const double | rcut =1.e-3 |
static const double | shift =0.0 |
Solves the Hartree-Fock and MP2 equations for the helium atom.
void compute_energy | ( | World & | world, |
const real_function_3d & | psi, | ||
const real_function_3d & | pot, | ||
double & | ke, | ||
double & | pe | ||
) |
References axis, madness::inner(), psi(), madness::World::rank(), and madness::wall_time().
Referenced by main(), solve(), test_adaptive_tree(), test_modified(), and test_recursive_application().
void compute_energy | ( | World & | world, |
const real_function_6d & | pair, | ||
const real_function_3d & | pot1, | ||
const real_function_3d & | pot2, | ||
double & | ke, | ||
double & | pe | ||
) |
References a, aa, axis, madness::copy(), e(), madness::Function< T, NDIM >::fill_tree(), madness::CompositeFactory< T, NDIM, MDIM >::g12(), madness::inner(), madness::CompositeFactory< T, NDIM, MDIM >::ket(), madness::Function< T, NDIM >::norm2(), op(), madness::print(), madness::World::rank(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle1(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle2(), and madness::wall_time().
|
static |
References distances(), r12cut, madness::r2(), and u().
Referenced by Calculation::make_reference().
void distances | ( | const coord_6d & | r, |
double & | r1, | ||
double & | r2, | ||
double & | r12 | ||
) |
References madness::r2().
|
static |
References norm(), and madness::r2().
Referenced by HO_vphi_3d(), and test_modified().
|
static |
References norm(), and madness::r2().
|
static |
References e().
Referenced by test_recursive_application().
|
static |
References he_orbitals(), and hylleraas_3term().
|
static |
References dcut.
Referenced by he_orbitals(), main(), test_adaptive_tree(), test_compress(), and test_truncation().
|
static |
References he_orbital_McQuarrie(), and madness::r2().
Referenced by he_correlation().
|
static |
References dcut, and madness::r2().
Referenced by YetAnotherWrapperClass::operator()(), and solve().
|
static |
Referenced by HO_vphi_3d().
|
static |
|
static |
References gauss_3d(), HO_3d(), and v.
|
static |
References dcut, and madness::r2().
Referenced by he_correlation(), and main().
void iterate | ( | World & | world, |
const real_function_3d & | V, | ||
real_function_3d & | psi, | ||
double & | eps | ||
) |
void iterate | ( | World & | world, |
real_function_6d & | Vpsi, | ||
real_function_6d & | psi, | ||
double & | eps | ||
) |
iterate the helium wavefunction
[in] | world | world |
[in] | Vpsi | -2.0*V*pair |
[in/out] | psi pair function | |
[in/out] | eps energy |
References madness::LoadBalanceDeux< NDIM >::add_tree(), e(), madness::inner(), madness::LoadBalanceDeux< NDIM >::load_balance(), MADNESS_ASSERT, norm(), madness::Function< T, NDIM >::norm2(), op(), madness::print(), madness::Function< T, NDIM >::print_size(), psi(), madness::World::rank(), madness::FunctionDefaults< NDIM >::redistribute(), madness::Function< T, NDIM >::scale(), madness::Function< T, NDIM >::truncate(), and madness::wall_time().
Referenced by solve(), and test_adaptive_tree().
void load_function | ( | World & | world, |
Function< double, NDIM > & | pair, | ||
const std::string | name | ||
) |
References madness::name().
Referenced by main(), and test_adaptive_tree().
int main | ( | int | argc, |
char ** | argv | ||
) |
References madness::_(), a, madness::LoadBalanceDeux< NDIM >::add_tree(), madness::arg(), axis, SafeMPI::COMM_WORLD, compute_energy(), madness::copy(), dcut, energy, madness::FunctionFactory< T, NDIM >::f(), madness::f, madness::WorldGopInterface::fence(), madness::filename, madness::finalize(), madness::CompositeFactory< T, NDIM, MDIM >::g12(), madness::Function< T, NDIM >::get_impl(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::World::gop, madness::hartree_product(), he_orbital_McQuarrie(), hylleraas_3term(), madness::initialize(), madness::inner(), k, madness::Function< T, NDIM >::k(), madness::CompositeFactory< T, NDIM, MDIM >::ket(), L, madness::LoadBalanceDeux< NDIM >::load_balance(), load_function(), MADNESS_EXCEPTION, norm(), madness::print(), madness::project(), madness::World::rank(), madness::FunctionDefaults< NDIM >::redistribute(), madness::Function< T, NDIM >::scale(), madness::FunctionDefaults< NDIM >::set_apply_randomize(), madness::FunctionDefaults< NDIM >::set_cubic_cell(), madness::FunctionDefaults< NDIM >::set_k(), madness::FunctionDefaults< NDIM >::set_tensor_type(), madness::FunctionDefaults< NDIM >::set_thresh(), madness::Function< T, NDIM >::size(), madness::World::size(), solve(), madness::startup(), madness::stringify(), test_adaptive_tree(), test_compress(), test_modified(), test_recursive_application(), test_truncation(), thresh, madness::Function< T, NDIM >::thresh(), madness::Function< T, NDIM >::tree_size(), madness::TT_2D, madness::TT_FULL, madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle1(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle2(), madness::wall_time(), and Z2().
real_function_6d multiply_by_V | ( | const real_function_6d & | psi | ) |
References madness::copy(), psi(), and madness::Function< T, NDIM >::unaryop().
void save_function | ( | World & | world, |
const Function< double, NDIM > & | pair, | ||
const std::string | name | ||
) |
References madness::FunctionDefaults< NDIM >::get_cell(), madness::name(), madness::print(), and madness::World::rank().
Referenced by solve(), and test_adaptive_tree().
Returns the box at level n that contains the given point in simulation coordinates.
References NDIM.
void solve | ( | World & | world, |
real_function_6d & | pair, | ||
double & | energy, | ||
long | maxiter, | ||
double | dcut | ||
) |
References madness::_(), compute_energy(), madness::copy(), dcut, energy, madness::filename, madness::CompositeFactory< T, NDIM, MDIM >::g12(), madness::FunctionDefaults< NDIM >::get_cell_width(), madness::Function< T, NDIM >::get_impl(), madness::FunctionDefaults< NDIM >::get_k(), madness::FunctionDefaults< NDIM >::get_thresh(), helium_pot(), iterate(), k, madness::CompositeFactory< T, NDIM, MDIM >::ket(), L, madness::trajectory< NDIM >::line2(), lo, MADNESS_EXCEPTION, maxiter, madness::name(), madness::print(), madness::World::rank(), madness::Function< T, NDIM >::reconstruct(), save_function(), madness::Function< T, NDIM >::size(), madness::stringify(), thresh, madness::Function< T, NDIM >::tree_size(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle1(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle2(), madness::wall_time(), and Z2().
Referenced by main().
void test_adaptive_tree | ( | World & | world, |
const bool | restart, | ||
const std::string | restartname | ||
) |
References compute_energy(), madness::copy(), dcut, e(), madness::filename, madness::Function< T, NDIM >::fill_tree(), madness::CompositeFactory< T, NDIM, MDIM >::g12(), madness::FunctionDefaults< NDIM >::get_k(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::hartree_product(), he_orbital_McQuarrie(), madness::inner(), iterate(), k, madness::CompositeFactory< T, NDIM, MDIM >::ket(), load_function(), norm(), madness::Function< T, NDIM >::norm2(), madness::norm2(), op(), madness::print(), madness::Function< T, NDIM >::print_size(), madness::World::rank(), save_function(), madness::Function< T, NDIM >::scale(), madness::stringify(), madness::symmetrize(), thresh, madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle1(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle2(), madness::wall_time(), and Z2().
Referenced by main().
void test_compress | ( | World & | world | ) |
References a, a1, a2, madness::copy(), e(), madness::Function< T, NDIM >::fill_tree(), madness::hartree_product(), he_orbital_McQuarrie(), madness::CompositeFactory< T, NDIM, MDIM >::ket(), op(), madness::print(), madness::Function< T, NDIM >::print_size(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle1(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle2(), and Z2().
Referenced by main().
void test_modified | ( | World & | world | ) |
References madness::BSHOperator3D(), compute_energy(), e(), energy, gauss_3d(), madness::FunctionDefaults< NDIM >::get_cell_width(), madness::inner(), L, madness::trajectory< NDIM >::line2(), lo, MADNESS_EXCEPTION, op(), madness::plot_along(), madness::print(), psi(), madness::World::rank(), madness::Function< T, NDIM >::scale(), madness::stringify(), madness::Function< T, NDIM >::truncate(), V(), madness::wall_time(), and Z1().
Referenced by main().
void test_recursive_application | ( | World & | world | ) |
References compute_energy(), madness::copy(), e(), madness::Function< T, NDIM >::fill_tree(), madness::FunctionDefaults< NDIM >::get_cell_width(), h_orbital(), madness::hartree_product(), madness::inner(), madness::CompositeFactory< T, NDIM, MDIM >::ket(), L, madness::trajectory< NDIM >::line2(), lo, MADNESS_EXCEPTION, madness::SeparatedConvolution< Q, NDIM >::modified(), norm(), madness::Function< T, NDIM >::norm2(), madness::norm2(), op(), madness::plot_along(), madness::print(), madness::World::rank(), madness::Function< T, NDIM >::scale(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle1(), and Z1().
Referenced by main().
void test_truncation | ( | World & | world | ) |
References a, a1, a2, madness::copy(), he_orbital_McQuarrie(), madness::print(), madness::Function< T, NDIM >::print_size(), and Z2().
Referenced by main().
|
static |
References c, e(), and madness::r2().
|
static |
Referenced by iterate(), YetAnotherWrapperClass::operator()(), and test_modified().
|
static |
References distances(), r12cut, madness::r2(), rcut, and u().
|
static |
References dcut, and madness::r2().
|
static |
References dcut, and madness::r2().
|
static |
References dcut.
Referenced by test_modified(), and test_recursive_application().
|
static |
References dcut.
Referenced by main(), YetAnotherWrapperClass::operator()(), solve(), test_adaptive_tree(), test_compress(), test_truncation(), and madness::GradientalGaussSlater::U2X_spherical().
|
static |
Referenced by he_orbital_3d(), he_orbital_McQuarrie(), helium_pot(), hylleraas_3term(), main(), solve(), test_adaptive_tree(), V_1(), V_times_phi(), Z1(), and Z2().