MADNESS
version 0.9
|
#include <molecule.h>
Public Member Functions | |
Molecule () | |
Makes a molecule with zero atoms. More... | |
Molecule (const std::string &filename) | |
Read coordinates from a file. More... | |
void | read_file (const std::string &filename) |
void | read_core_file (const std::string &filename) |
std::string | guess_file () const |
unsigned int | n_core_orb_all () const |
unsigned int | n_core_orb (unsigned int atn) const |
unsigned int | get_core_l (unsigned int atn, unsigned int c) const |
double | get_core_bc (unsigned int atn, unsigned int c) const |
double | core_eval (int atom, unsigned int core, int m, double x, double y, double z) const |
double | core_derivative (int atom, int axis, unsigned int core, int m, double x, double y, double z) const |
bool | is_potential_defined (unsigned int atn) const |
bool | is_potential_defined_atom (int i) const |
void | add_atom (double x, double y, double z, double q, int atn) |
int | natom () const |
void | set_atom_charge (unsigned int i, double zeff) |
unsigned int | get_atom_number (unsigned int i) |
void | set_atom_coords (unsigned int i, double x, double y, double z) |
madness::Tensor< double > | get_all_coords () const |
std::vector< madness::Vector < double, 3 > > | get_all_coords_vec () const |
void | set_all_coords (const madness::Tensor< double > &newcoords) |
void | set_eprec (double value) |
updates rcuts with given eprec More... | |
void | set_rcut (double value) |
void | set_core_eprec (double value) |
void | set_core_rcut (double value) |
double | get_eprec () const |
double | bounding_cube () const |
Returns the half width of the bounding cube. More... | |
const Atom & | get_atom (unsigned int i) const |
void | print () const |
double | inter_atomic_distance (unsigned int i, unsigned int j) const |
double | nuclear_repulsion_energy () const |
double | nuclear_repulsion_energy_pseudo () const |
double | nuclear_repulsion_derivative (int i, int j) const |
double | nuclear_dipole (int axis) const |
double | nuclear_charge_density (double x, double y, double z) const |
double | mol_nuclear_charge_density (double x, double y, double z) const |
double | smallest_length_scale () const |
void | identify_point_group () |
void | center () |
Moves the center of nuclear charge to the origin. More... | |
void | orient () |
Centers and orients the molecule in a standard manner. More... | |
double | total_nuclear_charge () const |
double | nuclear_attraction_potential (double x, double y, double z) const |
double | molecular_core_potential (double x, double y, double z) const |
double | core_potential_derivative (int atom, int axis, double x, double y, double z) const |
double | nuclear_attraction_potential_derivative (int atom, int axis, double x, double y, double z) const |
template<typename Archive > | |
void | serialize (Archive &ar) |
Public Attributes | |
std::string | pointgroup_ |
std::vector< double > | atomic_radii |
|
inline |
Makes a molecule with zero atoms.
References L.
Molecule::Molecule | ( | const std::string & | filename | ) |
Read coordinates from a file.
Scans the file for the first geometry block in the format
The charge q
is inferred from the tag which is assumed to be the standard symbol for an element. Same as the simplest NWChem format. For ghost atoms (bq
) the charge is read as a fifth field on the line.
This code is just for the examples ... don't trust it!
References read_file().
void Molecule::add_atom | ( | double | x, |
double | y, | ||
double | z, | ||
double | q, | ||
int | atn | ||
) |
References atomic_radii, madness::constants::atomic_unit_of_length, c, madness::AtomicData::covalent_radius, madness::get_atomic_data(), and madness::smoothing_parameter().
Referenced by main(), and read_file().
double Molecule::bounding_cube | ( | ) | const |
Returns the half width of the bounding cube.
The molecule will be contained in the cube [-L,+L].
References mpfr::fabs(), L, and max.
Referenced by madness::CalculationParameters::set_molecular_info().
void Molecule::center | ( | ) |
Moves the center of nuclear charge to the origin.
Referenced by orient().
double Molecule::core_derivative | ( | int | atom, |
int | axis, | ||
unsigned int | core, | ||
int | m, | ||
double | x, | ||
double | y, | ||
double | z | ||
) | const |
References madness::CorePotentialManager::core_derivative().
Referenced by madness::CoreOrbitalDerivativeFunctor::operator()().
double Molecule::core_eval | ( | int | atom, |
unsigned int | core, | ||
int | m, | ||
double | x, | ||
double | y, | ||
double | z | ||
) | const |
References madness::CorePotentialManager::core_eval().
Referenced by madness::CoreOrbitalFunctor::operator()().
double Molecule::core_potential_derivative | ( | int | atom, |
int | axis, | ||
double | x, | ||
double | y, | ||
double | z | ||
) | const |
References natom(), and madness::CorePotentialManager::potential_derivative().
Referenced by madness::CorePotentialDerivativeFunctor::operator()().
madness::Tensor< double > Molecule::get_all_coords | ( | ) | const |
References c, get_atom(), natom(), madness::Atom::x, madness::Atom::y, and madness::Atom::z.
Referenced by main(), and madness::HartreeFock< T, NDIM >::value().
std::vector< madness::Vector< double, 3 > > Molecule::get_all_coords_vec | ( | ) | const |
const Atom & Molecule::get_atom | ( | unsigned int | i | ) | const |
Referenced by madness::GTHPseudopotential< double >::apply_potential(), madness::GTHPseudopotential< double >::apply_potential_simple(), madness::AtomicBasisSet::atoms_to_bfn(), AtomicBasisSet::atoms_to_bfn(), madness::AtomicBasisSet::basisfn_to_atom(), AtomicBasisSet::basisfn_to_atom(), madness::PotentialManager::core_projection(), madness::SCF::core_projection(), madness::PotentialManager::core_projector_derivative(), madness::SCF::core_projector_derivative(), madness::SCF::derivatives(), madness::AtomicBasisSet::eval(), AtomicBasisSet::eval(), madness::AtomicBasisSet::eval_guess_density(), AtomicBasisSet::eval_guess_density(), get_all_coords(), get_all_coords_vec(), madness::AtomicBasisSet::get_atomic_basis_function(), AtomicBasisSet::get_atomic_basis_function(), madness::GTHPseudopotential< double >::load_pseudo_from_file(), madness::GTHPseudopotential< double >::make_pseudo_potential(), madness::AtomicBasisSet::nbf(), AtomicBasisSet::nbf(), madness::AtomicBasisSet::print(), madness::AtomicBasisSet::print_anal(), AtomicBasisSet::print_anal(), and madness::MolecularDerivativeFunctor::special_points().
unsigned int Molecule::get_atom_number | ( | unsigned int | i | ) |
Referenced by madness::SCF::SCF().
|
inline |
|
inline |
|
inline |
Referenced by madness::SCF::set_protocol().
|
inline |
References madness::CorePotentialManager::guess_file().
Referenced by madness::SCF::SCF().
void Molecule::identify_point_group | ( | ) |
References pointgroup_, and madness::print().
Referenced by orient().
double Molecule::inter_atomic_distance | ( | unsigned int | i, |
unsigned int | j | ||
) | const |
Referenced by nuclear_repulsion_derivative(), nuclear_repulsion_energy(), and nuclear_repulsion_energy_pseudo().
|
inline |
References madness::CorePotentialManager::is_defined().
|
inline |
References madness::CorePotentialManager::is_defined().
Referenced by madness::SCF::derivatives().
double Molecule::mol_nuclear_charge_density | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
References madness::smoothed_density().
double Molecule::molecular_core_potential | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
|
inline |
References madness::CorePotentialManager::is_defined(), and madness::CorePotentialManager::n_core_orb_base().
Referenced by madness::PotentialManager::core_projection(), madness::SCF::core_projection(), madness::PotentialManager::core_projector_derivative(), and madness::SCF::core_projector_derivative().
unsigned int Molecule::n_core_orb_all | ( | ) | const |
References madness::CorePotentialManager::is_defined(), madness::CorePotentialManager::n_core_orb(), natom(), and mpfr::sum().
Referenced by madness::SCF::initial_guess(), madness::SCF::load_mos(), and madness::SCF::SCF().
|
inline |
Referenced by madness::AtomicBasisSet::atoms_to_bfn(), AtomicBasisSet::atoms_to_bfn(), madness::AtomicBasisSet::basisfn_to_atom(), AtomicBasisSet::basisfn_to_atom(), core_potential_derivative(), madness::PotentialManager::core_projection(), madness::SCF::core_projection(), madness::SCF::derivatives(), madness::AtomicBasisSet::eval(), AtomicBasisSet::eval(), madness::AtomicBasisSet::eval_guess_density(), AtomicBasisSet::eval_guess_density(), get_all_coords(), get_all_coords_vec(), madness::AtomicBasisSet::get_atomic_basis_function(), AtomicBasisSet::get_atomic_basis_function(), madness::GTHPseudopotential< double >::load_pseudo_from_file(), SCF::localize_PM_task_kernel(), main(), madness::GTHPseudopotential< double >::make_pseudo_potential(), molecular_core_potential(), n_core_orb_all(), madness::AtomicBasisSet::nbf(), AtomicBasisSet::nbf(), print(), madness::AtomicBasisSet::print(), madness::AtomicBasisSet::print_anal(), AtomicBasisSet::print_anal(), read_core_file(), read_file(), madness::SCF::SCF(), set_all_coords(), madness::SCF::solve(), madness::HartreeFock< T, NDIM >::value(), and madness::MolecularEnergy::value().
double Molecule::nuclear_attraction_potential | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
References madness::smoothed_potential(), mpfr::sum(), TAU_START, and TAU_STOP.
Referenced by madness::MolecularPotentialFunctor::operator()().
double Molecule::nuclear_attraction_potential_derivative | ( | int | atom, |
int | axis, | ||
double | x, | ||
double | y, | ||
double | z | ||
) | const |
References madness::dsmoothed_potential().
Referenced by madness::MolecularDerivativeFunctor::operator()().
double Molecule::nuclear_charge_density | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
References madness::smoothed_density(), and sqrt().
double Molecule::nuclear_dipole | ( | int | axis | ) | const |
References madness::CorePotentialManager::is_defined(), MADNESS_EXCEPTION, madness::CorePotentialManager::n_core_orb(), and mpfr::sum().
Referenced by madness::SCF::dipole().
double Molecule::nuclear_repulsion_derivative | ( | int | i, |
int | j | ||
) | const |
References inter_atomic_distance(), madness::CorePotentialManager::is_defined(), madness::CorePotentialManager::n_core_orb(), and mpfr::sum().
Referenced by madness::SCF::derivatives().
double Molecule::nuclear_repulsion_energy | ( | ) | const |
References inter_atomic_distance(), madness::CorePotentialManager::is_defined(), madness::CorePotentialManager::n_core_orb(), and mpfr::sum().
Referenced by main(), and madness::SCF::solve().
double Molecule::nuclear_repulsion_energy_pseudo | ( | ) | const |
References inter_atomic_distance(), madness::CorePotentialManager::is_defined(), madness::CorePotentialManager::n_core_orb(), and mpfr::sum().
Referenced by madness::SCF::solve().
void Molecule::orient | ( | ) |
Centers and orients the molecule in a standard manner.
References center(), mpfr::fabs(), I(), identify_point_group(), madness::inner(), k, L, madness::print(), and madness::syev().
Referenced by main(), and madness::SCF::SCF().
void Molecule::print | ( | ) | const |
References madness::get_atomic_data(), and natom().
Referenced by main(), madness::MP2::MP2(), and madness::AtomicBasisSet::print().
void Molecule::read_core_file | ( | const std::string & | filename | ) |
void Molecule::read_file | ( | const std::string & | filename | ) |
References add_atom(), madness::constants::atomic_unit_of_length, madness::f, MADNESS_EXCEPTION, natom(), madness::position_stream(), madness::scale(), set_eprec(), and madness::symbol_to_atomic_number().
Referenced by Molecule(), and madness::SCF::SCF().
|
inline |
void Molecule::set_all_coords | ( | const madness::Tensor< double > & | newcoords | ) |
Referenced by madness::HartreeFock< T, NDIM >::value(), and madness::MolecularEnergy::value().
void Molecule::set_atom_charge | ( | unsigned int | i, |
double | zeff | ||
) |
Referenced by madness::SCF::SCF().
void Molecule::set_atom_coords | ( | unsigned int | i, |
double | x, | ||
double | y, | ||
double | z | ||
) |
|
inline |
References madness::CorePotentialManager::set_eprec().
|
inline |
References madness::CorePotentialManager::set_rcut().
void Molecule::set_eprec | ( | double | value | ) |
updates rcuts with given eprec
References madness::CorePotentialManager::set_eprec(), and madness::smoothing_parameter().
Referenced by main(), madness::MP2::MP2(), read_file(), and madness::SCF::set_protocol().
void Molecule::set_rcut | ( | double | value | ) |
double Molecule::smallest_length_scale | ( | ) | const |
References max.
Referenced by madness::CalculationParameters::set_molecular_info().
double Molecule::total_nuclear_charge | ( | ) | const |
References mpfr::sum().
Referenced by madness::SCF::initial_guess(), and madness::CalculationParameters::set_molecular_info().
std::vector<double> madness::Molecule::atomic_radii |
Referenced by add_atom().
std::string madness::Molecule::pointgroup_ |
The molecular point group is automatically assigned in the identify_pointgroup function
Referenced by identify_point_group().