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 More... | |
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 More... | |
MatrixOperator | make_sp (World &world) |
returns a (2,2) matrix More... | |
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]. More... | |
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, madness::copy(), and Spinor::world().
References madness::copy().
void eigenvector_test | ( | World & | world, |
const ansatzT | ansatz, | ||
ExactSpinor | es | ||
) |
References alpha1, LProjector::analyze(), c, Spinor::components, madness::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(), madness::copy(), diff(), madness::XNonlinearSolver< T, C, Alloc >::do_print, energy, madness::FunctionDefaults< NDIM >::get_cell(), madness::inner(), lo, madness::matrix_inner(), maxiter, madness::norm2(), madness::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.
Referenced by Ansatz0::make_Hd().
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.
Referenced by Ansatz0::make_Hv().
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().
MatrixOperator moments | ( | World & | world, |
int | axis, | ||
int | order | ||
) |
References MatrixOperator::add_operator(), axis, m, and pow().
References madness::arg().
std::vector<Spinor> operator* | ( | const std::vector< Spinor > & | arg, |
const T | fac | ||
) |
References madness::arg(), and madness::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 madness::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(), madness::matrix_inner(), max, Q(), madness::NemoBase::Q2(), madness::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 madness::transform().
Referenced by iterate().
double potn | ( | double | r | ) |
References e(), nucexpt, and madness::constants::pi.
Referenced by converge(), converge2s(), doit(), energy(), expV(), initial_loadbal(), loadbal(), main(), make_Hv(), preloadbal(), print_info(), print_stats(), 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(), madness::matrix_inner(), madness::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.
References a, and madness::arg().
Referenced by DipoleVector::DipoleVector(), NuclearVector::NuclearVector(), madness::XCOperator< T, NDIM >::apply_xc_kernel(), madness::XCOperator< T, NDIM >::compute_xc_energy(), DF::exchange(), DF::iterate(), molresponseExchange(), madness::XCOperator< T, NDIM >::prep_xc_args(), madness::XCOperator< T, NDIM >::prep_xc_args_response(), and vector_to_PQ().
|
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::Cloud::do_load(), madness::WorldGopInterface::fence(), madness::WorldGopInterface::fence_impl(), madness::get_charge_from_file(), madness::CCTimer::info(), madness::CCConvolutionOperator< T, NDIM >::init_op(), madness::Cloud::load_from_cache(), madness::GTHPseudopotential< Q >::load_pseudo_from_file(), madness::Cloud::load_tuple(), madness::AtomicBasisSet::modify_dmat_psp(), madness::FunctionDefaults< NDIM >::print(), AtomicBasisSet::read_file(), madness::AtomicBasisSet::read_file(), madness::Cloud::set_debug(), madness::FunctionDefaults< NDIM >::set_defaults(), and madness::Cloud::store_other().
|
static |
Referenced by 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::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::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(), 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::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(), 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(), madness::mask3(), mask3d(), molresponseExchange(), newK(), 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(), Calculation::plot_p(), 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::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(), test(), test_apply_push_1d(), test_combined_operators(), test_exchange(), test_gconv(), test_gence2(), test_modified(), test_op(), test_per(), test_recursive_application(), and madness::FunctionImpl< T, NDIM >::tnorm().
real_function_3d mask |
Referenced by EmbeddedDirichlet::EmbeddedDirichlet(), madness::ThreadBinder::ThreadBinder(), apply_mask(), madness::ThreadBinder::bind(), iterate(), main(), madness::smooth< T, NDIM >::make_inv_mask(), madness::smooth< T, NDIM >::make_mask(), madness::smooth< T, NDIM >::merge_functions(), mtxmq(), madness::divide_add_interpolate::operator()(), run(), and Calculation::set_protocol().
|
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(), TestPmap::owner(), test_converged_function(), test_convergence(), update(), and MiniDFT::update().