Psi4
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | Friends | List of all members
psi::BasisSet Class Reference

Basis set container class. More...

#include <basisset.h>

Public Member Functions

 BasisSet ()
 
 BasisSet (const std::string &basistype, SharedMolecule mol, std::map< std::string, std::map< std::string, std::vector< ShellInfo > > > &shell_map)
 
int nprimitive () const
 
int max_nprimitive () const
 
int nshell () const
 
int nao () const
 
int nbf () const
 
int max_am () const
 
bool has_puream () const
 
int max_function_per_shell () const
 
std::shared_ptr< Moleculemolecule () const
 
int shell_to_ao_function (int i) const
 
int shell_to_center (int i) const
 
int shell_to_basis_function (int i) const
 
int function_to_shell (int i) const
 
int function_to_center (int i) const
 
int ao_to_shell (int i) const
 
const GaussianShellshell (int si) const
 
const GaussianShellshell (int center, int si) const
 
const std::string & name () const
 Returns the name of this basis set. More...
 
void set_name (const std::string str)
 
const std::string & key () const
 Return the construction key and target information. More...
 
const std::string & target () const
 
void print_by_level (std::string out="outfile", int print_level=2) const
 
void print_summary (std::string out="outfile") const
 
void print_detail (std::string out) const
 
void print_detail () const
 
std::string print_detail_cfour () const
 
void refresh ()
 
int nshell_on_center (int i) const
 Return the number of shells on a given center. More...
 
int shell_on_center (int center, int shell) const
 Return the overall shell number. More...
 
int get_ao_sorted_shell (const int &i)
 Returns the value of the sorted shell list. More...
 
std::vector< int > get_ao_sorted_list ()
 Returns the vector of sorted shell list. More...
 
void compute_phi (double *phi_ao, double x, double y, double z)
 
void print (std::string out) const
 
void print () const
 

Static Public Member Functions

static std::shared_ptr< BasisSetbuild (std::shared_ptr< Molecule > molecule, const std::vector< ShellInfo > &shells)
 
static void initialize_singletons ()
 
static std::shared_ptr< BasisSetzero_ao_basis_set ()
 
static std::shared_ptr
< SOBasisSet
zero_so_basis_set (const std::shared_ptr< IntegralFactory > &factory)
 
static std::pair< std::vector
< std::string >
, std::shared_ptr< BasisSet > > 
test_basis_set (int max_am)
 
static std::shared_ptr< BasisSetconstruct_from_pydict (const std::shared_ptr< Molecule > &mol, py::dict pybs, const int forced_puream)
 
static std::string make_filename (const std::string &basisname)
 

Static Public Attributes

static std::vector< Vector3exp_ao []
 Global arrays of x, y, z exponents. More...
 

Private Attributes

std::string name_
 The name of this basis set (e.g. "BASIS", "RI BASIS") More...
 
std::string key_
 
std::string target_
 
GaussianShellshells_
 Array of gaussian shells. More...
 
std::vector< int > sorted_ao_shell_list_
 vector of shells numbers sorted in acending AM order. More...
 
std::shared_ptr< Moleculemolecule_
 Molecule object. More...
 
int nao_
 Number of atomic orbitals (Cartesian) More...
 
int nbf_
 Number of basis functions (either cartesian or spherical) More...
 
int n_uprimitive_
 The number of unique primitives. More...
 
int n_shells_
 The number of shells. More...
 
int nprimitive_
 The number of primitives. More...
 
int max_am_
 The maximum angular momentum. More...
 
int max_nprimitive_
 The maximum number of primitives in a shell. More...
 
bool puream_
 Whether the basis set is uses spherical basis functions or not. More...
 
int * n_prim_per_shell_
 The number of primitives (and exponents) in each shell. More...
 
int * shell_first_ao_
 The first (Cartesian) atomic orbital in each shell. More...
 
int * shell_first_basis_function_
 The first (Cartesian / spherical) basis function in each shell. More...
 
int * shell_center_
 Shell number to atomic center. More...
 
int * function_to_shell_
 Which shell does a given (Cartesian / spherical) function belong to? More...
 
int * ao_to_shell_
 Which shell does a given Cartesian function belong to? More...
 
int * function_center_
 Which center is a given function on? More...
 
int * center_to_nshell_
 How many shells are there on each center? More...
 
int * center_to_shell_
 What's the first shell on each center? More...
 
double * uexponents_
 The flattened lists of unique exponents. More...
 
double * ucoefficients_
 The flattened lists of unique contraction coefficients (normalized) More...
 
double * uoriginal_coefficients_
 The flattened lists of unique contraction coefficients (as provided by the user) More...
 
double * uerd_coefficients_
 The flattened lists of ERD normalized contraction coefficients. More...
 
double * xyz_
 The flattened list of Cartesian coordinates for each atom. More...
 

Static Private Attributes

static bool initialized_shared_ = false
 

Friends

class BasisSetParser
 
class Gaussian94BasisSetParser
 

Detailed Description

Basis set container class.

Reads the basis set from a checkpoint file object. Also reads the molecule from the checkpoint file storing the information in an internal Molecule class which can be accessed using molecule().

Constructor & Destructor Documentation

BasisSet::BasisSet ( )
psi::BasisSet::BasisSet ( const std::string &  basistype,
SharedMolecule  mol,
std::map< std::string, std::map< std::string, std::vector< ShellInfo > > > &  shell_map 
)

Member Function Documentation

int psi::BasisSet::ao_to_shell ( int  i) const
inline

Given a Cartesian function (AO) number what shell does it correspond to.

std::shared_ptr< BasisSet > BasisSet::build ( std::shared_ptr< Molecule molecule,
const std::vector< ShellInfo > &  shells 
)
static

Builder factory method

Parameters
moleculethe molecule to build the BasisSet around
shellsarray of atom-numbered GaussianShells to build the BasisSet from
Returns
BasisSet corresponding to this molecule and set of shells
void BasisSet::compute_phi ( double *  phi_ao,
double  x,
double  y,
double  z 
)
std::shared_ptr< BasisSet > BasisSet::construct_from_pydict ( const std::shared_ptr< Molecule > &  mol,
py::dict  pybs,
const int  forced_puream 
)
static

Returns a new basis set object Constructs a basis set from the parsed information

Parameters
molPsi4 molecule
py::dictPython dictionary containing the basis information
forced_pureamForce puream or not
int psi::BasisSet::function_to_center ( int  i) const
inline

Given a function what is its atomic center

Parameters
iFunction number
Returns
The atomic center for the i'th function.
int psi::BasisSet::function_to_shell ( int  i) const
inline

Given a function number what shell does it correspond to.

std::vector<int> psi::BasisSet::get_ao_sorted_list ( )
inline

Returns the vector of sorted shell list.

int psi::BasisSet::get_ao_sorted_shell ( const int &  i)
inline

Returns the value of the sorted shell list.

bool psi::BasisSet::has_puream ( ) const
inline

Spherical harmonics?

Returns
true if using spherical harmonics
void BasisSet::initialize_singletons ( )
static

Initialize singleton values that are shared by all basis set objects.

const std::string& psi::BasisSet::key ( ) const
inline

Return the construction key and target information.

std::string BasisSet::make_filename ( const std::string &  basisname)
static

Converts basis set name to a compatible filename.

Parameters
basisnameBasis name
Returns
Compatible file name.
int psi::BasisSet::max_am ( ) const
inline

Maximum angular momentum used in the basis set.

Returns
Maximum angular momentum.
int psi::BasisSet::max_function_per_shell ( ) const
inline

Compute the maximum number of basis functions contained in a shell.

Returns
The max number of basis functions in a shell.
int psi::BasisSet::max_nprimitive ( ) const
inline

Maximum number of primitives in a shell. Examines each shell and find the shell with the maximum number of primitives returns that number of primitives.

Returns
Maximum number of primitives.
std::shared_ptr< Molecule > BasisSet::molecule ( ) const

Molecule this basis is for.

Returns
Shared pointer to the molecule for this basis set.
const std::string& psi::BasisSet::name ( ) const
inline

Returns the name of this basis set.

int psi::BasisSet::nao ( ) const
inline

Number of atomic orbitals (Cartesian).

Returns
The number of atomic orbitals (Cartesian orbitals, always).
int psi::BasisSet::nbf ( ) const
inline

Number of basis functions (Spherical).

Returns
The number of basis functions (Spherical, if has_puream() == true).
int psi::BasisSet::nprimitive ( ) const
inline

Number of primitives.

Returns
The total number of primitives in all contractions.
int psi::BasisSet::nshell ( ) const
inline

Number of shells.

Returns
Number of shells.
int psi::BasisSet::nshell_on_center ( int  i) const
inline

Return the number of shells on a given center.

void BasisSet::print ( std::string  out) const

Print the basis set.

Parameters
outThe file stream to use for printing. Defaults to outfile.
void psi::BasisSet::print ( void  ) const
inline
void BasisSet::print_by_level ( std::string  out = "outfile",
int  print_level = 2 
) const

Print basis set information according to the level of detail in print_level

Parameters
outThe file stream to use for printing. Defaults to outfile.
print_level< 1: Nothing 1: Brief summary 2: Summary and contraction details > 2: Full details Defaults to 2
void BasisSet::print_detail ( std::string  out) const

Prints a detailed PSI3-style summary of the basis (per-atom)

Parameters
outThe file stream to use for printing. Defaults to outfile.
void psi::BasisSet::print_detail ( ) const
inline
std::string BasisSet::print_detail_cfour ( ) const

Returns a string in CFOUR-style of the basis (per-atom) Format from http://slater.chemie.uni-mainz.de/cfour/index.php?n=Main.OldFormatOfAnEntryInTheGENBASFile

void BasisSet::print_summary ( std::string  out = "outfile") const

Prints a short string summarizing the basis set

Parameters
outThe file stream to use for printing. Defaults to outfile.
void BasisSet::refresh ( )

Refresh internal basis set data. Useful if someone has pushed to shells_. Pushing to shells_ happens in the BasisSetParsers, so the parsers will call refresh().

void psi::BasisSet::set_name ( const std::string  str)
inline
const GaussianShell & BasisSet::shell ( int  si) const

Return the si'th Gaussian shell

Parameters
siShell number
Returns
A shared pointer to the GaussianShell object for the i'th shell.
const GaussianShell & BasisSet::shell ( int  center,
int  si 
) const

Return the i'th Gaussian shell on center

Parameters
centeratomic center
siShell number
Returns
A shared pointer to the GaussianShell object for the i'th shell.
int psi::BasisSet::shell_on_center ( int  center,
int  shell 
) const
inline

Return the overall shell number.

int psi::BasisSet::shell_to_ao_function ( int  i) const
inline

Given a shell what is its first AO function

Parameters
iShell number
Returns
The function number for the first function for the i'th shell.
int psi::BasisSet::shell_to_basis_function ( int  i) const
inline

Given a shell what is its first basis function (spherical) function

Parameters
iShell number
Returns
The function number for the first function for the i'th shell.
int psi::BasisSet::shell_to_center ( int  i) const
inline

Given a shell what is its atomic center

Parameters
iShell number
Returns
The atomic center for the i'th shell.
const std::string& psi::BasisSet::target ( ) const
inline
std::pair< std::vector< std::string >, std::shared_ptr< BasisSet > > BasisSet::test_basis_set ( int  max_am)
static

Returns a shell-labeled test basis set object

Parameters
max_ammaximum angular momentum to build
Returns
pair containing shell labels and four-center test basis for use in benchmarking See libmints/benchmark.cc for details
std::shared_ptr< BasisSet > BasisSet::zero_ao_basis_set ( )
static

Returns an empty basis set object.

Returns a BasisSet object that actually has a single s-function at the origin with an exponent of 0.0 and contraction of 1.0.

Returns
A new empty BasisSet object.
static std::shared_ptr<SOBasisSet> psi::BasisSet::zero_so_basis_set ( const std::shared_ptr< IntegralFactory > &  factory)
static

Returns an empty SO basis set object.

Returns an SOBasis object that actually has a single s-function at the origin with an exponent of 0.0 and contraction of 1.0.

Returns
A new empty SOBasis object.

Friends And Related Function Documentation

friend class BasisSetParser
friend
friend class Gaussian94BasisSetParser
friend

Member Data Documentation

int* psi::BasisSet::ao_to_shell_
private

Which shell does a given Cartesian function belong to?

int* psi::BasisSet::center_to_nshell_
private

How many shells are there on each center?

int* psi::BasisSet::center_to_shell_
private

What's the first shell on each center?

std::vector< Vector3 > BasisSet::exp_ao
static

Global arrays of x, y, z exponents.

int* psi::BasisSet::function_center_
private

Which center is a given function on?

int* psi::BasisSet::function_to_shell_
private

Which shell does a given (Cartesian / spherical) function belong to?

bool BasisSet::initialized_shared_ = false
staticprivate
std::string psi::BasisSet::key_
private
int psi::BasisSet::max_am_
private

The maximum angular momentum.

int psi::BasisSet::max_nprimitive_
private

The maximum number of primitives in a shell.

std::shared_ptr<Molecule> psi::BasisSet::molecule_
private

Molecule object.

int* psi::BasisSet::n_prim_per_shell_
private

The number of primitives (and exponents) in each shell.

int psi::BasisSet::n_shells_
private

The number of shells.

int psi::BasisSet::n_uprimitive_
private

The number of unique primitives.

std::string psi::BasisSet::name_
private

The name of this basis set (e.g. "BASIS", "RI BASIS")

int psi::BasisSet::nao_
private

Number of atomic orbitals (Cartesian)

int psi::BasisSet::nbf_
private

Number of basis functions (either cartesian or spherical)

int psi::BasisSet::nprimitive_
private

The number of primitives.

bool psi::BasisSet::puream_
private

Whether the basis set is uses spherical basis functions or not.

int* psi::BasisSet::shell_center_
private

Shell number to atomic center.

int* psi::BasisSet::shell_first_ao_
private

The first (Cartesian) atomic orbital in each shell.

int* psi::BasisSet::shell_first_basis_function_
private

The first (Cartesian / spherical) basis function in each shell.

GaussianShell* psi::BasisSet::shells_
private

Array of gaussian shells.

std::vector<int> psi::BasisSet::sorted_ao_shell_list_
private

vector of shells numbers sorted in acending AM order.

std::string psi::BasisSet::target_
private
double* psi::BasisSet::ucoefficients_
private

The flattened lists of unique contraction coefficients (normalized)

double* psi::BasisSet::uerd_coefficients_
private

The flattened lists of ERD normalized contraction coefficients.

double* psi::BasisSet::uexponents_
private

The flattened lists of unique exponents.

double* psi::BasisSet::uoriginal_coefficients_
private

The flattened lists of unique contraction coefficients (as provided by the user)

double* psi::BasisSet::xyz_
private

The flattened list of Cartesian coordinates for each atom.


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