#include <QMCMolecule.h>
Public Member Functions | |
QMCMolecule () | |
Creates an instance of the class. | |
void | initialize (int nAtoms, int GridLevel) |
Initializes the object. | |
int | getNumberAtoms () |
Gets the number of atoms in the molecule. | |
int | getNuclearCharge () |
Gets the total charge from all the nuclei. | |
double | evaluatePotential (Array2D< double > &V, double r) |
This function helps to evaluate Vlocal and Vnonlocal at distance r. | |
Array2D< double > | getGrid (int nuc, double R, bool translate) |
We store the grid as points on the unit sphere centered at the origin. | |
QMCMolecule | operator= (const QMCMolecule &rhs) |
Sets two QMCMolecule objects equal. | |
int | findClosestNucleusIndex (Array2D< double > &x, int index) |
Finds the index of the nucleus closest to a specified particle. | |
void | readGeometry (string runfile) |
Loads the state of the object from a file. | |
int | readPsuedoPotential (string runfile) |
Read the psuedopotentials, if any, in an input file. | |
Public Attributes | |
Array1D< string > | Atom_Labels |
Array containing the labels for the atoms. | |
Array2D< double > | Atom_Positions |
Array containing the 3-dimensional cartesian positions for the atoms. | |
Array1D< int > | Z |
Array containing the nuclear charges for the atoms. | |
Array1D< int > | Zeff |
If we used psuedopotentials, then we removed Z-Zeff electrons. | |
Array1D< bool > | usesPsuedo |
Each element in the array corresponds to a nucleus index. | |
Array2D< string > | psuedoTitle |
Save some of the text description of the ecp so that we can write it in the restart file. | |
Array1D< Array2D< double > > | Vlocal |
The local part of the ecp. | |
Array1D< Array1D< Array2D < double > > > | Vnonlocal |
The nonlocal part of the ecp. | |
Array1D< Array1D< double > > | gridWeights |
Each grid point from the Lebedev-Laikov functions has an associated weight, stored here. | |
Array1D< Array2D< double > > | gridLegendre |
In order to perform the ecp integration, we need to evaluate the legendre function at each point. | |
Array1D< string > | NucleiTypes |
Array containing all of the different atom labels used in the molecule. | |
Private Attributes | |
int | Natoms |
int | gridLevel |
This will be initialized to the same value as: globalInput.flags.psuedo_gridLevel And indicates how many grid points to use. | |
Array1D< Array2D< double > > | grid |
We access the Lebedev-Laikov functions once, and save the grid points in these arrays. | |
Friends | |
istream & | operator>> (istream &strm, QMCMolecule &rhs) |
Loads the state of the object from an input stream. | |
ostream & | operator<< (ostream &strm, QMCMolecule &rhs) |
Writes the state of the object to an output stream. |
The geometry is defined by 3-dimensional cartesian coordinates for each atom, with specified charges and types.
Definition at line 34 of file QMCMolecule.h.
QMCMolecule::QMCMolecule | ( | ) |
void QMCMolecule::initialize | ( | int | nAtoms, | |
int | GridLevel | |||
) |
Initializes the object.
nAtoms | number of atoms in the molecule. |
Definition at line 23 of file QMCMolecule.cpp.
References gridLevel, and Natoms.
Referenced by QMCInput::read().
int QMCMolecule::getNumberAtoms | ( | ) |
Gets the number of atoms in the molecule.
Definition at line 29 of file QMCMolecule.cpp.
References Natoms.
Referenced by QMCNuclearForces::calculateNuclearContributions(), QMCSurfer::equipotentialSurface(), QMCNuclearForces::evaluate(), QMCJastrowElectronNuclear::evaluate(), findClosestNucleusIndex(), QMCWalkerData::initialize(), QMCWalker::initialize(), QMCRun::initialize(), QMCReadAndEvaluateConfigs::initialize(), QMCNuclearForces::initialize(), QMCManager::initialize(), QMCElectronNucleusCusp::initialize(), QMCSurfer::interparticleDistanceMatrix(), QMCThreeBodyJastrow::jastrowOnGrid(), QMCJastrowElectronNuclear::jastrowOnGrid(), QMCSurfer::scanEnergies(), QMCSurfer::surfaceExplorer(), QMCThreeBodyJastrow::updateAll(), QMCWalkerData::updateDistances(), and QMCThreeBodyJastrow::updateOne().
int QMCMolecule::getNuclearCharge | ( | ) |
Gets the total charge from all the nuclei.
Definition at line 34 of file QMCMolecule.cpp.
Referenced by QMCInput::read().
double QMCMolecule::evaluatePotential | ( | Array2D< double > & | V, | |
double | r | |||
) |
This function helps to evaluate Vlocal and Vnonlocal at distance r.
V | a slice of Vlocal or Vnonlocal | |
r | the value at which to evaluate |
Definition at line 378 of file QMCMolecule.cpp.
References Array2D< T >::dim1().
Referenced by QMCPotential_Energy::evaluatePsuedoPotential().
Array2D< double > QMCMolecule::getGrid | ( | int | nuc, | |
double | R, | |||
bool | translate | |||
) |
We store the grid as points on the unit sphere centered at the origin.
This function is called to provide scales and translated grid points.
nuc | the index of the nucleus | |
R | the distance of the points from the nucleus | |
translate | should be false if you want to keep it centered at the origin |
Definition at line 354 of file QMCMolecule.cpp.
References Atom_Positions, Array2D< T >::dim1(), and grid.
Referenced by QMCPotential_Energy::evaluatePsuedoPotential(), and QMCPotential_Energy::initialize().
QMCMolecule QMCMolecule::operator= | ( | const QMCMolecule & | rhs | ) |
Sets two QMCMolecule objects equal.
rhs | object to set this object equal to. |
Definition at line 44 of file QMCMolecule.cpp.
References Atom_Labels, Atom_Positions, grid, gridLegendre, gridLevel, gridWeights, Natoms, usesPsuedo, Vlocal, Vnonlocal, Z, and Zeff.
int QMCMolecule::findClosestNucleusIndex | ( | Array2D< double > & | x, | |
int | index | |||
) |
Finds the index of the nucleus closest to a specified particle.
x | a 2D array containing particle coordinates. | |
index | index of the particle for which to find the closest nucleus. |
Definition at line 63 of file QMCMolecule.cpp.
References getNumberAtoms().
Referenced by QMCSCFJastrow::calculate_Modified_Grad_PsiRatio(), QMCWalker::calculateReverseGreensFunctionUmrigar93AcceleratedSampling(), QMCWalker::calculateReverseGreensFunctionUmrigar93ImportanceSampling(), QMCWalker::moveElectronsUmrigar93AcceleratedSampling(), and QMCWalker::moveElectronsUmrigar93ImportanceSampling().
void QMCMolecule::readGeometry | ( | string | runfile | ) |
Loads the state of the object from a file.
runfile | file to load the object state from. |
Definition at line 111 of file QMCMolecule.cpp.
References Array1D< T >::allocate(), Atom_Labels, Array1D< T >::dim1(), Natoms, and NucleiTypes.
Referenced by QMCInput::read().
int QMCMolecule::readPsuedoPotential | ( | string | runfile | ) |
Read the psuedopotentials, if any, in an input file.
The format should be the same as GAMESS.
Definition at line 161 of file QMCMolecule.cpp.
References Array2D< T >::allocate(), Array1D< T >::allocate(), Array1D< T >::array(), Array1D< T >::dim1(), grid, gridLegendre, gridLevel, gridWeights, LD0006(), LD0014(), LD0026(), LD0038(), LD0050(), LD0074(), LD0086(), LD0110(), LD0146(), LD0170(), LD0194(), LD0230(), LD0266(), LD0302(), LD0350(), LD0434(), LD0590(), LD0770(), LD0974(), LD1202(), LD1454(), LD1730(), LD2030(), LD2354(), LD2702(), LD3074(), LD3470(), LD3890(), LD4334(), LD4802(), LD5294(), LD5810(), MathFunctions::legendre(), Natoms, psuedoTitle, StringManipulation::toAllUpper(), usesPsuedo, Vlocal, Vnonlocal, Z, and Zeff.
Referenced by QMCInput::read().
istream& operator>> | ( | istream & | strm, | |
QMCMolecule & | rhs | |||
) | [friend] |
ostream& operator<< | ( | ostream & | strm, | |
QMCMolecule & | rhs | |||
) | [friend] |
Array1D<string> QMCMolecule::Atom_Labels |
Array containing the labels for the atoms.
The ith element is the label for the ith atom.
Definition at line 67 of file QMCMolecule.h.
Referenced by QMCWalker::calculateElectronDensities(), QMCNuclearForces::evaluate(), QMCJastrowElectronNuclear::evaluate(), QMCNuclearForces::initialize(), QMCSurfer::interparticleDistanceMatrix(), QMCThreeBodyJastrow::jastrowOnGrid(), QMCJastrowElectronNuclear::jastrowOnGrid(), operator<<(), operator=(), operator>>(), readGeometry(), QMCSurfer::scanEnergies(), QMCThreeBodyJastrow::updateAll(), and QMCThreeBodyJastrow::updateOne().
Array2D<double> QMCMolecule::Atom_Positions |
Array containing the 3-dimensional cartesian positions for the atoms.
The ith element is the position for the ith atom.
Definition at line 73 of file QMCMolecule.h.
Referenced by QMCBasisFunction::angularGrid(), QMCBasisFunction::basisFunctionsOnGrid(), QMCPotential_Energy::calc_P_en(), QMCPotential_Energy::calc_P_nn(), QMCSCFJastrow::calculate_Modified_Grad_PsiRatio(), QMCWalker::calculateElectronDensities(), QMCNuclearForces::calculateNuclearContributions(), QMCWalker::calculateReverseGreensFunctionUmrigar93ImportanceSampling(), QMCSurfer::equipotentialSurface(), QMCNuclearForces::evaluate(), QMCBasisFunction::evaluateBasisFunctions(), QMCElectronNucleusCusp::fitReplacementOrbitals(), getGrid(), QMCPotential_Energy::initialize(), QMCMikesBetterWalkerInitialization::initializeBunchOfWalkersPosition(), QMCMikesJackedWalkerInitialization::initializeWalkerPosition(), QMCDansWalkerInitialization::initializeWalkerPosition(), QMCSurfer::interparticleDistanceMatrix(), QMCThreeBodyJastrow::jastrowOnGrid(), QMCJastrowElectronNuclear::jastrowOnGrid(), QMCPsiPotential::LoadOrbitals(), QMCWalker::moveElectronsUmrigar93ImportanceSampling(), QMCMikesBetterWalkerInitialization::ObjectiveFunctionForWalkers(), operator<<(), operator=(), operator>>(), QMCElectronNucleusCusp::replaceCusps(), QMCSurfer::scanEnergies(), QMCWalkerData::updateDistances(), and QMCNuclearForces::waveMemorization().
Array1D<int> QMCMolecule::Z |
Array containing the nuclear charges for the atoms.
The ith element is the charge for the ith atom.
Definition at line 79 of file QMCMolecule.h.
Referenced by QMCSCFJastrow::calculate_Modified_Grad_PsiRatio(), QMCNuclearForces::calculateNuclearContributions(), QMCWalker::calculateReverseGreensFunctionUmrigar93AcceleratedSampling(), QMCWalker::calculateReverseGreensFunctionUmrigar93ImportanceSampling(), QMCMikesJackedWalkerInitialization::electrons_and_radii(), QMCSurfer::equipotentialSurface(), QMCNuclearForces::evaluate(), QMCElectronNucleusCusp::fitReplacementOrbitals(), QMCRun::initialize(), QMCDansWalkerInitialization::initializeWalkerPosition(), QMCWalker::moveElectronsUmrigar93AcceleratedSampling(), QMCWalker::moveElectronsUmrigar93ImportanceSampling(), QMCMikesBetterWalkerInitialization::ObjectiveFunctionForWalkers(), operator<<(), operator=(), operator>>(), readPsuedoPotential(), and QMCSurfer::surfaceExplorer().
Array1D<int> QMCMolecule::Zeff |
If we used psuedopotentials, then we removed Z-Zeff electrons.
Definition at line 84 of file QMCMolecule.h.
Referenced by QMCPotential_Energy::calc_P_en(), QMCPotential_Energy::calc_P_nn(), QMCPotential_Energy::evaluatePsuedoPotential(), getNuclearCharge(), operator<<(), operator=(), operator>>(), and readPsuedoPotential().
Each element in the array corresponds to a nucleus index.
If the element is true, then that nucleus uses an ecp.
Definition at line 90 of file QMCMolecule.h.
Referenced by QMCPotential_Energy::calc_P_en(), QMCPotential_Energy::initialize(), operator<<(), operator=(), operator>>(), and readPsuedoPotential().
Array2D< string > QMCMolecule::psuedoTitle |
Save some of the text description of the ecp so that we can write it in the restart file.
Definition at line 96 of file QMCMolecule.h.
Referenced by operator<<(), and readPsuedoPotential().
Array1D< Array2D<double> > QMCMolecule::Vlocal |
The local part of the ecp.
Definition at line 101 of file QMCMolecule.h.
Referenced by QMCPotential_Energy::evaluatePsuedoPotential(), operator<<(), operator=(), and readPsuedoPotential().
Array1D< Array1D< Array2D<double> > > QMCMolecule::Vnonlocal |
The nonlocal part of the ecp.
Definition at line 106 of file QMCMolecule.h.
Referenced by QMCPotential_Energy::evaluatePsuedoPotential(), operator<<(), operator=(), and readPsuedoPotential().
Array1D< Array1D<double> > QMCMolecule::gridWeights |
Each grid point from the Lebedev-Laikov functions has an associated weight, stored here.
Definition at line 122 of file QMCMolecule.h.
Referenced by QMCPotential_Energy::evaluatePsuedoPotential(), operator=(), and readPsuedoPotential().
Array1D< Array2D<double> > QMCMolecule::gridLegendre |
In order to perform the ecp integration, we need to evaluate the legendre function at each point.
Dim L,nuc; grid point
Definition at line 129 of file QMCMolecule.h.
Referenced by QMCPotential_Energy::evaluatePsuedoPotential(), operator=(), and readPsuedoPotential().
Array1D<string> QMCMolecule::NucleiTypes |
Array containing all of the different atom labels used in the molecule.
Definition at line 146 of file QMCMolecule.h.
Referenced by QMCWalker::calculateElectronDensities(), QMCManager::gatherHistograms(), QMCRun::initialize(), QMCInput::read(), readGeometry(), and QMCManager::writeElectronDensityHistograms().
int QMCMolecule::Natoms [private] |
Definition at line 192 of file QMCMolecule.h.
Referenced by getNuclearCharge(), getNumberAtoms(), initialize(), operator<<(), operator=(), operator>>(), QMCMolecule(), readGeometry(), and readPsuedoPotential().
int QMCMolecule::gridLevel [private] |
This will be initialized to the same value as: globalInput.flags.psuedo_gridLevel And indicates how many grid points to use.
Definition at line 199 of file QMCMolecule.h.
Referenced by initialize(), operator=(), and readPsuedoPotential().
Array1D< Array2D<double> > QMCMolecule::grid [private] |
We access the Lebedev-Laikov functions once, and save the grid points in these arrays.
indexed: num nuclei; num grid points, 3
Definition at line 206 of file QMCMolecule.h.
Referenced by getGrid(), operator=(), and readPsuedoPotential().