Documentation

The MolecularFormula class is used to calculate the molecular formula of a Molecule and return it as a string. The format is "CxHy<rest of elements>" where the "rest" of elements is given in the order of increasing atomic number.

Public Member Functions

 MolecularFormula (const Molecule &m)
 
 ~MolecularFormula ()
 
const std::string & string () const
 
const formula_type & formula () const
 

Constructor & Destructor Documentation

◆ MolecularFormula()

mpqc::MolecularFormula::MolecularFormula ( const Molecule m)
explicit

◆ ~MolecularFormula()

mpqc::MolecularFormula::~MolecularFormula ( )
inline

Member Function Documentation

◆ formula()

const formula_type& mpqc::MolecularFormula::formula ( ) const
inline

returns the formula as a vector of pairs {atomic number of the element, number of occurrences}

◆ string()

const std::string& mpqc::MolecularFormula::string ( ) const
inline

computes and returns molecular formula

Returns
std::string containing the molecular formula.

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