ergo
|
Representation of a molecule as a set of nuclei and total charge. More...
#include <molecule.h>
Public Member Functions | |
Molecule () | |
void | addAtom (ergo_real c, ergo_real x, ergo_real y, ergo_real z) |
void | clear () |
void | setNetCharge (ergo_real netCharge_) |
void | replaceAtom (int i, const Atom &atom) |
void | setAtomList (const std::vector< Atom > atomList) |
const Atom * | getAtomListPtr () const |
const Atom & | getAtom (int i) const |
int | getNoOfAtoms () const |
ergo_real | getNetCharge () const |
void | getExtremeInternuclearDistancesQuadratic (ergo_real &minDist, ergo_real &maxDist) const |
Compute smallest and largest internuclear distances. More... | |
ergo_real | getNuclearRepulsionEnergyQuadratic () const |
Compute nuclear repulsion energy. More... | |
ergo_real | getNuclearElectricFieldEnergy (const Vector3D &electricField) const |
Compute nuclear energy in given electric field. More... | |
int | getNumberOfElectrons () const |
Compute total number of electrons. More... | |
void | getNuclearRepulsionEnergyGradientContribQuadratic (ergo_real *resultGradient) const |
Compute gradient of nuclear repulsion energy w.r.t. More... | |
int | setFromMoleculeFile (const char *fileName, int netCharge, char **basissetFile) |
Loads molecule from a given file name, assuming given net charge. More... | |
Private Attributes | |
std::vector< Atom > | atoms |
ergo_real | netCharge |
int | noOfAtoms |
Representation of a molecule as a set of nuclei and total charge.
It provides I/O methods and basic manipulation routines.
|
inline |
References atoms, and noOfAtoms.
Referenced by benchmark_calculation(), do_add_atom(), es_add_atom(), get_energy(), grid_test_synchronisation(), main(), readMoleculeFileInMolFormat(), readMoleculeFileInXyzFormat(), small_calculation_core(), test_gradient_by_explicit_comparison(), test_S_V_comparison(), test_small(), test_V_by_explicit_comparison(), test_V_by_explicit_comparison_tight(), and try_integral_diffs().
|
inline |
References netCharge, and noOfAtoms.
Referenced by es_mol_begin().
|
inline |
References atoms.
Referenced by compute_dipole_moment_onecoord(), SCF_restricted::compute_gradient_fixeddens(), compute_h_core_matrix_sparse(), compute_V_and_gradient_linear(), compute_V_hierarchical(), SCF_restricted::create_gabedit_file(), SCF_unrestricted::create_gabedit_file(), do_density_images(), do_mulliken_atomic_charges(), SCF_unrestricted::do_spin_flip(), do_tdhf_dynamics(), es_run(), get_gradient_using_explicit_integrals(), get_gradient_using_finite_differences(), get_max_charge(), get_mulliken_charges(), ErgoMolInfo::getAtom(), ErgoMolInfo::getExps(), main(), test_V_by_explicit_comparison(), test_V_by_explicit_comparison_tight(), try_integral_diffs(), and write_gcube_file_header().
|
inline |
void Molecule::getExtremeInternuclearDistancesQuadratic | ( | ergo_real & | minDist, |
ergo_real & | maxDist | ||
) | const |
Compute smallest and largest internuclear distances.
References A, atoms, B, get_distance_between_atoms(), and noOfAtoms.
Referenced by SCF_general::SCF_general().
|
inline |
References noOfAtoms.
Referenced by BasisInfoStruct::addBasisfuncsForMolecule(), compute_dipole_moment_onecoord(), SCF_restricted::compute_gradient_fixeddens(), compute_gradient_of_nucl_and_trDV(), compute_h_core_matrix_simple_dense(), compute_h_core_matrix_sparse(), compute_V_and_gradient_linear(), compute_V_hierarchical(), compute_V_sparse(), compute_V_sparse_hierarchical(), SCF_restricted::create_gabedit_file(), SCF_unrestricted::create_gabedit_file(), do_density_images(), do_mulliken_atomic_charges(), do_mulliken_spin_densities(), SCF_unrestricted::do_spin_flip(), do_tdhf_dynamics(), es_mol_commit(), es_run(), get_energy(), get_gradient_using_explicit_integrals(), get_gradient_using_finite_differences(), get_max_charge(), get_mulliken_charges(), ErgoMolInfo::getExps(), main(), readMoleculeFileInMolFormat(), readMoleculeFileInXyzFormat(), SCF_general::SCF_general(), test_gradient_by_explicit_comparison(), test_V_by_explicit_comparison(), test_V_by_explicit_comparison_tight(), and write_gcube_file_header().
Compute nuclear energy in given electric field.
References A, atoms, Atom::charge, Atom::coords, do_output(), LOG_AREA_MAIN, LOG_CAT_INFO, noOfAtoms, and Vector3D::v.
Referenced by SCF_general::SCF_general().
void Molecule::getNuclearRepulsionEnergyGradientContribQuadratic | ( | ergo_real * | resultGradient | ) | const |
Compute gradient of nuclear repulsion energy w.r.t.
changes in nuclear coordinates. Result is added to resultGradient vector.
References A, atoms, B, Atom::charge, Atom::coords, noOfAtoms, and template_blas_sqrt().
Referenced by compute_V_and_gradient_linear(), and get_gradient_using_explicit_integrals().
ergo_real Molecule::getNuclearRepulsionEnergyQuadratic | ( | ) | const |
Compute nuclear repulsion energy.
References A, atoms, B, Atom::charge, do_output(), get_distance_between_atoms(), LOG_AREA_MAIN, LOG_CAT_INFO, and noOfAtoms.
Referenced by compute_h_core_matrix_simple_dense(), get_nucl_energy_for_given_mol_and_dens(), main(), and test_S_V_comparison().
int Molecule::getNumberOfElectrons | ( | ) | const |
Compute total number of electrons.
The result is sum of atomic charges plus netCharge.
References atoms, charge, netCharge, and noOfAtoms.
Referenced by calculation_shared(), dft_get_uxc_mt(), dft_get_xc(), dft_get_xc_mt(), dft_lin_resp_mt(), dft_lin_respao(), es_get_polarisability(), es_getexc(), es_run(), get_energy(), main(), SCF_general::SCF_general(), and test_mol().
|
inline |
References atoms, and noOfAtoms.
Referenced by SCF_restricted::compute_gradient_fixeddens(), es_run(), get_gradient_using_finite_differences(), and try_integral_diffs().
|
inline |
int Molecule::setFromMoleculeFile | ( | const char * | fileName, |
int | netCharge, | ||
char ** | basissetFile | ||
) |
Loads molecule from a given file name, assuming given net charge.
basissetFile will be set if the file contains basis set and basissetFile is NULL.
References netCharge, readMoleculeFileInMolFormat(), and readMoleculeFileInXyzFormat().
Referenced by es_mol_read_molecule(), grid_test_scaling(), main(), mol_calculation(), and test_mol().
|
inline |
References netCharge.
Referenced by es_run(), get_energy(), main(), readMoleculeFileInMolFormat(), and readMoleculeFileInXyzFormat().
|
private |
Referenced by addAtom(), getAtom(), getAtomListPtr(), getExtremeInternuclearDistancesQuadratic(), getNuclearElectricFieldEnergy(), getNuclearRepulsionEnergyGradientContribQuadratic(), getNuclearRepulsionEnergyQuadratic(), getNumberOfElectrons(), readMoleculeFileInMolFormat(), replaceAtom(), and setAtomList().
|
private |
Referenced by clear(), getNetCharge(), getNumberOfElectrons(), setFromMoleculeFile(), and setNetCharge().
|
private |