Avogadro::Core::BasisSet#

class BasisSet#

BasisSet contains basis set data.

This is the base class for basis sets, and has two derived classes - GaussianSet and SlaterSet. It must be populated with data, with other classes capable of performing calculations on the data or writing it out.

Author

Marcus D. Hanwell

Subclassed by GaussianSet, SlaterSet

Public Types

enum ElectronType#

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.

Values:

enumerator Paired#
enumerator Alpha#
enumerator Beta#

Public Functions

inline BasisSet()#

Constructor.

inline virtual ~BasisSet()#

Destructor.

virtual BasisSet *clone() const = 0#

Clone.

inline virtual void setElectronCount(unsigned int n, ElectronType type = Paired)#

Set the number of electrons in the BasisSet.

Parameters:
  • n – The number of electrons in the BasisSet.

  • type – The type of the electrons (Alpha, Beta, or Paired).

inline unsigned int electronCount(ElectronType type = Paired) const#
Parameters:

type – The type of the electrons (Alpha, Beta, or Paired).

Returns:

The number of electrons in the molecule.

inline void setMolecule(Molecule *molecule_)#

Set the molecule for the basis set.

inline Molecule *molecule()#

Get the molecule this basis set belongs to.

inline const Molecule *molecule() const#
inline void setName(const std::string &name)#

Set the name of the basis set.

inline std::string name() const#

Get the name of the basis set.

inline void setTheoryName(const std::string &name)#

Set the name of the basis set.

inline std::string theoryName() const#

Get the name of the basis set.

virtual unsigned int molecularOrbitalCount(ElectronType type = Paired) = 0#
Returns:

The number of molecular orbitals in the BasisSet.

inline bool homo(unsigned int n)#

Check if the given MO number is the HOMO or not.

Parameters:

n – The MO number.

Returns:

True if the given MO number is the HOMO.

inline unsigned int homo() const#
Returns:

The molecular orbital number corresponding to the HOMO orbital.

inline bool lumo(unsigned int n)#

Check if the given MO number is the LUMO or not.

Parameters:

n – The MO number.

Returns:

True if the given MO number is the LUMO.

inline unsigned int lumo() const#
Returns:

The molecular orbital number corresponding to the LUMO orbital.

virtual bool isValid() = 0#
Returns:

True of the basis set is valid, false otherwise. Default is true, if false then the basis set is likely unusable.

Protected Attributes

unsigned int m_electrons[2]#

Total number of electrons, 0 is alpha electrons and 1 is beta electrons. For closed shell calculations alpha is doubly occupied and there are no beta electrons.

Molecule *m_molecule#

The Molecule holds the atoms (and possibly bonds) read in from the output file. Most basis sets have orbitals around these atoms, but this is not necessarily the case.

std::string m_name#

The name of the basis set, this is usually a string identifier referencing a standard basis set when only one is used.

std::string m_theoryName#

The name of the theory used for the calculation.