Go to the documentation of this file.
38 #ifndef MOLECULE_HEADER
39 #define MOLECULE_HEADER
64 v[0] = x;
v[1] = y;
v[2] = z;
71 d =
v[0]-b[0]; r = d*d;
72 d =
v[1]-b[1]; r += d*d;
73 d =
v[2]-b[2]; r += d*d;
98 int currListSize =
atoms.size();
100 atoms.resize(currListSize*2);
134 char **basissetFile);
Treal template_blas_sqrt(Treal x)
int setFromMoleculeFile(const char *fileName, int netCharge, char **basissetFile)
Loads molecule from a given file name, assuming given net charge.
Definition: molecule.cc:409
A representation of Vector or point in cartesian space.
Definition: molecule.h:60
Definition of the main floating-point datatype used; the ergo_real type.
Functionality for parsing a file in xyz file format, storing the result as a molecule object.
int readMoleculeFileInXyzFormat(Molecule &result, const char *fileName, int netCharge, bool expectPlainCharges)
Definition: xyz_file_parser.cc:53
Memory allocation/deallocation routines.
#define UNIT_one_Angstrom
Definition: units.h:43
#define LOG_CAT_ERROR
Definition: output.h:47
ergo_real getNuclearRepulsionEnergyQuadratic() const
Compute nuclear repulsion energy.
Definition: molecule.cc:87
double ergo_real
Definition: realtype.h:69
void clear()
Definition: molecule.h:108
void * ergo_malloc(size_t noOfBytes)
Definition: memorymanag.cc:49
ergo_real getNuclearElectricFieldEnergy(const Vector3D &electricField) const
Compute nuclear energy in given electric field.
Definition: molecule.cc:138
int getNoOfAtoms() const
Definition: molecule.h:114
Simple atom representation by its charge and cartesian coordinates.
Definition: molecule.h:51
int charge
Definition: grid_test.cc:51
ergo_real dist(const ergo_real b[]) const
Definition: molecule.h:79
void setNetCharge(ergo_real netCharge_)
Definition: molecule.h:109
static long int get_file_size(const char *fileName)
Definition: FileWritable.cc:402
ergo_real dist(const Vector3D &b) const
compute distance between two points.
Definition: molecule.h:77
Vector3D()
Definition: molecule.h:62
ergo_real operator[](unsigned i) const
Definition: molecule.h:67
void setAtomList(const std::vector< Atom > atomList)
Definition: molecule.h:111
static int readMoleculeFileInMolFormat(Molecule *result, const char *fileName, int netCharge, char **basisfilename)
Definition: molecule.cc:171
void getNuclearRepulsionEnergyGradientContribQuadratic(ergo_real *resultGradient) const
Compute gradient of nuclear repulsion energy w.r.t.
Definition: molecule.cc:111
ergo_real v[3]
Definition: molecule.h:61
const Atom & getAtom(int i) const
Definition: molecule.h:113
Basic OS access utilities.
#define LOG_CAT_INFO
Definition: output.h:49
ergo_real netCharge
Definition: molecule.h:90
#define LOG_AREA_MAIN
Definition: output.h:57
Constants for conversion between units for some common units like Angstrom, electron-volt (eV),...
static ergo_real get_distance_between_atoms(const Atom &atomA, const Atom &atomB)
Definition: molecule.cc:53
ergo_real charge
Definition: molecule.h:52
Class representing a molecule as a set of atoms with assiciated coordinates and charges of the atomic...
Vector3D(ergo_real x, ergo_real y, ergo_real z)
Definition: molecule.h:63
std::vector< Atom > atoms
Definition: molecule.h:89
Representation of a molecule as a set of nuclei and total charge.
Definition: molecule.h:87
void getExtremeInternuclearDistancesQuadratic(ergo_real &minDist, ergo_real &maxDist) const
Compute smallest and largest internuclear distances.
Definition: molecule.cc:66
const Atom * getAtomListPtr() const
Definition: molecule.h:112
ergo_real dist2(const ergo_real b[]) const
compute square of distance between two points.
Definition: molecule.h:69
ergo_real getNetCharge() const
Definition: molecule.h:115
Molecule()
Definition: molecule.h:95
ergo_real coords[3]
Definition: molecule.h:53
void addAtom(ergo_real c, ergo_real x, ergo_real y, ergo_real z)
Definition: molecule.h:97
ergo_real & operator[](unsigned i)
Definition: molecule.h:66
void do_output(int logCategory, int logArea, const char *format,...)
Definition: output.cc:53
int getNumberOfElectrons() const
Compute total number of electrons.
Definition: molecule.cc:158
int noOfAtoms
Definition: molecule.h:91
Functionality for writing output messages to a text file.
void replaceAtom(int i, const Atom &atom)
Definition: molecule.h:110