Kindfield
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Friends Pages
Public Member Functions | List of all members
GaussianCore Class Reference

Defines the position, charge and basis functions assigned to a nucleus. More...

#include <gaussiancore.h>

Public Member Functions

 GaussianCore (Vector3 position=Vector3::createZeros(), string fileName="")
 
 GaussianCore (Vector3 position, int atomNumber, string basisName)
 
 GaussianCore (Vector3 position, string atomAbbreviation, string basisName)
 
void load (string fileName)
 
const Vector3position () const
 
void setPosition (const Vector3 &position)
 
const vector
< GaussianContractedOrbital > & 
contractedOrbitals () const
 
void setContractedOrbitals (const vector< GaussianContractedOrbital > &contractedOrbitals)
 
int nElectrons () const
 
void setNElectrons (int nElectrons)
 
HF::AtomType atomType () const
 
void setAtomType (const HF::AtomType &atomType)
 
int charge () const
 
void setCharge (int charge)
 

Detailed Description

Defines the position, charge and basis functions assigned to a nucleus.

The basis functions are loaded from a basis file by use of the TurboMoleParser class.

Definition at line 14 of file gaussiancore.h.

Constructor & Destructor Documentation

GaussianCore::GaussianCore ( Vector3  position = Vector3::createZeros(),
string  fileName = "" 
)

Definition at line 16 of file gaussiancore.cpp.

16  :
17  m_position(position)
18 {
19  if(fileName != "") {
20  load(fileName);
21  }
22 }
GaussianCore::GaussianCore ( Vector3  position,
int  atomNumber,
string  basisName 
)

Definition at line 24 of file gaussiancore.cpp.

24  :
25  m_position(position)
26 {
27  cout << "Got " << atomNumber << " " << basisName << endl;
28  HF::AtomType type = static_cast<HF::AtomType>(atomNumber);
29  string filename = HF::filenameFromAtomAndBasis(type, basisName);
30  load(filename);
31 }
GaussianCore::GaussianCore ( Vector3  position,
string  atomAbbreviation,
string  basisName 
)

Definition at line 33 of file gaussiancore.cpp.

33  :
34  m_position(position)
35 {
36  string filename = HF::filenameFromAtomAndBasis(atomAbbreviation, basisName);
37  load(filename);
38 }

Member Function Documentation

HF::AtomType GaussianCore::atomType ( ) const

Definition at line 89 of file gaussiancore.cpp.

90 {
91  return m_atomType;
92 }
int GaussianCore::charge ( ) const

Definition at line 98 of file gaussiancore.cpp.

99 {
100  return m_charge;
101 }
const vector< GaussianContractedOrbital > & GaussianCore::contractedOrbitals ( ) const

Definition at line 70 of file gaussiancore.cpp.

71 {
72  return m_contractedOrbitals;
73 }
void GaussianCore::load ( string  fileName)

Definition at line 40 of file gaussiancore.cpp.

41 {
43  bool ok = parser.load(fileName);
44  if(!ok) {
45  cerr << "Could not load file " << fileName << endl;
46  throw logic_error("Could not read basis file");
47  }
48  m_atomType = parser.atomType();
49  m_nElectrons = int(m_atomType);
50  m_charge = int(m_atomType);
51  m_contractedOrbitals = parser.contractedBasisFunctions();
52  for(GaussianContractedOrbital &contracted : m_contractedOrbitals) {
53  contracted.setCorePosition(m_position);
54  }
55 }
int GaussianCore::nElectrons ( ) const

Definition at line 80 of file gaussiancore.cpp.

81 {
82  return m_nElectrons;
83 }
const Vector3 & GaussianCore::position ( ) const

Definition at line 57 of file gaussiancore.cpp.

58 {
59  return m_position;
60 }
void GaussianCore::setAtomType ( const HF::AtomType atomType)

Definition at line 94 of file gaussiancore.cpp.

95 {
96  m_atomType = atomType;
97 }
void GaussianCore::setCharge ( int  charge)

Definition at line 103 of file gaussiancore.cpp.

104 {
105  m_charge = charge;
106 }
void GaussianCore::setContractedOrbitals ( const vector< GaussianContractedOrbital > &  contractedOrbitals)

Definition at line 75 of file gaussiancore.cpp.

76 {
77  m_contractedOrbitals = contractedOrbitals;
78 }
void GaussianCore::setNElectrons ( int  nElectrons)

Definition at line 85 of file gaussiancore.cpp.

86 {
87  m_nElectrons = nElectrons;
88 }
void GaussianCore::setPosition ( const Vector3 position)

Definition at line 62 of file gaussiancore.cpp.

63 {
64  m_position = position;
65  for(GaussianContractedOrbital &contracted : m_contractedOrbitals) {
66  contracted.setCorePosition(m_position);
67  }
68 }

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