MADNESS 0.10.1
|
solve the hydrogen atom using the 4-component Dirac equation More...
Classes | |
struct | Ansatz0 |
struct | AnsatzBase |
class | DiracParameters |
struct | ExactSpinor |
struct | LProjector |
class | MatrixOperator |
class defining an operator in matrix form, fixed to size (4,4) More... | |
class | Metric |
class | MyDerivativeOperator< T, NDIM > |
struct | ncf |
struct | ncf_cusp |
struct | ncf_singularity |
struct | Omega |
struct | sgl_guess |
struct | Sigma_ncf_cusp |
struct | SphericalHarmonics |
returns the complex value of a given spherical harmonic More... | |
class | Spinor |
defines a 4-spinor More... | |
struct | spinorallocator |
struct | stepfunction |
struct | Xi |
following Dyall: p 104f More... | |
Enumerations | |
enum | Uplo { upper , lower } |
Functions | |
template<typename ansatzT > | |
Spinor | apply_bsh (ansatzT &ansatz, const MatrixOperator &Hd, const MatrixOperator &Hv, const MatrixOperator &metric, const Spinor &spinor, const double energy) |
void | apply_mask (std::vector< Spinor > &v) |
double | compute_electronic_energy (const double energy) |
double | compute_gamma (const double nuclear_charge) |
Spinor | copy (const Spinor &other) |
std::vector< Spinor > | copy (const std::vector< Spinor > &other) |
template<typename ansatzT > | |
void | eigenvector_test (World &world, const ansatzT ansatz, ExactSpinor es) |
double | generalized_laguerre (const double alpha, const long n, const double r) |
Tensor< double_complex > | get_fock_transformation (World &world, const std::vector< Spinor > &spinors, const Tensor< double_complex > &overlap, const Tensor< double_complex > &fock) |
double_complex | inner (const std::vector< Spinor > &bra, const std::vector< Spinor > ket) |
template<typename AnsatzT > | |
std::vector< Spinor > | iterate (const std::vector< Spinor > &input, const std::vector< double > energy, const AnsatzT &ansatz, const int maxiter) |
int | main (int argc, char *argv[]) |
MatrixOperator | make_alpha_p (World &world) |
MatrixOperator | make_Hd (World &world, const std::pair< double_complex, std::string > &ll, const std::pair< double_complex, std::string > &ss) |
this is c sigma p + beta m c^2 | |
MatrixOperator | make_Hdiag (World &world, const LocalPotentialOperator< double_complex, 3 > &V1) |
MatrixOperator | make_Hv (World &world, const double nuclear_charge) |
this is the nuclear potential on the diagonal | |
MatrixOperator | make_sp (World &world) |
returns a (2,2) matrix | |
double | mask1d (double x) |
double | mask3d (const Vector< double, 3 > &ruser) |
Tensor< double_complex > | matrix_inner (const std::vector< Spinor > &bra, const std::vector< Spinor > ket) |
MatrixOperator | moments (World &world, int axis, int order) |
template<typename T > | |
Spinor | operator* (const Spinor &arg, const T fac) |
template<typename T > | |
std::vector< Spinor > | operator* (const std::vector< Spinor > &arg, const T fac) |
template<typename T > | |
Spinor | operator* (const T fac, const Spinor &arg) |
std::vector< Spinor > | operator+= (std::vector< Spinor > &left, const std::vector< Spinor > &right) |
std::vector< Spinor > | operator- (const std::vector< Spinor > &left, const std::vector< Spinor > &right) |
std::vector< Spinor > | operator-= (std::vector< Spinor > &left, const std::vector< Spinor > &right) |
template<typename AnsatzT > | |
void | orthonormalize (std::vector< Spinor > &arg, const AnsatzT ansatz) |
std::vector< Spinor > | orthonormalize_fock (const std::vector< Spinor > &arg, const std::vector< Spinor > &bra, Tensor< double_complex > &fock) |
double | potn (double r) |
template<typename ansatzT > | |
void | run (World &world, ansatzT ansatz, const int nuclear_charge, const commandlineparser &parser, const int nstates) |
template<typename ansatzT > | |
std::vector< Spinor > | schrodinger2dirac (const std::vector< complex_function_3d > wf, const ansatzT &ansatz, const double nuclear_charge) |
void | show_norms (const Spinor &bra, const Spinor &ket, const std::string &name) |
std::vector< Spinor > | transform (World &world, const std::vector< Spinor > &v, const Tensor< double_complex > &c) |
Transforms a vector of functions according to new[i] = sum[j] old[j]*c[j,i]. | |
std::vector< Spinor > | truncate (std::vector< Spinor > arg) |
Variables | |
static double | alpha1 =constants::fine_structure_constant |
static double | clight =1.0/alpha1 |
static bool | debug =false |
static double | epsilon =1.e-12 |
static double | lo =1.e-7 |
real_function_3d | mask |
static double | nucexpt =3.0/nucrad |
static double | nucrad =1e-8 |
static double | shift =0.0 |
static bool | use_ble =false |
static bool | use_bsp =false |
solve the hydrogen atom using the 4-component Dirac equation
example usage: dirac-hatom –thresh=1.e-5 –k=7 –dirac="charge=100"
enum Uplo |
Spinor apply_bsh | ( | ansatzT & | ansatz, |
const MatrixOperator & | Hd, | ||
const MatrixOperator & | Hv, | ||
const MatrixOperator & | metric, | ||
const Spinor & | spinor, | ||
const double | energy | ||
) |
Truncate before undoing scaling
References alpha1, madness::apply(), clight, debug, energy, madness::g, lo, mu, madness::print(), show_norms(), madness::timer::tag(), Spinor::truncate(), madness::truncate(), and Spinor::world().
Referenced by iterate().
void apply_mask | ( | std::vector< Spinor > & | v | ) |
References madness::f, mask, and v.
double compute_electronic_energy | ( | const double | energy | ) |
double compute_gamma | ( | const double | nuclear_charge | ) |
References alpha1.
Referenced by Ansatz0::energy(), ExactSpinor::Fvalue(), main(), Ansatz0::make_guess(), and ExactSpinor::psivalue().
References Spinor::components, copy(), and Spinor::world().
Referenced by copy(), copy(), eigenvector_test(), iterate(), Ansatz0::make_bra(), Metric::operator()(), operator*(), Spinor::operator+(), Spinor::operator-(), and operator-().
void eigenvector_test | ( | World & | world, |
const ansatzT | ansatz, | ||
ExactSpinor | es | ||
) |
References alpha1, LProjector::analyze(), c, Spinor::components, copy(), diff(), ExactSpinor::filename(), ExactSpinor::get_energy(), ExactSpinor::get_spinor(), madness::inner(), madness::norm2s(), ExactSpinor::print(), madness::print(), Spinor::print_norms(), madness::real(), and ExactSpinor::set_ansatz().
double generalized_laguerre | ( | const double | alpha, |
const long | n, | ||
const double | r | ||
) |
References alpha, and MADNESS_EXCEPTION.
Referenced by ExactSpinor::Fvalue(), sgl_guess::operator()(), and ExactSpinor::psivalue().
Tensor< double_complex > get_fock_transformation | ( | World & | world, |
const std::vector< Spinor > & | spinors, | ||
const Tensor< double_complex > & | overlap, | ||
const Tensor< double_complex > & | fock | ||
) |
double_complex inner | ( | const std::vector< Spinor > & | bra, |
const std::vector< Spinor > | ket | ||
) |
References madness::inner().
std::vector< Spinor > iterate | ( | const std::vector< Spinor > & | input, |
const std::vector< double > | energy, | ||
const AnsatzT & | ansatz, | ||
const int | maxiter | ||
) |
References apply_bsh(), apply_mask(), madness::XNonlinearSolver< T, C, Alloc >::clear_subspace(), compute_electronic_energy(), madness::conj_transpose(), copy(), diff(), madness::XNonlinearSolver< T, C, Alloc >::do_print, energy, madness::FunctionDefaults< NDIM >::get_cell(), madness::inner(), lo, matrix_inner(), maxiter, madness::norm2(), orthonormalize(), orthonormalize_fock(), madness::plot_line(), madness::print_header2(), madness::print_header3(), madness::real(), residual(), madness::XNonlinearSolver< T, C, Alloc >::set_maxsub(), madness::World::size(), madness::truncate(), madness::XNonlinearSolver< T, C, Alloc >::update(), and madness::wall_time().
Referenced by run().
int main | ( | int | argc, |
char * | argv[] | ||
) |
References alpha, c, DiracParameters::charge(), compute_gamma(), energy_exact, madness::finalize(), madness::constants::fine_structure_constant, ExactSpinor::get_energy(), madness::initialize(), madness::commandlineparser::key_exists(), lo, DiracParameters::lo(), DiracParameters::nstates(), nucexpt, nucrad, DiracParameters::nucrad(), madness::QCCalculationParametersBase::print(), madness::print(), madness::print_centered(), madness::commandlineparser::print_map(), madness::info::print_revision_information(), madness::World::rank(), run(), madness::FunctionDefaults< NDIM >::set_cubic_cell(), madness::FunctionDefaults< NDIM >::set_k(), madness::FunctionDefaults< NDIM >::set_thresh(), madness::FunctionDefaults< NDIM >::set_truncate_mode(), madness::startup(), use_ble, DiracParameters::use_ble(), use_bsp, DiracParameters::use_bsp(), and madness::commandlineparser::value().
MatrixOperator make_alpha_p | ( | World & | world | ) |
References MatrixOperator::add_submatrix(), and make_sp().
Referenced by make_Hd(), and schrodinger2dirac().
MatrixOperator make_Hd | ( | World & | world, |
const std::pair< double_complex, std::string > & | ll, | ||
const std::pair< double_complex, std::string > & | ss | ||
) |
this is c sigma p + beta m c^2
[in] | ll | scalar on the LL (1,1) block |
[in] | ss | scalar on the SS (2,2) block |
References MatrixOperator::add_operator(), make_alpha_p(), V(), V1, and V2.
MatrixOperator make_Hdiag | ( | World & | world, |
const LocalPotentialOperator< double_complex, 3 > & | V1 | ||
) |
References MatrixOperator::add_operator(), and V1.
Referenced by make_Hv(), Ansatz0::R(), and Ansatz0::Rinv().
MatrixOperator make_Hv | ( | World & | world, |
const double | nuclear_charge | ||
) |
this is the nuclear potential on the diagonal
References make_Hdiag(), madness::Vector< T, N >::normf(), potn(), V(), and V1.
MatrixOperator make_sp | ( | World & | world | ) |
returns a (2,2) matrix
References MatrixOperator::add_operator(), alpha, c, madness::constants::fine_structure_constant, MADNESS_CHECK, use_ble, and use_bsp.
Referenced by make_alpha_p().
double mask1d | ( | double | x | ) |
Referenced by mask3d().
double mask3d | ( | const Vector< double, 3 > & | ruser | ) |
References lo, mask1d(), and madness::user_to_sim().
Referenced by run().
Tensor< double_complex > matrix_inner | ( | const std::vector< Spinor > & | bra, |
const std::vector< Spinor > | ket | ||
) |
References madness::inner().
Referenced by iterate(), MyDerivativeOperator< T, NDIM >::operator()(), orthonormalize(), and run().
MatrixOperator moments | ( | World & | world, |
int | axis, | ||
int | order | ||
) |
References MatrixOperator::add_operator(), axis, and m.
References madness::arg().
std::vector< Spinor > operator* | ( | const std::vector< Spinor > & | arg, |
const T | fac | ||
) |
References madness::arg(), and copy().
References madness::arg().
std::vector< Spinor > operator+= | ( | std::vector< Spinor > & | left, |
const std::vector< Spinor > & | right | ||
) |
std::vector< Spinor > operator- | ( | const std::vector< Spinor > & | left, |
const std::vector< Spinor > & | right | ||
) |
References copy().
std::vector< Spinor > operator-= | ( | std::vector< Spinor > & | left, |
const std::vector< Spinor > & | right | ||
) |
void orthonormalize | ( | std::vector< Spinor > & | arg, |
const AnsatzT | ansatz | ||
) |
References std::abs(), madness::arg(), matrix_inner(), Q(), madness::NemoBase::Q2(), transform(), and madness::truncate().
std::vector< Spinor > orthonormalize_fock | ( | const std::vector< Spinor > & | arg, |
const std::vector< Spinor > & | bra, | ||
Tensor< double_complex > & | fock | ||
) |
References madness::arg(), madness::conj(), get_fock_transformation(), madness::inner(), and transform().
Referenced by iterate().
double potn | ( | double | r | ) |
References e(), nucexpt, and madness::constants::pi.
Referenced by converge(), converge(), converge2s(), doit(), energy(), energy(), expV(), initial_loadbal(), loadbal(), loadbal(), main(), make_Hv(), preloadbal(), print_info(), print_info(), print_stats(), propagate(), propagate(), and propagate().
void run | ( | World & | world, |
ansatzT | ansatz, | ||
const int | nuclear_charge, | ||
const commandlineparser & | parser, | ||
const int | nstates | ||
) |
References apply_mask(), ExactSpinor::compute_F, ExactSpinor::cusp_a, ExactSpinor::get_energy(), guess(), iterate(), mask, mask3d(), matrix_inner(), orthonormalize(), madness::print(), madness::print_header2(), madness::Function< T, NDIM >::reconstruct(), schrodinger2dirac(), and madness::Function< T, NDIM >::truncate().
Referenced by main(), and madness::archive::ArchiveStoreImpl< ParallelOutputArchive< VectorOutputArchive >, WorldContainer< keyT, valueT > >::store().
std::vector< Spinor > schrodinger2dirac | ( | const std::vector< complex_function_3d > | wf, |
const ansatzT & | ansatz, | ||
const double | nuclear_charge | ||
) |
References alpha1, Spinor::components, make_alpha_p(), madness::truncate(), and w().
Referenced by run().
References Spinor::components, madness::inner(), m, madness::name(), madness::print(), and Spinor::world().
Referenced by apply_bsh().
std::vector< Spinor > transform | ( | World & | world, |
const std::vector< Spinor > & | v, | ||
const Tensor< double_complex > & | c | ||
) |
Transforms a vector of functions according to new[i] = sum[j] old[j]*c[j,i].
Uses sparsity in the transformation matrix — set small elements to zero to take advantage of this.
References c, madness::WorldGopInterface::fence(), madness::gaxpy(), madness::World::gop, m, MADNESS_ASSERT, PROFILE_BLOCK, and v.
Referenced by orthonormalize(), and orthonormalize_fock().
References a, and madness::arg().
|
static |
Referenced by ExactSpinor::ExactSpinor(), apply_bsh(), ExactSpinor::compute_C(), compute_electronic_energy(), ExactSpinor::compute_en(), ExactSpinor::compute_energy(), compute_gamma(), eigenvector_test(), Ansatz0::energy(), ExactSpinor::Fvalue(), main(), Ansatz0::make_Hd(), AnsatzBase::mu(), ExactSpinor::print(), ExactSpinor::psivalue(), and schrodinger2dirac().
|
static |
Referenced by apply_bsh(), and Spinor::truncate().
|
static |
Referenced by madness::GFit< T, NDIM >::GFit(), apply_bsh(), madness::WorldGopInterface::fence(), madness::WorldGopInterface::fence_impl(), madness::get_charge_from_file(), madness::CCTimer::info(), madness::CCConvolutionOperator< T, NDIM >::init_op(), madness::GTHPseudopotential< Q >::load_pseudo_from_file(), madness::AtomicBasisSet::modify_dmat_psp(), madness::FunctionDefaults< NDIM >::print(), AtomicBasisSet::read_file(), madness::AtomicBasisSet::read_file(), and madness::FunctionDefaults< NDIM >::set_defaults().
|
static |
Referenced by bshrel_fit(), bshrel_OMEGA(), bshrel_omega(), main(), main(), make_fit(), stepfunction::operator()(), and ncf_singularity::operator()().
|
static |
Referenced by madness::cartesian_grid< NDIM >::cartesian_grid(), madness::F12Potentials::F12Potentials(), madness::GFit< T, NDIM >::GFit(), MolecularNuclearPotentialFunctor2::MolecularNuclearPotentialFunctor2(), madness::SystolicMatrixAlgorithm< T >::SystolicMatrixAlgorithm(), madness::NuclearCorrelationFactor::U1X_functor::U1X_functor(), madness::NuclearCorrelationFactor::U1X_functor::U1X_functor(), madness::NuclearCorrelationFactor::U2X_functor::U2X_functor(), madness::adq(), madness::adq1(), APPLY(), madness::APPLY(), madness::SCF::APPLY(), apply_bsh(), madness::TDHF::apply_G(), madness::FunctionImpl< T, NDIM >::autorefine_square_test(), madness::GFit< T, NDIM >::bsh_fit(), madness::GFit< T, NDIM >::bsh_fit_ndim(), madness::GFit< T, NDIM >::BSHFit(), madness::BSHOperator(), madness::BSHOperator3D(), madness::BSHOperatorPtr(), madness::BSHOperatorPtr3D(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_batch_in_asymmetric_matrix(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_diagonal_batch_in_symmetric_matrix(), madness::MP2::compute_gQf(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_offdiagonal_batch_in_symmetric_matrix(), madness::GFit< T, NDIM >::CoulombFit(), madness::CoulombOperator(), madness::CoulombOperatorPtr(), cplxfunc0(), cplxfunc1(), cplxfunc2(), cplxvec0(), cplxvec1(), cplxvec2(), madness::do_adq(), Plotter::dolineplot(), Plotter::dolineplot(), draw_line(), madness::GFit< T, NDIM >::f12_fit(), madness::GFit< T, NDIM >::F12Fit(), madness::GFit< T, NDIM >::f12sq_fit(), madness::GFit< T, NDIM >::F12sqFit(), madness::GFit< T, NDIM >::F2GFit(), madness::F2GOperator(), madness::F2GOperatorPtr(), madness::GFit< T, NDIM >::FGFit(), madness::FGOperator(), madness::FGOperatorPtr(), madness::GFit< T, NDIM >::GaussFit(), madness::GaussOperator(), madness::GaussOperatorPtr(), madness::TDHF::TDHFParameters::get_ccc_parameters(), madness::GradBSHOperator(), GradBSHOperator_Joel(), madness::GradCoulombOperator(), madness::GradSlaterOperator(), madness::SCF::group_orbital_sets(), madness::DQueue< T >::grow(), madness::MP2::guess_mp1_3(), madness::TDHF::initialize(), madness::cartesian_grid< NDIM >::initialize(), iterate(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::K_large_memory(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::K_small_memory(), madness::trajectory< NDIM >::line_internal(), madness::trajectory< NDIM >::line_xyz(), madness::Localizer::localize_new(), logplot(), main(), main(), main(), make_bsh_operators(), madness::SeparatedConvolution< Q, NDIM >::make_coeff_for_operator(), make_k(), make_pts(), SurfaceMoleculeInteraction::make_surfcharge(), madness::SeparatedConvolution< Q, NDIM >::make_tt_representation(), mask3(), mask3(), mask3(), madness::mask3(), mask3d(), molresponseExchange(), madness::MP2::multiply_with_0th_order_Hamiltonian(), newK(), refop::operator()(), refop::operator()(), madness::orthonormalize_canonical(), madness::PeriodicBSHOp(), madness::PeriodicBSHOperator3D(), madness::PeriodicBSHOperatorPtr3D(), madness::PeriodicBSHOpPtr(), madness::PeriodicCoulombOp(), madness::PeriodicCoulombOpPtr(), madness::PeriodicHFExchangeOperator(), SurfaceMoleculeInteraction::perturbed_molecular_pot(), madness::XCfunctional::plot(), plot(), madness::plot_line(), madness::plot_line(), madness::plot_line(), madness::plot_line(), madness::plot_line(), madness::plot_line(), Calculation::plot_p(), madness::plot_plane(), madness::plot_plane(), madness::plot_plane(), Calculation::plot_z(), madness::PM_q(), madness::GFit< T, NDIM >::print_accuracy(), madness::GFit< T, NDIM >::prune_small_coefficients(), random_gaussian(), RandomGaussian(), realfunc0(), realfunc1(), realfunc2(), realvec0(), realvec1(), realvec2(), madness::Coulomb< T, NDIM >::reset_poisson_operator_ptr(), madness::SCF::rotate_subspace(), madness::Nemo::rotate_subspace(), madness::SCF::rotate_subspace(), run(), madness::FunctionDefaults< NDIM >::set_cubic_cell(), madness::FunctionDefaults< NDIM >::set_length_scale(), madness::FunctionFunctorInterface< T, NDIM >::set_length_scale(), set_poisson(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::set_poisson(), madness::Random::setstate(), madness::GFit< T, NDIM >::slater_fit(), madness::SlaterF12Operator(), madness::SlaterF12OperatorPtr(), madness::SlaterF12sqOperator(), madness::SlaterF12sqOperatorPtr(), madness::GFit< T, NDIM >::SlaterFit(), madness::SlaterOperator(), madness::SlaterOperatorPtr(), madness::SlaterOperatorPtr_ND(), solve(), madness::MP2::solve_coupled_equations(), madness::MP2::solve_residual_equations(), test(), test_apply_push_1d(), test_combined_operators(), test_exchange(), test_gconv(), test_gence2(), test_modified(), test_op(), test_per(), test_recursive_application(), madness::FunctionImpl< T, NDIM >::tnorm(), madness::FunctionImpl< T, NDIM >::tnorm(), and madness::FunctionImpl< T, NDIM >::tnorm().
real_function_3d mask |
Referenced by EmbeddedDirichlet::EmbeddedDirichlet(), madness::ThreadBinder::ThreadBinder(), apply_mask(), MolecularMaskBase::atomic_mask(), madness::ThreadBinder::bind(), MolecularMaskBase::cmask(), madness::LLRVDomainMask::dsurface(), iterate(), iterate(), main(), madness::smooth< T, NDIM >::make_inv_mask(), madness::smooth< T, NDIM >::make_mask(), madness::smooth< T, NDIM >::merge_functions(), mtxmq(), mtxmq(), mtxmq(), mtxmq(), madness::divide_add_interpolate::operator()(), run(), run(), madness::LLRVDomainMask::surface(), and V().
|
static |
Referenced by madness::SeparatedConvolution< Q, NDIM >::apply(), KPeriodicBSHOperator::apply(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::TDHF::apply_G(), compute_electronic_energy(), madness::Zcis::compute_residuals(), madness::ThreadPool::default_nthread(), madness::SeparatedConvolution< Q, NDIM >::estimate_costs(), main(), MiniDFT::make_bsh_operators(), make_bsh_operators(), madness::SeparatedConvolution< Q, NDIM >::make_tt_representation(), test_converged_function(), test_convergence(), update(), MiniDFT::update(), and update().