QMCMolecule Class Reference

Describes a particular molecular geometry. More...

#include <QMCMolecule.h>

List of all members.

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.


Detailed Description

Describes a particular molecular geometry.

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.


Constructor & Destructor Documentation

QMCMolecule::QMCMolecule (  ) 

Creates an instance of the class.

Definition at line 18 of file QMCMolecule.cpp.

References Natoms.


Member Function Documentation

void QMCMolecule::initialize ( int  nAtoms,
int  GridLevel 
)

Initializes the object.

Parameters:
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 (  ) 

int QMCMolecule::getNuclearCharge (  ) 

Gets the total charge from all the nuclei.

Returns:
total charge

Definition at line 34 of file QMCMolecule.cpp.

References Natoms, and Zeff.

Referenced by QMCInput::read().

double QMCMolecule::evaluatePotential ( Array2D< double > &  V,
double  r 
)

This function helps to evaluate Vlocal and Vnonlocal at distance r.

Parameters:
V a slice of Vlocal or Vnonlocal
r the value at which to evaluate
Returns:
the value of the potential

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.

Parameters:
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.

Parameters:
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.

Parameters:
x a 2D array containing particle coordinates.
index index of the particle for which to find the closest nucleus.
Returns:
index of the nucleus closest to the specified particle.

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.

Parameters:
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  ) 


Friends And Related Function Documentation

istream& operator>> ( istream &  strm,
QMCMolecule rhs 
) [friend]

Loads the state of the object from an input stream.

Definition at line 81 of file QMCMolecule.cpp.

ostream& operator<< ( ostream &  strm,
QMCMolecule rhs 
) [friend]

Writes the state of the object to an output stream.

Definition at line 397 of file QMCMolecule.cpp.


Member Data Documentation

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().

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().

The local part of the ecp.

Definition at line 101 of file QMCMolecule.h.

Referenced by QMCPotential_Energy::evaluatePsuedoPotential(), operator<<(), operator=(), and readPsuedoPotential().

The nonlocal part of the ecp.

Definition at line 106 of file QMCMolecule.h.

Referenced by QMCPotential_Energy::evaluatePsuedoPotential(), operator<<(), operator=(), and readPsuedoPotential().

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().

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().

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]

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().


The documentation for this class was generated from the following files:

Generated on Sat Jul 5 16:14:05 2008 for QMcBeaver by  doxygen 1.5.6