MADNESS
0.10.1
|
#include <mentity.h>
Public Member Functions | |
MolecularEntity () | |
Makes a MolecularEntity with zero atoms. More... | |
MolecularEntity (const std::string &filename, bool fractional) | |
Read coordinates from a file. More... | |
void | add_atom (double x, double y, double z, int atn, double q) |
double | bounding_cube () const |
Returns the half width of the bounding cube. More... | |
void | center () |
Moves the center of nuclear charge to the origin. More... | |
const Atom & | get_atom (unsigned int i) const |
double | inter_atomic_distance (unsigned int i, unsigned int j) const |
int | natom () const |
double | nuclear_attraction_potential (double x, double y, double z) const |
double | nuclear_charge_density (double x, double y, double z) const |
double | nuclear_repulsion_energy () const |
void | print () const |
void | read_file (const std::string &filename, bool fractional) |
template<typename Archive > | |
void | serialize (Archive &ar) |
void | set_atom_coords (unsigned int i, double x, double y, double z) |
double | smallest_length_scale () const |
double | total_nuclear_charge () const |
Private Attributes | |
std::vector< Atom > | atoms |
std::vector< double > | rcut |
std::vector< double > | rsqasymptotic |
|
inline |
Makes a MolecularEntity with zero atoms.
MolecularEntity::MolecularEntity | ( | const std::string & | filename, |
bool | fractional = false |
||
) |
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 madness::filename.
void MolecularEntity::add_atom | ( | double | x, |
double | y, | ||
double | z, | ||
int | atn, | ||
double | q | ||
) |
References c, e(), q(), rcut, and madness::smoothing_parameter().
Referenced by test_nuclear_energy(), test_nuclear_potential(), test_nuclear_potential2(), test_nuclear_potential3(), and test_nuclear_potential_big_unit_cell().
double MolecularEntity::bounding_cube | ( | ) | const |
Returns the half width of the bounding cube.
The MolecularEntity will be contained in the cube [-L,+L].
void MolecularEntity::center | ( | ) |
Moves the center of nuclear charge to the origin.
Referenced by madness::Solver< T, NDIM >::init(), test_nuclear_energy(), test_nuclear_potential(), test_nuclear_potential2(), test_nuclear_potential3(), and test_nuclear_potential_big_unit_cell().
const Atom & MolecularEntity::get_atom | ( | unsigned int | i | ) | const |
Referenced by EwaldNuclearPotentialFunctor::EwaldNuclearPotentialFunctor(), AtomicBasisSet::atoms_to_bfn(), AtomicBasisSet::basisfn_to_atom(), compute_madelung_energy(), compute_madelung_energy_PWSCF(), EwaldNuclearPotentialFunctor::do_G_sum_v2(), EwaldNuclearPotentialFunctor::do_R_sum_v1(), AtomicBasisSet::eval(), AtomicBasisSet::eval_guess_density(), AtomicBasisSet::get_atomic_basis_function(), make_nuclear_charge_density(), madness::Solver< T, NDIM >::make_nuclear_charge_density_impl(), make_nuclear_charge_density_individual(), AtomicBasisSet::nbf(), MolecularNuclearPotentialFunctor2::operator()(), AtomicBasisSet::print(), AtomicBasisSet::print_anal(), and test_nuclear_potential_big_unit_cell().
double MolecularEntity::inter_atomic_distance | ( | unsigned int | i, |
unsigned int | j | ||
) | const |
References madness::distance().
|
inline |
References atoms.
Referenced by EwaldNuclearPotentialFunctor::EwaldNuclearPotentialFunctor(), AtomicBasisSet::atoms_to_bfn(), AtomicBasisSet::basisfn_to_atom(), compute_madelung_energy(), compute_madelung_energy_PWSCF(), EwaldNuclearPotentialFunctor::do_G_sum_v1(), EwaldNuclearPotentialFunctor::do_G_sum_v2(), EwaldNuclearPotentialFunctor::do_R_sum_v1(), AtomicBasisSet::eval(), AtomicBasisSet::eval_guess_density(), AtomicBasisSet::get_atomic_basis_function(), make_nuclear_charge_density(), madness::Solver< T, NDIM >::make_nuclear_charge_density_impl(), make_nuclear_charge_density_individual(), AtomicBasisSet::nbf(), MolecularNuclearPotentialFunctor2::operator()(), AtomicBasisSet::print(), and AtomicBasisSet::print_anal().
double MolecularEntity::nuclear_attraction_potential | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
References madness::distance(), rcut, madness::smoothed_potential(), and madness::sum().
Referenced by MolecularPotentialFunctor::operator()().
double MolecularEntity::nuclear_charge_density | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
References rcut, and madness::smoothed_density().
Referenced by MolecularNuclearChargeDensityFunctor::operator()().
double MolecularEntity::nuclear_repulsion_energy | ( | ) | const |
References madness::sum().
void MolecularEntity::print | ( | ) | const |
References madness::atomic_data, and q().
Referenced by compute_madelung_energy_PWSCF(), test_nuclear_energy(), test_nuclear_potential2(), and test_nuclear_potential_big_unit_cell().
void MolecularEntity::read_file | ( | const std::string & | filename, |
bool | fractional = false |
||
) |
References madness::constants::atomic_unit_of_length, e(), madness::f, madness::filename, madness::FunctionDefaults< NDIM >::get_cell_width(), MADNESS_ASSERT, madness::position_stream(), rcut, madness::scale(), and madness::symbol_to_atomic_number().
Referenced by madness::Solver< T, NDIM >::init().
|
inline |
References atoms, rcut, and rsqasymptotic.
void MolecularEntity::set_atom_coords | ( | unsigned int | i, |
double | x, | ||
double | y, | ||
double | z | ||
) |
double MolecularEntity::smallest_length_scale | ( | ) | const |
double MolecularEntity::total_nuclear_charge | ( | ) | const |
References madness::sum().
Referenced by MolecularNuclearChargeDensityFunctor::MolecularNuclearChargeDensityFunctor(), compute_madelung_energy(), compute_madelung_energy_PWSCF(), EwaldNuclearPotentialFunctor::do_G_sum_v1(), EwaldNuclearPotentialFunctor::do_G_sum_v2(), madness::Solver< T, NDIM >::init(), and test_nuclear_potential().
|
private |
Referenced by natom(), and serialize().
|
private |
Referenced by serialize().
|
private |
Referenced by serialize().