|
AvogadroLibs 1.100.0
|
A container for Gaussian type outputs from QM codes. More...
#include <avogadro/core/gaussianset.h>
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=default | |
| GaussianSet * | clone () 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 | 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. | |
| bool | setDensityMatrix (const MatrixX &m) |
| bool | setSpinDensityMatrix (const MatrixX &m) |
| bool | generateDensityMatrix () |
| Generate the density matrix if we have the required information. | |
| bool | generateSpinDensityMatrix () |
| Generate the spin density matrix if we have the required information. | |
| unsigned int | molecularOrbitalCount (ElectronType type=Paired) const 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< 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 ()=default | |
| virtual | ~BasisSet ()=default |
| virtual void | setElectronCount (unsigned int n, ElectronType type=Paired) |
| unsigned int | electronCount (ElectronType type=Paired) const |
| void | setMolecule (Molecule *molecule_) |
| Molecule * | molecule () |
| const Molecule * | molecule () const |
| void | setName (const std::string &name) |
| std::string | name () const |
| void | setTheoryName (const std::string &name) |
| std::string | theoryName () const |
| unsigned int | homo (ElectronType type=Paired) const |
| unsigned int | lumo (ElectronType type=Paired) const |
| std::vector< std::string > | symmetryLabels (ElectronType type=Paired) const |
| void | setSymmetryLabels (const std::vector< std::string > &labels, ElectronType type=Paired) |
| void | setMolecularOrbitalEnergy (const std::vector< double > &energies, ElectronType type=Paired) |
| Set the molecular orbital energies, expected in Hartrees. | |
| void | setMolecularOrbitalOccupancy (const std::vector< unsigned char > &occ, ElectronType type=Paired) |
| Set the molecular orbital occupancies. | |
| 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 |
Additional Inherited Members | |
Protected Attributes inherited from BasisSet | |
| std::array< unsigned int, 2 > | m_electrons = {} |
| Molecule * | m_molecule = nullptr |
| std::string | m_name |
| std::string | m_theoryName |
| std::vector< std::string > | m_symmetryLabels [2] |
| std::vector< double > | m_moEnergy [2] |
| This block stores energies for the molecular orbitals (same convention as the molecular orbital coefficients). | |
| std::vector< unsigned char > | m_moOccupancy [2] |
| The occupancy of the molecular orbitals. | |
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.
| enum orbital |
Enumeration of the Gaussian type orbitals.
| GaussianSet | ( | ) |
Constructor.
|
overridedefault |
Destructor.
|
overridevirtual |
Clone.
Implements BasisSet.
| unsigned int addBasis | ( | unsigned int | atom, |
| orbital | type | ||
| ) |
Add a basis to the basis set.
| atom | Index of the atom to add the Basis to. |
| type | The type of the Basis being added. |
| unsigned int addGto | ( | unsigned int | basis, |
| double | c, | ||
| double | a | ||
| ) |
Add a GTO to the supplied basis.
| basis | The index of the Basis to add the GTO to. |
| c | The contraction coefficient of the GTO. |
| a | The exponent of the GTO. |
| void setMolecularOrbitals | ( | const std::vector< double > & | MOs, |
| ElectronType | type = Paired |
||
| ) |
Set the molecular orbital (MO) coefficients to the GaussianSet.
| MOs | Vector containing the MO coefficients for the GaussianSet. |
| type | The type of the MOs (Paired, Alpha, Beta). |
| 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.
| MOs | Vector containing the MO coefficients for the GaussianSet. |
| type | The type of the MOs (Paired, Alpha, Beta). |
| index | The index of the MO in the sequence. |
| int setCount | ( | ) |
Get the number of elements in the set.
| 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.
| void setMolecularOrbitalNumber | ( | const std::vector< unsigned int > & | nums, |
| ElectronType | type = Paired |
||
| ) |
| nums | The MO numbers (starting with an index of 1 for the first one). |
| type | The MO type (Paired, Alpha, Beta). |
| bool setDensityMatrix | ( | const MatrixX & | m | ) |
Set the SCF density matrix for the GaussianSet.
| bool setSpinDensityMatrix | ( | const MatrixX & | m | ) |
Set the spin density matrix for the GaussianSet.
| bool generateDensityMatrix | ( | ) |
| bool generateSpinDensityMatrix | ( | ) |
|
overridevirtual |
Implements BasisSet.
| void outputAll | ( | ElectronType | type = Paired | ) |
Debug routine, outputs all of the data in the GaussianSet.
| type | The electrons to output the information for. |
|
overridevirtual |
Implements BasisSet.
| void setScfType | ( | ScfType | type | ) |
Set the SCF type for the object.
| ScfType scfType | ( | ) | const |
Get the SCF type for the object.
| void setFunctionalName | ( | const std::string & | name | ) |
Set the functional name (if applicable).
| std::string functionalName | ( | ) | const |
Get the functional name (empty if none used).
| void initCalculation | ( | ) |
Initialize the calculation, this must normally be done before anything.
| std::vector< int > & symmetry | ( | ) |
Accessors for the various properties of the GaussianSet.