LIBINT  2.6.0
Public Member Functions | List of all members
libint2::molden::Export Class Reference

Exports LCAO coefficients in Molden format. More...

#include <molden.h>

Inheritance diagram for libint2::molden::Export:
Inheritance graph
[legend]

Public Member Functions

template<typename Coeffs , typename Occs , typename Energies = Eigen::VectorXd>
 Export (const std::vector< Atom > &atoms, const std::vector< Shell > &basis, const Coeffs &coefficients, const Occs &occupancies, const Energies &energies=Energies(), const std::vector< std::string > &symmetry_labels=std::vector< std::string >(), const std::vector< bool > &spincases=std::vector< bool >(), double coefficient_epsilon=5e-11)
 
void write_prologue (std::ostream &os) const
 writes "[Molden Format]" to ostream os
 
void write_atoms (std::ostream &os) const
 writes the "[Atoms]" section to ostream os
 
void write_basis (std::ostream &os) const
 writes the "[GTO]" section, as well as optional Cartesian/solid harmonics keywords, to ostream os
 
void write_lcao (std::ostream &os) const
 writes the "[MO]" section to ostream os
 
void write (std::ostream &os) const
 writes "prologue", atoms, basis, and LCAOs to ostream os
 
void write (const std::string &filename) const
 same as write(ostream), but creates new file named filename
 

Detailed Description

Exports LCAO coefficients in Molden format.

Constructor & Destructor Documentation

◆ Export()

template<typename Coeffs , typename Occs , typename Energies = Eigen::VectorXd>
libint2::molden::Export::Export ( const std::vector< Atom > &  atoms,
const std::vector< Shell > &  basis,
const Coeffs &  coefficients,
const Occs &  occupancies,
const Energies &  energies = Energies(),
const std::vector< std::string > &  symmetry_labels = std::vector<std::string>(),
const std::vector< bool > &  spincases = std::vector<bool>(),
double  coefficient_epsilon = 5e-11 
)
inline
Template Parameters
Coeffsthe type of LCAO coefficient matrix
Energiesthe type of LCAO energy vector
Occsthe type of LCAO occupancy vector
Parameters
atomsthe set of atoms
basisthe set of shells; must meet Molden requirements (see below)
coefficientsthe matrix of LCAO coefficients (columns are LCAOs, rows are AOs; AOs are ordered according to the order of shells in basis and by the ordering conventions of this Libint configuration)
occupanciesthe vector of occupancies (size = # LCAOs)
energiesthe vector of energies (size = # of LCAOs); the default is to assign zero to each LCAO
symmetry_labelsthe vector of symmetry labels (size = # LCAOs); the default is to assign empty label to each LCAO
spincasesthe vector of spin cases (size = # LCAOs; true = spin-up or m_s=1/2, false = spin-down or m_s=-1/2); the default is to assign spin-up to each LCAO
coefficient_epsilonomit LCAO coefficients with absolute magnitude smaller than this value; set to 0 to write all coefficients (some Molden parsers, e.g. Avogadro2, require this)
Exceptions
std::logic_errorif the basis does not conforms Molden requirements
Note
Molden can only handle basis sets that:
  • p (l=1) shells are Cartesian, not solid harmonics
  • d, f, and g (l=2..4) shells are all Cartesian or all solid harmonics
  • there are no shells with l>5

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