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;
95 Molecule() : atoms(10), netCharge(0), noOfAtoms(0) {}
98 int currListSize = atoms.size();
99 if(noOfAtoms >= currListSize)
100 atoms.resize(currListSize*2);
101 atoms[noOfAtoms].charge = c;
102 atoms[noOfAtoms].coords[0] = x;
103 atoms[noOfAtoms].coords[1] = y;
104 atoms[noOfAtoms].coords[2] = z;
108 void clear() { noOfAtoms = 0; netCharge = 0; }
110 void replaceAtom(
int i,
const Atom & atom) { assert(i >= 0 && i < noOfAtoms); atoms[i] = atom; }
111 void setAtomList(
const std::vector<Atom> atomList) { atoms = atomList; noOfAtoms = atomList.size(); }
118 void getExtremeInternuclearDistancesQuadratic(
ergo_real & minDist,
ergo_real & maxDist)
const;
120 ergo_real getNuclearRepulsionEnergyQuadratic()
const;
125 int getNumberOfElectrons()
const;
127 void getNuclearRepulsionEnergyGradientContribQuadratic(
ergo_real* resultGradient)
const;
132 int setFromMoleculeFile(
const char* fileName,
134 char **basissetFile);
const Atom * getAtomListPtr() const
Definition: molecule.h:112
double ergo_real
Definition: realtype.h:69
int getNoOfAtoms() const
Definition: molecule.h:114
A representation of Vector or point in cartesian space.
Definition: molecule.h:60
ergo_real & operator[](unsigned i)
Definition: molecule.h:66
ergo_real dist(const ergo_real b[]) const
Definition: molecule.h:79
Representation of a molecule as a set of nuclei and total charge.
Definition: molecule.h:87
void setNetCharge(ergo_real netCharge_)
Definition: molecule.h:109
ergo_real dist2(const ergo_real b[]) const
compute square of distance between two points.
Definition: molecule.h:69
ergo_real netCharge
Definition: molecule.h:90
Simple atom representation by its charge and cartesian coordinates.
Definition: molecule.h:51
Definition of the main floating-point datatype used; the ergo_real type.
void clear()
Definition: molecule.h:108
C++ interface to a subset of BLAS and LAPACK.
ergo_real v[3]
Definition: molecule.h:61
Vector3D()
Definition: molecule.h:62
const Atom & getAtom(int i) const
Definition: molecule.h:113
Molecule()
Definition: molecule.h:95
Vector3D(ergo_real x, ergo_real y, ergo_real z)
Definition: molecule.h:63
std::vector< Atom > atoms
Definition: molecule.h:89
ergo_real coords[3]
Definition: molecule.h:53
int noOfAtoms
Definition: molecule.h:91
void setAtomList(const std::vector< Atom > atomList)
Definition: molecule.h:111
void addAtom(ergo_real c, ergo_real x, ergo_real y, ergo_real z)
Definition: molecule.h:97
ergo_real charge
Definition: molecule.h:52
void replaceAtom(int i, const Atom &atom)
Definition: molecule.h:110
ergo_real dist(const Vector3D &b) const
compute distance between two points.
Definition: molecule.h:77
ergo_real getNetCharge() const
Definition: molecule.h:115
Treal template_blas_sqrt(Treal x)
ergo_real operator[](unsigned i) const
Definition: molecule.h:67