MADNESS 0.10.1
madness::AtomicBasisSet Class Reference

Contracted Gaussian basis. More...

#include <molecularbasis.h>

Classes

class  AnalysisSorter

Public Member Functions

 AtomicBasisSet ()
 AtomicBasisSet (std::string filename)
void atoms_to_bfn (const Molecule &molecule, std::vector< int > &at_to_bf, std::vector< int > &at_nbf) const
 Makes map from atoms to first basis function on atom and number of basis functions on atom.
int basisfn_to_atom (const Molecule &molecule, size_t ibf) const
 Returns the number of the atom the ibf'th basis function is on.
void eval (const Molecule &molecule, double x, double y, double z, double *bf) const
 Evaluates the basis functions.
double eval_guess_density (const Molecule &molecule, double x, double y, double z) const
 Evaluates the guess density.
const Tensor< double > & get_aeps (const Molecule &molecule, size_t iat) const
 Returns the atomic alpha eigenvalues for atom iat.
AtomicBasisFunction get_atomic_basis_function (const Molecule &molecule, size_t ibf) const
 Returns the ibf'th atomic basis function.
const Tensor< double > & get_avec (const Molecule &molecule, size_t iat) const
 Returns the atomic alpha eigenvectors for atom iat.
std::string get_name () const
bool is_supported (int atomic_number) const
void modify_dmat_psp (int atn, double zeff)
 Eliminates core orbitals from the density matrix for pseudopotential calculations.
int nbf (const Molecule &molecule) const
 Given a molecule count the number of basis functions.
void print (const Molecule &molecule) const
 Print basis info for atoms in the molecule (once for each unique atom type).
void print_all () const
 Print basis info for all supported atoms.
template<typename T>
void print_anal (const Molecule &molecule, const Tensor< T > &v) const
 Given a vector of AO coefficients prints an analysis.
void read_file (std::string filename)
 read the atomic basis set from file
void read_nw_file (std::string filename)
 read the atomic basis set from file
template<typename Archive>
void serialize (Archive &ar)
void shells_to_bfn (const Molecule &molecule, std::vector< int > &sh_to_bf, std::vector< int > &sh_nbf) const
 Makes map from shells to first basis function on she and number of basis functions on sh.

Private Member Functions

template<typename T>
Tensor< T > load_tixml_matrix (TiXmlElement *node, int n, int m, const char *name)
template<typename T>
std::vector< T > load_tixml_vector (TiXmlElement *node, int n, const char *name)

Private Attributes

std::vector< AtomicBasis > ag
 Basis associated by atomic number = 1, 2, ...; 0=Bq.
std::string name

Detailed Description

Contracted Gaussian basis.

Constructor & Destructor Documentation

◆ AtomicBasisSet() [1/2]

madness::AtomicBasisSet::AtomicBasisSet ( )
inline

References ag, and name.

◆ AtomicBasisSet() [2/2]

madness::AtomicBasisSet::AtomicBasisSet ( std::string filename)
inline

References ag, madness::filename, name, and read_file().

Member Function Documentation

◆ atoms_to_bfn()

void madness::AtomicBasisSet::atoms_to_bfn ( const Molecule & molecule,
std::vector< int > & at_to_bf,
std::vector< int > & at_nbf ) const
inline

Makes map from atoms to first basis function on atom and number of basis functions on atom.

References ag, at_nbf, at_to_bf, madness::Atom::atomic_number, is_supported(), MADNESS_ASSERT, and molecule.

◆ basisfn_to_atom()

int madness::AtomicBasisSet::basisfn_to_atom ( const Molecule & molecule,
size_t ibf ) const
inline

Returns the number of the atom the ibf'th basis function is on.

References ag, madness::Atom::atomic_number, is_supported(), MADNESS_ASSERT, MADNESS_EXCEPTION, and molecule.

Referenced by print_anal(), and madness::population::PopulationAnalysis::run().

◆ eval()

void madness::AtomicBasisSet::eval ( const Molecule & molecule,
double x,
double y,
double z,
double * bf ) const
inline

Evaluates the basis functions.

References ag, madness::Atom::atomic_number, molecule, madness::Atom::x, madness::Atom::y, and madness::Atom::z.

◆ eval_guess_density()

double madness::AtomicBasisSet::eval_guess_density ( const Molecule & molecule,
double x,
double y,
double z ) const
inline

◆ get_aeps()

const Tensor< double > & madness::AtomicBasisSet::get_aeps ( const Molecule & molecule,
size_t iat ) const
inline

Returns the atomic alpha eigenvalues for atom iat.

References ag, madness::Atom::atomic_number, is_supported(), MADNESS_ASSERT, and molecule.

◆ get_atomic_basis_function()

AtomicBasisFunction madness::AtomicBasisSet::get_atomic_basis_function ( const Molecule & molecule,
size_t ibf ) const
inline

◆ get_avec()

const Tensor< double > & madness::AtomicBasisSet::get_avec ( const Molecule & molecule,
size_t iat ) const
inline

Returns the atomic alpha eigenvectors for atom iat.

References ag, madness::Atom::atomic_number, is_supported(), MADNESS_ASSERT, and molecule.

◆ get_name()

std::string madness::AtomicBasisSet::get_name ( ) const
inline

References name.

◆ is_supported()

bool madness::AtomicBasisSet::is_supported ( int atomic_number) const
inline

◆ load_tixml_matrix()

template<typename T>
Tensor< T > madness::AtomicBasisSet::load_tixml_matrix ( TiXmlElement * node,
int n,
int m,
const char * name )
inlineprivate

References m, MADNESS_ASSERT, and name.

Referenced by read_file().

◆ load_tixml_vector()

template<typename T>
std::vector< T > madness::AtomicBasisSet::load_tixml_vector ( TiXmlElement * node,
int n,
const char * name )
inlineprivate

References MADNESS_ASSERT, and name.

Referenced by read_file().

◆ modify_dmat_psp()

void AtomicBasisSet::modify_dmat_psp ( int atn,
double zeff )

Eliminates core orbitals from the density matrix for pseudopotential calculations.

References ag, e(), madness::FunctionDefaults< NDIM >::debug, madness::inner(), MADNESS_EXCEPTION, madness::BaseTensor::size(), madness::Tensor< T >::sum(), and madness::transpose().

◆ nbf()

int madness::AtomicBasisSet::nbf ( const Molecule & molecule) const
inline

Given a molecule count the number of basis functions.

References ag, madness::Atom::atomic_number, is_supported(), MADNESS_ASSERT, and molecule.

Referenced by print_all(), print_anal(), read_file(), read_nw_file(), and shells_to_bfn().

◆ print()

void AtomicBasisSet::print ( const Molecule & molecule) const

Print basis info for atoms in the molecule (once for each unique atom type).

References ag, madness::Atom::atomic_number, madness::get_atomic_data(), molecule, name, and madness::AtomicData::symbol.

◆ print_all()

void AtomicBasisSet::print_all ( ) const

Print basis info for all supported atoms.

References ag, madness::get_atomic_data(), name, nbf(), and madness::AtomicData::symbol.

◆ print_anal()

template<typename T>
void madness::AtomicBasisSet::print_anal ( const Molecule & molecule,
const Tensor< T > & v ) const
inline

Given a vector of AO coefficients prints an analysis.

For each significant coeff it prints

  • atomic symbol
  • atom number
  • basis function type (e.g., dxy)
  • basis function number
  • MO coeff

References std::abs(), madness::ao, madness::Atom::atomic_number, basisfn_to_atom(), madness::FunctionDefaults< NDIM >::thresh, get_atomic_basis_function(), madness::get_atomic_data(), molecule, nbf(), madness::AtomicData::symbol, and v.

◆ read_file()

void AtomicBasisSet::read_file ( std::string filename)

read the atomic basis set from file

use the default location MRA_CHEMDATA_DIR as defined in the Makefile.am unless it is overridden by the environment variable MRA_CHEMDATA_DIR

Parameters
[in]filenamethe name of the basis set (sto-3g, 6-31g, etc)

References ag, madness::filename, madness::FunctionDefaults< NDIM >::debug, madness::g, is_supported(), load_tixml_matrix(), load_tixml_vector(), MADNESS_ASSERT, MADNESS_EXCEPTION, name, nbf(), and madness::symbol_to_atomic_number().

Referenced by AtomicBasisSet(), and madness::population::PopulationAnalysis::run().

◆ read_nw_file()

void AtomicBasisSet::read_nw_file ( std::string filename)

read the atomic basis set from file

Parameters
[in]filenamethe base name of nwchem files (.out and .movecs)

References ag, slymer::Properties::Atoms, madness::filename, madness::g, nbf(), madness::nwchem, slymer::Atom::symbol, and madness::symbol_to_atomic_number().

◆ serialize()

template<typename Archive>
void madness::AtomicBasisSet::serialize ( Archive & ar)
inline

References ag, and name.

◆ shells_to_bfn()

void madness::AtomicBasisSet::shells_to_bfn ( const Molecule & molecule,
std::vector< int > & sh_to_bf,
std::vector< int > & sh_nbf ) const
inline

Makes map from shells to first basis function on she and number of basis functions on sh.

References ag, madness::Atom::atomic_number, is_supported(), MADNESS_ASSERT, molecule, and nbf().

Member Data Documentation

◆ ag

◆ name

std::string madness::AtomicBasisSet::name
private

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