|
MADNESS 0.10.1
|
The main class of the periodic DFT solver. More...
#include <solver.h>

Classes | |
| struct | GuessDensity |
Public Member Functions | |
| Solver (World &world, const rfunctionT &vnucrhon, const vecfuncT &phis, const std::vector< T > &eigs, const ElectronicStructureParams ¶ms, MolecularEntity mentity) | |
| Solver (World &world, const std::string &filename) | |
| Solver (World &world, rfunctionT vnucrhon, vecfuncT phis, std::vector< T > eigs, std::vector< KPoint > kpoints, std::vector< double > occs, ElectronicStructureParams params, MolecularEntity mentity) | |
| Solver (World &world, rfunctionT vnucrhon, vecfuncT phisa, vecfuncT phisb, std::vector< T > eigsa, std::vector< T > eigsb, ElectronicStructureParams params, MolecularEntity mentity) | |
| virtual | ~Solver () |
| void | apply_hf_exchange (vecfuncT &phisa, vecfuncT &phisb, vecfuncT &funcsa, vecfuncT &funcsb) |
| void | apply_hf_exchange3 (vecfuncT &phisa, vecfuncT &phisb, vecfuncT &funcsa, vecfuncT &funcsb, double &xc) |
| void | apply_hf_exchange4 (vecfuncT &phisa, vecfuncT &phisb, vecfuncT &funcsa, vecfuncT &funcsb, double &xc) |
| void | apply_potential (vecfuncT &pfuncsa, vecfuncT &pfuncsb, const vecfuncT &phisa, const vecfuncT &phisb, const rfunctionT &rhoa, const rfunctionT &rhob, const rfunctionT &rho) |
| Applies the LDA effective potential to each orbital. Currently only lda and spin-polarized is not implemented. | |
| tensorT | build_fock_matrix (vecfuncT &psi, vecfuncT &vpsi, KPoint kpoint) |
| double | calculate_kinetic_energy () |
| vecfuncT | compute_residual (const vecfuncT &awfs, const vecfuncT &bwfs) |
| rfunctionT | compute_rho (const vecfuncT &phis, std::vector< KPoint > kpoints, std::vector< double > occs) |
| rfunctionT | compute_rho_slow (const vecfuncT &phis, std::vector< KPoint > kpoints, std::vector< double > occs) |
| Compute the electronic density for either a molecular or periodic system. | |
| ctensorT | csqrt (const ctensorT &s, double tol=1e-8) |
| Computes matrix square root (not used any more?). | |
| void | do_rhs (vecfuncT &wf, vecfuncT &vwf, std::vector< KPoint > kpoints, std::vector< T > &alpha, std::vector< double > &eigs) |
| void | do_rhs_simple (vecfuncT &wf, vecfuncT &vwf, std::vector< KPoint > kpoints, std::vector< T > &alpha, std::vector< double > &eigs) |
| void | END_TIMER (World &world, const char *msg) |
| KPoint | find_kpt_from_orb (unsigned int idx) |
| void | fix_occupations (const std::vector< T > &eps, std::vector< double > &occs) |
| std::vector< KPoint > | genkmesh (unsigned int ngridk0, unsigned ngridk1, unsigned int ngridk2, double koffset0, double koffset1, double koffset2, double R) |
| void | gram_schmidt (vecfuncT &f, KPoint kpoint) |
| void | init (const std::string &filename) |
| void | initial_guess () |
| Initializes alpha and beta mos, occupation numbers, eigenvalues. | |
| void | load_orbitals () |
| std::vector< poperatorT > | make_bsh_operators (const std::vector< T > &eigs) |
| tensor_complex | make_kinetic_matrix (World &world, const vector_complex_function_3d &v, const KPoint &k) |
| rfunctionT | make_lda_potential (World &world, const rfunctionT &arho, const rfunctionT &brho, const rfunctionT &adelrhosq, const rfunctionT &bdelrhosq) |
| void | make_nuclear_charge_density_impl () |
| void | make_nuclear_potential () |
| void | make_nuclear_potential_impl () |
| ctensorT | matrix_exponential (const ctensorT &A) |
| void | orthonormalize (vecfuncT &wf, KPoint kpoint) |
| void | print_fock_matrix_eigs (const vecfuncT &wf, const vecfuncT &vwf, KPoint kpoint) |
| void | print_potential_matrix_eigs (const vecfuncT &wf, const vecfuncT &vwf) |
| template<typename Q> | |
| void | print_tensor2d (ostream &os, Tensor< Q > t) |
| vecfuncT | project_ao_basis (World &world, KPoint kpt) |
| tensorT | Q3 (const tensorT &s) |
| Given overlap matrix, return rotation with 3rd order error to orthonormalize the vectors. | |
| void | reproject () |
| void | save_orbitals () |
| void | set_occs2 (const std::vector< KPoint > &kpoints, const std::vector< double > &eigsa, const std::vector< double > &eigsb, std::vector< double > &occsa, std::vector< double > &occsb) |
| void | solve () |
| void | START_TIMER (World &world) |
| void | step_restriction (vecfuncT &owfs, vecfuncT &nwfs, int aorb) |
| template<typename Q> | |
| void | test_periodicity (const Function< Q, 3 > &f) |
| void | update_orbitals (vecfuncT &awfs, vecfuncT &bwfs, std::vector< KPoint > kpoints) |
Public Attributes | |
| double | sss |
| double | ttt |
Private Types | |
| typedef Tensor< std::complex< double > > | ctensorT |
| typedef FunctionFactory< valueT, NDIM > | factoryT |
| typedef Function< valueT, NDIM > | functionT |
| typedef Vector< double, NDIM > | kvecT |
| typedef SeparatedConvolution< T, 3 > | operatorT |
| typedef std::pair< vecfuncT, vecfuncT > | pairvecfuncT |
| typedef std::shared_ptr< operatorT> | poperatorT |
| typedef FunctionFactory< T, NDIM > | rfactoryT |
| typedef Function< T, NDIM > | rfunctionT |
| typedef Tensor< double > | rtensorT |
| typedef std::vector< pairvecfuncT > | subspaceT |
| typedef Tensor< valueT > | tensorT |
| typedef std::complex< T > | valueT |
| typedef std::vector< functionT > | vecfuncT |
| typedef std::vector< subspaceT > | vecsubspaceT |
| typedef std::vector< tensorT > | vectensorT |
Private Attributes | |
| AtomicBasisSet | _aobasis |
| cvecfuncT | _aobasisf |
| SeparatedConvolution< T, NDIM > * | _cop |
| std::ofstream | _eigF |
| std::vector< T > | _eigsa |
| std::vector< T > | _eigsb |
| int | _it |
| std::ofstream | _kmeshF |
| std::vector< KPoint > | _kpoints |
| std::ofstream | _matF |
| double | _maxthresh |
| MolecularEntity | _mentity |
| int | _nao |
| std::vector< double > | _occsa |
| std::vector< double > | _occsb |
| std::ofstream | _outputF |
| ElectronicStructureParams | _params |
| vecfuncT | _phisa |
| vecfuncT | _phisb |
| double | _residual |
| rfunctionT | _rho |
| rfunctionT | _rhoa |
| rfunctionT | _rhob |
| Subspace< T, NDIM > * | _subspace |
| rfunctionT | _vnuc |
| rfunctionT | _vnucrhon |
| World & | _world |
The main class of the periodic DFT solver.
![\[z = frac{x}{1 - y^2}
\]](form_90.png)
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inline |
|
inline |
References _cop, _eigsa, _eigsb, _mentity, _params, _phisa, _phisb, _residual, _vnuc, _vnucrhon, _world, madness::apply(), madness::copy(), madness::CoulombOperatorPtr(), madness::ElectronicStructureParams::ispotential, madness::ElectronicStructureParams::lo, and madness::ElectronicStructureParams::thresh.
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
References _cop, madness::apply(), madness::inner(), madness::real(), madness::Function< T, NDIM >::truncate(), and xc.
Referenced by apply_potential().
|
inline |
References _params, _world, madness::apply(), madness::conj(), find_kpt_from_orb(), madness::FunctionFactory< T, NDIM >::functor(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::inner(), madness::PeriodicHFExchangeOperator(), q(), madness::real(), madness::Function< T, NDIM >::truncate(), and xc.
Referenced by apply_potential().
|
inline |
References _outputF, _params, _world, madness::conj_transpose(), END_TIMER, kinetic_energy_matrix(), make_kinetic_matrix(), madness::matrix_inner(), potential(), madness::print(), psi(), and START_TIMER.
Referenced by do_rhs(), and do_rhs_simple().
|
inline |
References _params, _phisa, _phisb, _world, madness::inner(), and madness::real().
Referenced by apply_potential().
|
inline |
References _outputF, _params, _phisa, _phisb, _residual, _world, madness::norm2s(), and madness::sub().
Referenced by update_orbitals().
|
inline |
|
inline |
Computes matrix square root (not used any more?).
References c, e(), m, MADNESS_ASSERT, MADNESS_EXCEPTION, madness::print(), and madness::syev().
Referenced by orthonormalize().
|
inline |
References madness::_(), _eigF, _it, _params, _world, madness::Tensor< T >::absmax(), alpha, madness::arg(), build_fock_matrix(), c, madness::conj_transpose(), madness::copy(), e(), eshift, madness::FunctionDefaults< NDIM >::thresh, madness::gaxpy(), madness::inner(), is_equal(), k0, k1, k2, matrix_exponential(), madness::matrix_inner(), max, madness::phase(), madness::print(), q(), madness::real(), madness::rot(), madness::sygv(), madness::transform(), and madness::zero_functions_compressed().
|
inline |
References madness::_(), _eigF, _it, _params, _world, madness::Tensor< T >::absmax(), alpha, madness::arg(), build_fock_matrix(), madness::conj_transpose(), madness::copy(), e(), eshift, madness::FunctionDefaults< NDIM >::thresh, madness::FunctionDefaults< NDIM >::get_thresh(), madness::inner(), is_equal(), k0, k1, k2, matrix_exponential(), madness::matrix_inner(), max, madness::phase(), madness::print(), q(), madness::real(), madness::rot(), madness::sygv(), madness::transform(), and madness::zero_functions_compressed().
Referenced by solve().
|
inline |
References madness::cpu_time(), madness::World::rank(), sss, ttt, and madness::wall_time().
|
inline |
References _kpoints, k1, and MADNESS_EXCEPTION.
Referenced by apply_hf_exchange4().
|
inline |
References _kpoints, _params, e(), and madness::stheta_fd().
|
inline |
References madness::FunctionDefaults< NDIM >::k, k0, k1, k2, madness::constants::pi, R, and weight().
Referenced by init().
|
inline |
References madness::f, madness::inner(), and madness::norm2().
Referenced by load_orbitals(), and update_orbitals().
|
inline |
References _aobasis, _eigF, _kmeshF, _kpoints, _matF, _mentity, _outputF, _params, _world, madness::filename, genkmesh(), load_orbitals(), madness::constants::pi, madness::FunctionDefaults< NDIM >::set_cubic_cell(), madness::FunctionDefaults< NDIM >::set_k(), madness::FunctionDefaults< NDIM >::set_thresh(), and madness::KPoint::weight().
Referenced by Solver().
|
inline |
Initializes alpha and beta mos, occupation numbers, eigenvalues.
References madness::_(), _aobasis, _eigsa, _eigsb, _kpoints, _mentity, _nao, _occsa, _occsb, _params, _phisa, _phisb, _rhoa, _rhob, _vnuc, _world, madness::ao, madness::apply(), c, madness::compress(), madness::conj_transpose(), madness::CoulombOperatorPtr(), madness::BaseTensor::dim(), e(), END_TIMER, madness::FunctionDefaults< NDIM >::get_cell(), madness::FunctionDefaults< NDIM >::get_cell_width(), kinetic_energy_matrix_slow(), MADNESS_EXCEPTION, make_lda_potential(), madness::matrix_inner(), madness::normalize(), oi, op(), madness::plot_line(), madness::plotdx(), potential(), madness::print(), project_ao_basis(), madness::real(), madness::Function< T, NDIM >::reconstruct(), madness::reconstruct(), madness::Function< T, NDIM >::scale(), START_TIMER, madness::syev(), madness::sygv(), madness::Function< T, NDIM >::trace(), madness::transform(), and madness::truncate().
Referenced by Solver().
|
inline |
References _eigsa, _eigsb, _kpoints, _occsa, _occsb, _params, _phisa, _phisb, _world, madness::FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::thresh, madness::FunctionDefaults< NDIM >::get_k(), madness::FunctionDefaults< NDIM >::get_thresh(), gram_schmidt(), madness::project(), and madness::reconstruct().
Referenced by init().
|
inline |
References _params, _world, madness::BSHOperatorPtr3D(), and madness::FunctionDefaults< NDIM >::get_thresh().
Referenced by solve().
|
inline |
References madness::apply(), f1, f2, f3, madness::FunctionDefaults< NDIM >::k, I, kx, ky, kz, madness::matrix_inner(), and v.
Referenced by build_fock_matrix().
|
inline |
References madness::copy(), ldaop(), and madness::Function< T, NDIM >::unaryop().
Referenced by initial_guess().
|
inline |
|
inline |
|
inline |
References _mentity, _params, _vnuc, _vnucrhon, _world, and madness::copy().
Referenced by make_nuclear_potential().
|
inline |
References madness::BaseTensor::dim(), e(), madness::FunctionDefaults< NDIM >::k, madness::inner(), MADNESS_ASSERT, madness::Tensor< T >::normf(), madness::scale(), and madness::Tensor< T >::scale().
Referenced by do_rhs(), and do_rhs_simple().
|
inline |
References _params, _world, csqrt(), madness::matrix_inner(), madness::print(), and madness::transform().
|
inline |
References _outputF, _params, _world, c, madness::conj_transpose(), e(), END_TIMER, kinetic_energy_matrix(), madness::matrix_inner(), potential(), madness::print(), START_TIMER, madness::syev(), and madness::sygv().
Referenced by solve().
|
inline |
References _world, madness::BaseTensor::dim(), END_TIMER, madness::matrix_inner(), potential(), madness::print(), START_TIMER, and madness::sygv().
|
inline |
References madness::BaseTensor::dim().
|
inline |
References _aobasis, _mentity, _params, madness::ao, madness::WorldGopInterface::fence(), madness::FunctionFactory< T, NDIM >::functor(), madness::World::gop, madness::FunctionFactory< T, NDIM >::truncate_mode(), and madness::FunctionFactory< T, NDIM >::truncate_on_project().
Referenced by initial_guess().
|
inline |
Given overlap matrix, return rotation with 3rd order error to orthonormalize the vectors.
References madness::inner(), and Q().
|
inline |
References _cop, _outputF, _params, _phisa, _phisb, _subspace, _world, madness::FunctionDefaults< NDIM >::get_k(), madness::FunctionDefaults< NDIM >::get_thresh(), make_nuclear_potential(), madness::normalize(), madness::project(), madness::reconstruct(), madness::FunctionDefaults< NDIM >::set_k(), madness::FunctionDefaults< NDIM >::set_thresh(), and madness::truncate().
Referenced by solve().
|
inline |
|
inline |
References _params, _world, madness::FunctionDefaults< NDIM >::k, and MADNESS_ASSERT.
Referenced by solve().
|
inline |
References _eigsa, _eigsb, _it, _kpoints, _occsa, _occsb, _outputF, _params, _phisa, _phisb, _residual, _rho, _rhoa, _rhob, _world, alpha, madness::apply(), apply_potential(), compute_rho(), madness::BaseTensor::dim(), do_rhs_simple(), END_TIMER, madness::FunctionDefaults< NDIM >::get_cell(), k0, k1, k2, make_bsh_operators(), madness::matrix_inner(), madness::norm2s(), madness::plotdx(), madness::print(), print_fock_matrix_eigs(), reproject(), save_orbitals(), madness::scale(), set_occs2(), START_TIMER, madness::syev(), madness::truncate(), update_orbitals(), and madness::zero_functions().
Referenced by main(), and test_hf_he().
|
inline |
References madness::cpu_time(), madness::WorldGopInterface::fence(), madness::World::gop, sss, ttt, and madness::wall_time().
|
inline |
References _it, _params, _world, madness::gaxpy(), and madness::print().
Referenced by update_orbitals().
|
inline |
References _params, std::abs(), delta, e(), madness::f, npts, and madness::r2().
|
inline |
References _params, _phisa, _phisb, _subspace, _world, compute_residual(), gram_schmidt(), madness::norm2(), step_restriction(), and madness::truncate().
Referenced by solve().
|
private |
Referenced by init(), initial_guess(), and project_ao_basis().
|
private |
|
private |
|
private |
Referenced by ~Solver(), do_rhs(), do_rhs_simple(), and init().
|
private |
Referenced by Solver(), Solver(), Solver(), initial_guess(), load_orbitals(), and solve().
|
private |
Referenced by Solver(), Solver(), Solver(), initial_guess(), load_orbitals(), and solve().
|
private |
Referenced by do_rhs(), do_rhs_simple(), solve(), and step_restriction().
|
private |
Referenced by init().
|
private |
Referenced by Solver(), apply_hf_exchange(), find_kpt_from_orb(), fix_occupations(), init(), initial_guess(), load_orbitals(), save_orbitals(), and solve().
|
private |
|
private |
|
private |
Referenced by Solver(), Solver(), Solver(), init(), initial_guess(), make_nuclear_charge_density_impl(), make_nuclear_potential_impl(), and project_ao_basis().
|
private |
Referenced by initial_guess().
|
private |
Referenced by Solver(), initial_guess(), load_orbitals(), and solve().
|
private |
Referenced by Solver(), initial_guess(), load_orbitals(), and solve().
|
private |
Referenced by ~Solver(), build_fock_matrix(), compute_residual(), compute_rho(), compute_rho_slow(), init(), print_fock_matrix_eigs(), reproject(), and solve().
|
private |
Referenced by Solver(), Solver(), Solver(), Solver(), apply_hf_exchange(), apply_hf_exchange4(), apply_potential(), build_fock_matrix(), calculate_kinetic_energy(), compute_residual(), do_rhs(), do_rhs_simple(), fix_occupations(), init(), initial_guess(), load_orbitals(), make_bsh_operators(), make_nuclear_charge_density_impl(), make_nuclear_potential(), make_nuclear_potential_impl(), orthonormalize(), print_fock_matrix_eigs(), project_ao_basis(), reproject(), save_orbitals(), set_occs2(), solve(), step_restriction(), test_periodicity(), and update_orbitals().
|
private |
|
private |
|
private |
|
private |
Referenced by solve().
|
private |
Referenced by initial_guess(), and solve().
|
private |
Referenced by initial_guess(), and solve().
|
private |
Referenced by Solver(), ~Solver(), reproject(), and update_orbitals().
|
private |
Referenced by Solver(), apply_potential(), initial_guess(), make_nuclear_charge_density_impl(), and make_nuclear_potential_impl().
|
private |
Referenced by Solver(), Solver(), Solver(), apply_potential(), make_nuclear_charge_density_impl(), and make_nuclear_potential_impl().
|
private |
Referenced by Solver(), Solver(), Solver(), Solver(), apply_hf_exchange(), apply_hf_exchange4(), apply_potential(), build_fock_matrix(), calculate_kinetic_energy(), compute_residual(), compute_rho(), compute_rho_slow(), do_rhs(), do_rhs_simple(), init(), initial_guess(), load_orbitals(), make_bsh_operators(), make_nuclear_charge_density_impl(), make_nuclear_potential(), make_nuclear_potential_impl(), orthonormalize(), print_fock_matrix_eigs(), print_potential_matrix_eigs(), reproject(), save_orbitals(), set_occs2(), solve(), step_restriction(), and update_orbitals().
| double madness::Solver< T, NDIM >::sss |
Referenced by END_TIMER(), and START_TIMER().
| double madness::Solver< T, NDIM >::ttt |
Referenced by END_TIMER(), and START_TIMER().