MADNESS 0.10.1
|
#include <mentity.h>
Public Member Functions | |
MolecularEntity () | |
Makes a MolecularEntity with zero atoms. | |
MolecularEntity (const std::string &filename, bool fractional) | |
Read coordinates from a file. | |
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. | |
void | center () |
Moves the center of nuclear charge to the origin. | |
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, and read_file().
void MolecularEntity::add_atom | ( | double | x, |
double | y, | ||
double | z, | ||
int | atn, | ||
double | q | ||
) |
References atoms, c, e(), q(), rcut, rsqasymptotic, and smoothing_parameter().
Referenced by read_file(), 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.
References atoms.
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 |
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_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 atoms, and distance().
Referenced by nuclear_repulsion_energy().
|
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()(), print(), AtomicBasisSet::print(), AtomicBasisSet::print_anal(), and read_file().
double MolecularEntity::nuclear_attraction_potential | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
References atoms, distance(), rcut, smoothed_potential(), and sum.
Referenced by MolecularPotentialFunctor::operator()().
double MolecularEntity::nuclear_charge_density | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
References atoms, rcut, rsqasymptotic, and smoothed_density().
Referenced by MolecularNuclearChargeDensityFunctor::operator()().
double MolecularEntity::nuclear_repulsion_energy | ( | ) | const |
References atoms, inter_atomic_distance(), and sum.
void MolecularEntity::print | ( | ) | const |
References atomic_data, atoms, natom(), 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 add_atom(), madness::constants::atomic_unit_of_length, atoms, e(), f, madness::filename, madness::FunctionDefaults< NDIM >::get_cell_width(), MADNESS_ASSERT, natom(), madness::position_stream(), rcut, rsqasymptotic, madness::scale(), and symbol_to_atomic_number().
Referenced by MolecularEntity(), and 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 | ||
) |
References atoms.
double MolecularEntity::smallest_length_scale | ( | ) | const |
double MolecularEntity::total_nuclear_charge | ( | ) | const |
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 |
|
private |
Referenced by add_atom(), nuclear_attraction_potential(), nuclear_charge_density(), read_file(), serialize(), and smallest_length_scale().
|
private |
Referenced by add_atom(), nuclear_charge_density(), read_file(), and serialize().