MADNESS  0.10.1
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
madness::AtomicBasisSet Class Reference

Contracted Gaussian basis. More...

#include <molecularbasis.h>

Collaboration diagram for madness::AtomicBasisSet:
Collaboration graph
[legend]

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. More...
 
int basisfn_to_atom (const Molecule &molecule, size_t ibf) const
 Returns the number of the atom the ibf'th basis function is on. More...
 
void eval (const Molecule &molecule, double x, double y, double z, double *bf) const
 Evaluates the basis functions. More...
 
double eval_guess_density (const Molecule &molecule, double x, double y, double z) const
 Evaluates the guess density. More...
 
const Tensor< double > & get_aeps (const Molecule &molecule, size_t iat) const
 Returns the atomic alpha eigenvalues for atom iat. More...
 
AtomicBasisFunction get_atomic_basis_function (const Molecule &molecule, size_t ibf) const
 Returns the ibf'th atomic basis function. More...
 
const Tensor< double > & get_avec (const Molecule &molecule, size_t iat) const
 Returns the atomic alpha eigenvectors for atom iat. More...
 
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. More...
 
int nbf (const Molecule &molecule) const
 Given a molecule count the number of basis functions. More...
 
void print (const Molecule &molecule) const
 Print basis info for atoms in the molecule (once for each unique atom type) More...
 
void print_all () const
 Print basis info for all supported atoms. More...
 
template<typename T >
void print_anal (const Molecule &molecule, const Tensor< T > &v) const
 Given a vector of AO coefficients prints an analysis. More...
 
void read_file (std::string filename)
 read the atomic basis set from file More...
 
void read_nw_file (std::string filename)
 read the atomic basis set from file More...
 
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. More...
 

Private Member Functions

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

Private Attributes

std::vector< AtomicBasisag
 Basis associated by atomic number = 1, 2, ...; 0=Bq. More...
 
std::string name
 

Detailed Description

Contracted Gaussian basis.

Constructor & Destructor Documentation

◆ AtomicBasisSet() [1/2]

madness::AtomicBasisSet::AtomicBasisSet ( )
inline

◆ AtomicBasisSet() [2/2]

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

References madness::filename, 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.

Referenced by madness::Localizer::Localizer(), MiniDFT::makeao(), and madness::SCF::project_ao_basis().

◆ 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().

◆ 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.

Referenced by madness::Localizer::localize_new().

◆ get_name()

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

◆ 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.

◆ 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.

◆ modify_dmat_psp()

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

Eliminates core orbitals from the density matrix for pseudopotential calculations.

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

Referenced by madness::SCF::initial_guess().

◆ nbf()

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

◆ 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::Atom::atomic_number, basisfn_to_atom(), get_atomic_basis_function(), madness::get_atomic_data(), madness::AtomicBasisFunction::get_desc(), molecule, nbf(), madness::AtomicData::symbol, thresh, and v.

Referenced by madness::SCF::analyze_vectors().

◆ 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, debug, madness::filename, madness::g, is_supported(), MADNESS_ASSERT, MADNESS_EXCEPTION, name, nbf(), madness::symbol_to_atomic_number(), and madness::type().

Referenced by AtomicBasisSet(), madness::Znemo::Znemo(), MiniDFT::doit(), madness::Solver< T, NDIM >::init(), main(), and madness::SCF::reset_aobasis().

◆ 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, slymer::ES_Interface::atoms, madness::filename, madness::g, nbf(), slymer::NWChem_Interface::read(), slymer::Atom::symbol, and madness::symbol_to_atomic_number().

Referenced by madness::SCF::SCF().

◆ 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().

Referenced by madness::Localizer::localize_new().

Member Data Documentation

◆ ag

std::vector<AtomicBasis> madness::AtomicBasisSet::ag
private

◆ name

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

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