AvogadroLibs  1.90.0
Public Types | Public Member Functions | List of all members
GaussianSet Class Reference

A container for Gaussian type outputs from QM codes. More...

#include <avogadro/core/gaussianset.h>

Inheritance diagram for GaussianSet:
BasisSet

Public Types

enum  orbital {
  S,
  SP,
  P,
  D,
  D5,
  F,
  F7,
  G,
  G9,
  H,
  H11,
  I,
  I13,
  UU
}
 
- Public Types inherited from BasisSet
enum  ElectronType {
  Paired,
  Alpha,
  Beta
}
 The ElectronType enum describes the type of electrons being set or retrieved. If Paired, then Alpha and Beta cannot be set, if Alpha or Beta then both must be set.
 

Public Member Functions

 GaussianSet ()
 
 ~GaussianSet () AVO_OVERRIDE
 
GaussianSetclone () const AVO_OVERRIDE
 
unsigned int addBasis (unsigned int atom, orbital type)
 
unsigned int addGto (unsigned int basis, double c, double a)
 
void setMolecularOrbitals (const std::vector< double > &MOs, ElectronType type=Paired)
 
void setMolecularOrbtitalEnergy (const std::vector< double > &energies, ElectronType type=Paired)
 Set the molecular orbtial energies, expected in Hartrees. More...
 
void setMolecularOrbtitalOccupancy (const std::vector< unsigned char > &occ, ElectronType type=Paired)
 Set the molecular orbital occupancies. More...
 
void setMolecularOrbtitalNumber (const std::vector< unsigned int > &nums, ElectronType type=Paired)
 This enables support of sparse orbital sets, and provides a mapping from the index in memory to the actual molecular orbital number. More...
 
bool setDensityMatrix (const MatrixX &m)
 
bool setSpinDensityMatrix (const MatrixX &m)
 
bool generateDensityMatrix ()
 Generate the density matrix if we have the required information. More...
 
unsigned int molecularOrbitalCount (ElectronType type=Paired) AVO_OVERRIDE
 
void outputAll (ElectronType type=Paired)
 
bool isValid () AVO_OVERRIDE
 
void setScfType (ScfType type)
 
ScfType scfType () const
 
void initCalculation ()
 
std::vector< int > & symmetry ()
 
std::vector< unsigned int > & atomIndices ()
 
std::vector< unsigned int > & moIndices ()
 
std::vector< unsigned int > & gtoIndices ()
 
std::vector< unsigned int > & cIndices ()
 
std::vector< double > & gtoA ()
 
std::vector< double > & gtoC ()
 
std::vector< double > & gtoCN ()
 
MatrixX & moMatrix (ElectronType type=Paired)
 
MatrixX moMatrix (ElectronType type=Paired) const
 
std::vector< double > & moEnergy (ElectronType type=Paired)
 
std::vector< double > moEnergy (ElectronType type=Paired) const
 
std::vector< unsigned char > & moOccupancy (ElectronType type=Paired)
 
std::vector< unsigned char > moOccupancy (ElectronType type=Paired) const
 
std::vector< unsigned int > & moNumber (ElectronType type=Paired)
 
std::vector< unsigned int > moNumber (ElectronType type=Paired) const
 
MatrixX & densityMatrix ()
 
MatrixX & spinDensityMatrix ()
 
- Public Member Functions inherited from BasisSet
 BasisSet ()
 
virtual ~BasisSet ()
 
virtual void setElectronCount (unsigned int n, ElectronType type=Paired)
 
unsigned int electronCount (ElectronType type=Paired) const
 
void setMolecule (Molecule *molecule_)
 
Moleculemolecule ()
 
const Moleculemolecule () const
 
bool homo (unsigned int n)
 
unsigned int homo () const
 
bool lumo (unsigned int n)
 
unsigned int lumo () const
 

Additional Inherited Members

- Protected Attributes inherited from BasisSet
unsigned int m_electrons [2]
 
Moleculem_molecule
 

Detailed Description

Author
Marcus D. Hanwell

The GaussianSet class has a transparent data structure for storing the basis sets output by many quantum mechanical codes. It has a certain hierarchy where shells are built up from n primitives, in this case Gaussian Type Orbitals (GTOs). Each shell has a type (S, P, D, F, etc) and is composed of one or more GTOs. Each GTO has a contraction coefficient, c, and an exponent, a.

When calculating Molecular Orbitals (MOs) each orthogonal shell has an independent coefficient. That is the S type orbitals have one coefficient, the P type orbitals have three coefficients (Px, Py and Pz), the D type orbitals have five (or six if cartesian types) coefficients, and so on.

Member Enumeration Documentation

◆ orbital

enum orbital

Enumeration of the Gaussian type orbitals.

Constructor & Destructor Documentation

◆ GaussianSet()

Constructor.

◆ ~GaussianSet()

Destructor.

Member Function Documentation

◆ clone()

GaussianSet* clone ( ) const
virtual

Clone.

Implements BasisSet.

◆ addBasis()

unsigned int addBasis ( unsigned int  atom,
orbital  type 
)

Add a basis to the basis set.

Parameters
atomIndex of the atom to add the Basis to.
typeThe type of the Basis being added.
Returns
The index of the added Basis.

◆ addGto()

unsigned int addGto ( unsigned int  basis,
double  c,
double  a 
)

Add a GTO to the supplied basis.

Parameters
basisThe index of the Basis to add the GTO to.
cThe contraction coefficient of the GTO.
aThe exponent of the GTO.
Returns
The index of the added GTO.

◆ setMolecularOrbitals()

void setMolecularOrbitals ( const std::vector< double > &  MOs,
ElectronType  type = Paired 
)

Set the molecular orbital (MO) coefficients to the GaussianSet.

Parameters
MOsVector containing the MO coefficients for the GaussianSet.
typeThe type of the MOs (Paired, Alpha, Beta).

◆ setMolecularOrbtitalEnergy()

void setMolecularOrbtitalEnergy ( const std::vector< double > &  energies,
ElectronType  type = Paired 
)
Parameters
energiesThe vector containing energies for the MOs of type
typeThe type of the electrons being set.

◆ setMolecularOrbtitalOccupancy()

void setMolecularOrbtitalOccupancy ( const std::vector< unsigned char > &  occ,
ElectronType  type = Paired 
)
Parameters
occThe occupancies for the MOs of type.
typeThe type of the electrons being set.

◆ setMolecularOrbtitalNumber()

void setMolecularOrbtitalNumber ( const std::vector< unsigned int > &  nums,
ElectronType  type = Paired 
)
Parameters
numsThe MO numbers (starting with an index of 1 for the first one).
typeThe MO type (Paired, Alpha, Beta).

◆ setDensityMatrix()

bool setDensityMatrix ( const MatrixX &  m)

Set the SCF density matrix for the GaussianSet.

◆ setSpinDensityMatrix()

bool setSpinDensityMatrix ( const MatrixX &  m)

Set the spin density matrix for the GaussianSet.

◆ generateDensityMatrix()

bool generateDensityMatrix ( )
Returns
True on success, false on failure.

◆ molecularOrbitalCount()

unsigned int molecularOrbitalCount ( ElectronType  type = Paired)
virtual
Returns
The number of molecular orbitals in the GaussianSet.

Implements BasisSet.

◆ outputAll()

void outputAll ( ElectronType  type = Paired)

Debug routine, outputs all of the data in the GaussianSet.

Parameters
Theelectrons to output the information for.

◆ isValid()

bool isValid ( )
virtual
Returns
True of the basis set is valid, false otherwise. Default is true, if false then the basis set is likely unusable.

Implements BasisSet.

◆ setScfType()

void setScfType ( ScfType  type)

Set the SCF type for the object.

◆ scfType()

ScfType scfType ( ) const

Get the SCF type for the object.

◆ initCalculation()

void initCalculation ( )

Initialize the calculation, this must normally be done before anything.

◆ symmetry()

std::vector<int>& symmetry ( )

Accessors for the various properties of the GaussianSet.


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