Psi4
Public Types | Public Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
psi::CoordEntry Class Referenceabstract

#include <coordentry.h>

Inheritance diagram for psi::CoordEntry:
psi::CartesianEntry psi::ZMatrixEntry

Public Types

enum  CoordEntryType { CartesianCoord, ZMatrixCoord }
 

Public Member Functions

 CoordEntry (int entry_number, double Z, double charge, double mass, const std::string &symbol, const std::string &label="")
 
 CoordEntry (int entry_number, double Z, double charge, double mass, const std::string &symbol, const std::string &label, const std::map< std::string, std::string > &basis, const std::map< std::string, std::string > &shells)
 
virtual ~CoordEntry ()
 
virtual const Vector3compute ()=0
 Computes the values of the coordinates (in whichever units were inputted), returning them in a Vector. More...
 
virtual void set_coordinates (double x, double y, double z)=0
 
virtual CoordEntryType type ()=0
 The type of CoordEntry Specialization. More...
 
virtual void print_in_input_format ()=0
 Prints the updated geometry, in the format provided by the user. More...
 
virtual std::string string_in_input_format ()=0
 String of the updated geometry, in the format provided by the user (analog of print_in_input_format) More...
 
bool is_computed () const
 Whether the current atom's coordinates are up-to-date. More...
 
bool is_equivalent_to (const std::shared_ptr< CoordEntry > &other) const
 Whether this atom has the same mass and basis sets as another atom. More...
 
virtual void invalidate ()=0
 Flags the current coordinates as being outdated. More...
 
virtual std::shared_ptr
< CoordEntry
clone (std::vector< std::shared_ptr< CoordEntry > > &atoms, std::map< std::string, double > &map)=0
 Clones the current object, using a user-provided variable array, for deep copying. More...
 
const bool & is_ghosted () const
 Whether the current atom is ghosted or not. More...
 
void set_ghosted (bool ghosted)
 Flag the atom as either ghost or real. More...
 
const double & Z () const
 The nuclear charge of the current atom (0 if ghosted). More...
 
const double & charge () const
 The "atomic charge" of the current atom (for SAD purposes). More...
 
const double & mass () const
 The atomic mass of the current atom. More...
 
const std::string & symbol () const
 The atomic symbol. More...
 
const std::string & label () const
 The atom label. More...
 
const int & entry_number () const
 The order in which this appears in the full atom list. More...
 
void set_nuclear_charge (double newZ)
 Set the nuclear charge for this atom (primarily used in ECP calculations to modify Z). More...
 
void set_basisset (const std::string &name, const std::string &type="BASIS")
 
const std::string & basisset (const std::string &type="BASIS") const
 
const std::map< std::string,
std::string > & 
basissets () const
 
void set_shell (const std::string &name, const std::string &type="BASIS")
 
const std::string & shell (const std::string &type="BASIS") const
 
const std::map< std::string,
std::string > & 
shells () const
 
void set_mass (double mass)
 

Static Protected Member Functions

static double r (const Vector3 &a1, const Vector3 &a2)
 Computes the distance between two sets of coordinates. More...
 
static double a (const Vector3 &a1, const Vector3 &a2, const Vector3 &a3)
 Computes the angle (in rad.) between three sets of coordinates. More...
 
static double d (const Vector3 &a1, const Vector3 &a2, const Vector3 &a3, const Vector3 &a4)
 Computes the dihedral (in rad.) between four sets of coordinates. More...
 

Protected Attributes

int entry_number_
 
bool computed_
 
Vector3 coordinates_
 
double Z_
 Atomic number of the atom. More...
 
double charge_
 
double mass_
 
std::string symbol_
 Label of the atom minus any extra info (H1 => H) More...
 
std::string label_
 Original label from the molecule from the input file (H1) More...
 
bool ghosted_
 Is this a ghost atom? More...
 
std::map< std::string,
std::string > 
basissets_
 Different types of basis sets that can be assigned to this atom. More...
 
std::map< std::string,
std::string > 
shells_
 Short string representation of the numerical contents of basis. More...
 

Friends

template<class Archive >
void save (Archive &ar, const psi::Vector3 &t, size_t)
 
template<class Archive >
void load (Archive &ar, psi::Vector3 &t, size_t)
 

Member Enumeration Documentation

The type of CoordEntry specialization CartesianEntry: Cartesian storage. ZMatrixEntry: ZMatrix storage.

Enumerator
CartesianCoord 
ZMatrixCoord 

Constructor & Destructor Documentation

CoordEntry::CoordEntry ( int  entry_number,
double  Z,
double  charge,
double  mass,
const std::string &  symbol,
const std::string &  label = "" 
)
CoordEntry::CoordEntry ( int  entry_number,
double  Z,
double  charge,
double  mass,
const std::string &  symbol,
const std::string &  label,
const std::map< std::string, std::string > &  basis,
const std::map< std::string, std::string > &  shells 
)
CoordEntry::~CoordEntry ( )
virtual

Member Function Documentation

static double psi::CoordEntry::a ( const Vector3 a1,
const Vector3 a2,
const Vector3 a3 
)
inlinestaticprotected

Computes the angle (in rad.) between three sets of coordinates.

const std::string & CoordEntry::basisset ( const std::string &  type = "BASIS") const

Returns the basis name for the provided type.

Parameters
typeKeyword from input file.
Returns
the value from input.
const std::map<std::string, std::string>& psi::CoordEntry::basissets ( ) const
inline
const double& psi::CoordEntry::charge ( ) const
inline

The "atomic charge" of the current atom (for SAD purposes).

virtual std::shared_ptr<CoordEntry> psi::CoordEntry::clone ( std::vector< std::shared_ptr< CoordEntry > > &  atoms,
std::map< std::string, double > &  map 
)
pure virtual

Clones the current object, using a user-provided variable array, for deep copying.

Implemented in psi::ZMatrixEntry, and psi::CartesianEntry.

virtual const Vector3& psi::CoordEntry::compute ( )
pure virtual

Computes the values of the coordinates (in whichever units were inputted), returning them in a Vector.

Implemented in psi::ZMatrixEntry, and psi::CartesianEntry.

static double psi::CoordEntry::d ( const Vector3 a1,
const Vector3 a2,
const Vector3 a3,
const Vector3 a4 
)
inlinestaticprotected

Computes the dihedral (in rad.) between four sets of coordinates.

const int& psi::CoordEntry::entry_number ( ) const
inline

The order in which this appears in the full atom list.

virtual void psi::CoordEntry::invalidate ( )
pure virtual

Flags the current coordinates as being outdated.

Implemented in psi::ZMatrixEntry, and psi::CartesianEntry.

bool psi::CoordEntry::is_computed ( ) const
inline

Whether the current atom's coordinates are up-to-date.

bool CoordEntry::is_equivalent_to ( const std::shared_ptr< CoordEntry > &  other) const

Whether this atom has the same mass and basis sets as another atom.

Compares the charge, mass, ghost status, and basis set(s) of the current atom with those of another atom

Returns
Whether the two atoms are the same.
const bool& psi::CoordEntry::is_ghosted ( ) const
inline

Whether the current atom is ghosted or not.

const std::string& psi::CoordEntry::label ( ) const
inline

The atom label.

const double& psi::CoordEntry::mass ( ) const
inline

The atomic mass of the current atom.

virtual void psi::CoordEntry::print_in_input_format ( )
pure virtual

Prints the updated geometry, in the format provided by the user.

Implemented in psi::ZMatrixEntry, and psi::CartesianEntry.

static double psi::CoordEntry::r ( const Vector3 a1,
const Vector3 a2 
)
inlinestaticprotected

Computes the distance between two sets of coordinates.

void CoordEntry::set_basisset ( const std::string &  name,
const std::string &  type = "BASIS" 
)

Set the basis for this atom

Parameters
typeKeyword from input file, basis, ri_basis, etc.
nameValue from input file
virtual void psi::CoordEntry::set_coordinates ( double  x,
double  y,
double  z 
)
pure virtual

Given the current set of coordinates, updates the values of this atom's coordinates, and any variables that may depend on it.

Implemented in psi::ZMatrixEntry, and psi::CartesianEntry.

void psi::CoordEntry::set_ghosted ( bool  ghosted)
inline

Flag the atom as either ghost or real.

void psi::CoordEntry::set_mass ( double  mass)
inline
void psi::CoordEntry::set_nuclear_charge ( double  newZ)
inline

Set the nuclear charge for this atom (primarily used in ECP calculations to modify Z).

void CoordEntry::set_shell ( const std::string &  name,
const std::string &  type = "BASIS" 
)

Set the basis hash for this atom

Parameters
typeKeyword from input file, basis, ri_basis, etc.
namehash from basis print_detail
const std::string & CoordEntry::shell ( const std::string &  type = "BASIS") const

Returns the basis name for the provided type.

Parameters
typeKeyword from input file.
Returns
the value from input.
const std::map<std::string, std::string>& psi::CoordEntry::shells ( ) const
inline
virtual std::string psi::CoordEntry::string_in_input_format ( )
pure virtual

String of the updated geometry, in the format provided by the user (analog of print_in_input_format)

Implemented in psi::ZMatrixEntry, and psi::CartesianEntry.

const std::string& psi::CoordEntry::symbol ( ) const
inline

The atomic symbol.

virtual CoordEntryType psi::CoordEntry::type ( )
pure virtual

The type of CoordEntry Specialization.

Implemented in psi::ZMatrixEntry, and psi::CartesianEntry.

const double & CoordEntry::Z ( ) const

The nuclear charge of the current atom (0 if ghosted).

Friends And Related Function Documentation

template<class Archive >
void load ( Archive &  ar,
psi::Vector3 t,
size_t   
)
friend
template<class Archive >
void save ( Archive &  ar,
const psi::Vector3 t,
size_t   
)
friend

Member Data Documentation

std::map<std::string, std::string> psi::CoordEntry::basissets_
protected

Different types of basis sets that can be assigned to this atom.

double psi::CoordEntry::charge_
protected
bool psi::CoordEntry::computed_
protected
Vector3 psi::CoordEntry::coordinates_
protected
int psi::CoordEntry::entry_number_
protected
bool psi::CoordEntry::ghosted_
protected

Is this a ghost atom?

std::string psi::CoordEntry::label_
protected

Original label from the molecule from the input file (H1)

double psi::CoordEntry::mass_
protected
std::map<std::string, std::string> psi::CoordEntry::shells_
protected

Short string representation of the numerical contents of basis.

std::string psi::CoordEntry::symbol_
protected

Label of the atom minus any extra info (H1 => H)

double psi::CoordEntry::Z_
protected

Atomic number of the atom.


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