AvogadroLibs 1.97.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 () override
 
GaussianSetclone () const 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 setMolecularOrbitals (const std::vector< double > &MOs, ElectronType type, Index index)
 
int setCount ()
 
bool setActiveSetStep (int index)
 
void setMolecularOrbitalEnergy (const std::vector< double > &energies, ElectronType type=Paired)
 Set the molecular orbital energies, expected in Hartrees. More...
 
void setMolecularOrbitalOccupancy (const std::vector< unsigned char > &occ, ElectronType type=Paired)
 Set the molecular orbital occupancies. More...
 
void setMolecularOrbitalNumber (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) override
 
void outputAll (ElectronType type=Paired)
 
bool isValid () override
 
void setScfType (ScfType type)
 
ScfType scfType () const
 
void setFunctionalName (const std::string &name)
 
std::string functionalName () const
 
void initCalculation ()
 
std::vector< int > & symmetry ()
 
std::vector< int > symmetry () const
 
std::vector< unsigned int > & atomIndices ()
 
std::vector< unsigned int > atomIndices () const
 
std::vector< unsigned int > & moIndices ()
 
std::vector< unsigned int > moIndices () const
 
std::vector< unsigned int > & gtoIndices ()
 
std::vector< unsigned int > gtoIndices () const
 
std::vector< unsigned int > & cIndices ()
 
std::vector< unsigned int > cIndices () const
 
std::vector< double > & gtoA ()
 
std::vector< double > gtoA () const
 
std::vector< double > & gtoC ()
 
std::vector< double > gtoC () const
 
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 BasisSetclone () const =0
 
virtual void setElectronCount (unsigned int n, ElectronType type=Paired)
 
unsigned int electronCount (ElectronType type=Paired) const
 
void setMolecule (Molecule *molecule_)
 
Moleculemolecule ()
 
const Moleculemolecule () const
 
void setName (const std::string &name)
 
std::string name () const
 
void setTheoryName (const std::string &name)
 
std::string theoryName () const
 
virtual unsigned int molecularOrbitalCount (ElectronType type=Paired)=0
 
bool homo (unsigned int n)
 
unsigned int homo () const
 
bool lumo (unsigned int n)
 
unsigned int lumo () const
 
virtual bool isValid ()=0
 

Additional Inherited Members

- Protected Attributes inherited from BasisSet
unsigned int m_electrons [2]
 
Moleculem_molecule
 
std::string m_name
 
std::string m_theoryName
 

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

~GaussianSet ( )
override

Destructor.

Member Function Documentation

◆ clone()

GaussianSet * clone ( ) const
overridevirtual

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() [1/2]

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

◆ setMolecularOrbitals() [2/2]

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

Set the molecular orbital (MO) coefficients for a given index. Note that this must be used with coordinate sets to work correctly.

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

◆ setCount()

int setCount ( )

Get the number of elements in the set.

◆ setActiveSetStep()

bool setActiveSetStep ( int  index)

Set the active element in the set, this expects a corresponding coordinate set element, and will change the active MO matrix.

◆ setMolecularOrbitalEnergy()

void setMolecularOrbitalEnergy ( 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.

◆ setMolecularOrbitalOccupancy()

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

◆ setMolecularOrbitalNumber()

void setMolecularOrbitalNumber ( 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)
overridevirtual
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
typeThe electrons to output the information for.

◆ isValid()

bool isValid ( )
overridevirtual
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.

◆ setFunctionalName()

void setFunctionalName ( const std::string &  name)

Set the functional name (if applicable).

◆ functionalName()

std::string functionalName ( ) const

Get the functional name (empty if none used).

◆ 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: