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

This class has the same behavior as GaussianShell, but implements everything using slower data structures, which are easier to construct. These are used to build the basis set, which builds more efficient pointer-based GaussianShell objects. More...

#include <gshell.h>

Public Member Functions

 ShellInfo (int am, const std::vector< double > &c, const std::vector< double > &e, GaussianType pure, int nc, const Vector3 &center, int start, PrimitiveType pt=Normalized)
 
void normalize_shell ()
 
void erd_normalize_shell ()
 
ShellInfo copy ()
 Make a copy of the ShellInfo. More...
 
ShellInfo copy (int nc, const Vector3 &c)
 Make a copy of the ShellInfo. More...
 
int nprimitive () const
 The number of primitive Gaussians. More...
 
int nfunction () const
 Total number of basis functions. More...
 
int ncartesian () const
 Total number of functions if this shell was Cartesian. More...
 
int am () const
 The angular momentum of the given contraction. More...
 
char amchar () const
 The character symbol for the angular momentum of the given contraction. More...
 
char AMCHAR () const
 The character symbol for the angular momentum of the given contraction (upper case) More...
 
bool is_cartesian () const
 Returns true if contraction is Cartesian. More...
 
bool is_pure () const
 Returns true if contraction is pure. More...
 
const Vector3center () const
 Returns the center of the Molecule this shell is on. More...
 
int ncenter () const
 Returns the atom number this shell is on. Used by integral derivatives for indexing. More...
 
double exp (int prim) const
 Returns the exponent of the given primitive. More...
 
double coef (int pi) const
 Return coefficient of pi'th primitive. More...
 
double erd_coef (int pi) const
 Return ERD normalized coefficient of pi'th primitive. More...
 
double original_coef (int pi) const
 Return unnormalized coefficient of pi'th primitive. More...
 
const std::vector< double > & exps () const
 Returns the exponent of the given primitive. More...
 
const std::vector< double > & coefs () const
 Return coefficient of pi'th primitive and ci'th contraction. More...
 
const std::vector< double > & original_coefs () const
 Return unnormalized coefficient of pi'th primitive and ci'th contraction. More...
 
void print (std::string out) const
 Print out the shell. More...
 
int function_index () const
 Basis function index where this shell starts. More...
 
void set_function_index (int i)
 
bool operator== (const ShellInfo &RHS) const
 True if two ShellInfo instances are exactly equal. More...
 
bool operator!= (const ShellInfo &RHS) const
 True if any part of the two ShellInfo instances is unequal. More...
 

Static Public Member Functions

static double normalize (int l, int m, int n)
 Normalize the angular momentum component. More...
 

Private Member Functions

double primitive_normalization (int p)
 
void contraction_normalization ()
 

Private Attributes

int l_
 Angular momentum. More...
 
int puream_
 Flag for pure angular momentum. More...
 
std::vector< double > exp_
 Exponents (of length nprimitives_) More...
 
std::vector< double > coef_
 Contraction coefficients (of length nprimitives_) More...
 
std::vector< double > erd_coef_
 ERD normalized contraction coefficients (of length nprimitives_) More...
 
std::vector< double > original_coef_
 
int nc_
 Atom number this shell goes to. Needed when indexing integral derivatives. More...
 
Vector3 center_
 Atomic center number in the Molecule. More...
 
int start_
 
int ncartesian_
 How many cartesian functions? (1=s, 3=p, 6=d, ...) More...
 
int nfunction_
 

Static Private Attributes

static const char * amtypes = "spdfghiklmnopqrtuvwxyz"
 
static const char * AMTYPES = "SPDFGHIKLMNOPQRTUVWXYZ"
 

Detailed Description

This class has the same behavior as GaussianShell, but implements everything using slower data structures, which are easier to construct. These are used to build the basis set, which builds more efficient pointer-based GaussianShell objects.

Constructor & Destructor Documentation

ShellInfo::ShellInfo ( int  am,
const std::vector< double > &  c,
const std::vector< double > &  e,
GaussianType  pure,
int  nc,
const Vector3 center,
int  start,
PrimitiveType  pt = Normalized 
)

Constructor.

Parameters
eAn array of exponent values.
amAngular momentum.
purePure spherical harmonics, or Cartesian.
cAn array of contraction coefficients.
ncThe atomic center that this shell is located on. Must map back to the correct atom in the owning BasisSet molecule_. Used in integral derivatives for indexing.
centerThe x, y, z position of the shell. This is passed to reduce the number of calls to the molecule.
startThe starting index of the first function this shell provides. Used to provide starting positions in matrices.
ptIs the shell already normalized?

Member Function Documentation

int psi::ShellInfo::am ( ) const
inline

The angular momentum of the given contraction.

char psi::ShellInfo::amchar ( ) const
inline

The character symbol for the angular momentum of the given contraction.

char psi::ShellInfo::AMCHAR ( ) const
inline

The character symbol for the angular momentum of the given contraction (upper case)

const Vector3 & ShellInfo::center ( ) const

Returns the center of the Molecule this shell is on.

double psi::ShellInfo::coef ( int  pi) const
inline

Return coefficient of pi'th primitive.

const std::vector<double>& psi::ShellInfo::coefs ( ) const
inline

Return coefficient of pi'th primitive and ci'th contraction.

void ShellInfo::contraction_normalization ( )
private

Normalizes an entire contraction set. Applies the normalization to the coefficients

ShellInfo ShellInfo::copy ( )

Make a copy of the ShellInfo.

ShellInfo ShellInfo::copy ( int  nc,
const Vector3 c 
)

Make a copy of the ShellInfo.

double psi::ShellInfo::erd_coef ( int  pi) const
inline

Return ERD normalized coefficient of pi'th primitive.

void ShellInfo::erd_normalize_shell ( )
double psi::ShellInfo::exp ( int  prim) const
inline

Returns the exponent of the given primitive.

const std::vector<double>& psi::ShellInfo::exps ( ) const
inline

Returns the exponent of the given primitive.

int psi::ShellInfo::function_index ( ) const
inline

Basis function index where this shell starts.

bool psi::ShellInfo::is_cartesian ( ) const
inline

Returns true if contraction is Cartesian.

bool psi::ShellInfo::is_pure ( ) const
inline

Returns true if contraction is pure.

int psi::ShellInfo::ncartesian ( ) const
inline

Total number of functions if this shell was Cartesian.

int psi::ShellInfo::ncenter ( ) const
inline

Returns the atom number this shell is on. Used by integral derivatives for indexing.

int ShellInfo::nfunction ( ) const

Total number of basis functions.

double ShellInfo::normalize ( int  l,
int  m,
int  n 
)
static

Normalize the angular momentum component.

void ShellInfo::normalize_shell ( )

Handles calling primitive_normalization and contraction_normalization for you.

int ShellInfo::nprimitive ( ) const

The number of primitive Gaussians.

bool psi::ShellInfo::operator!= ( const ShellInfo RHS) const
inline

True if any part of the two ShellInfo instances is unequal.

bool ShellInfo::operator== ( const ShellInfo RHS) const

True if two ShellInfo instances are exactly equal.

double psi::ShellInfo::original_coef ( int  pi) const
inline

Return unnormalized coefficient of pi'th primitive.

const std::vector<double>& psi::ShellInfo::original_coefs ( ) const
inline

Return unnormalized coefficient of pi'th primitive and ci'th contraction.

double ShellInfo::primitive_normalization ( int  p)
private

Normalizes a single primitive.

Parameters
pThe primitive index to normalize.
Returns
Normalization constant to be applied to the primitive.
void ShellInfo::print ( std::string  out) const

Print out the shell.

void psi::ShellInfo::set_function_index ( int  i)
inline

Member Data Documentation

const char * ShellInfo::amtypes = "spdfghiklmnopqrtuvwxyz"
staticprivate

Lookup array that when you index the angular momentum it returns the lowercase letter corresponding to it.

const char * ShellInfo::AMTYPES = "SPDFGHIKLMNOPQRTUVWXYZ"
staticprivate

Lookup array that when you index the angular momentum it returns the uppercase letter corresponding to it.

Vector3 psi::ShellInfo::center_
private

Atomic center number in the Molecule.

std::vector<double> psi::ShellInfo::coef_
private

Contraction coefficients (of length nprimitives_)

std::vector<double> psi::ShellInfo::erd_coef_
private

ERD normalized contraction coefficients (of length nprimitives_)

std::vector<double> psi::ShellInfo::exp_
private

Exponents (of length nprimitives_)

int psi::ShellInfo::l_
private

Angular momentum.

int psi::ShellInfo::nc_
private

Atom number this shell goes to. Needed when indexing integral derivatives.

int psi::ShellInfo::ncartesian_
private

How many cartesian functions? (1=s, 3=p, 6=d, ...)

int psi::ShellInfo::nfunction_
private

How many functions? (1=s, 3=p, 5/6=d, ...) Dependent on the value of puream_

std::vector<double> psi::ShellInfo::original_coef_
private

Original (un-normalized) contraction coefficients (of length nprimitives) Only used in printing.

int psi::ShellInfo::puream_
private

Flag for pure angular momentum.

int psi::ShellInfo::start_
private

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