35 #ifndef MADNESS_CHEM_COREPOTENTIAL_H__INCLUDED
36 #define MADNESS_CHEM_COREPOTENTIAL_H__INCLUDED
69 std::vector<double>
A;
75 const std::vector<int>& n,
76 const std::vector<double>& A,
77 const std::vector<double>& alpha)
78 : l(l), n(n), A(A), alpha(alpha), eprec(1e-4), rcut0(1.0), rcut(1.0) {};
80 double eval(
double r)
const;
86 template <
typename Archive>
88 ar & l & n & A & alpha & eprec & rcut0 &
rcut;
98 CoreOrbital() : Bc(0), type(0), coeff(), expnt(), rsqmax(0.0) {}
100 const std::vector<double>& coeff,
101 const std::vector<double>& expnt,
103 : Bc(Bc), type(type), coeff(coeff), expnt(expnt)
105 double minexpnt = expnt[0];
106 for (
unsigned int i=1; i<expnt.size(); ++i)
107 minexpnt =
std::min(minexpnt,expnt[i]);
108 rsqmax = 18.4/minexpnt;
117 double eval(
int m,
double rsq,
double x,
double y,
double z)
const;
119 double eval_derivative(
int m,
int axis,
double xi,
double rsq,
double x,
double y,
double z)
const;
121 template <
typename Archive>
134 AtomCore() : atomic_number(0), ncore(0), orbital(), potential() {};
138 template <
typename Archive>
140 ar & atomic_number &
ncore;
142 for (std::vector<CoreOrbital>::iterator it=orbital.begin(); it != orbital.end(); ++it) {
149 static const double fc;
152 std::map<unsigned int,AtomCore> atom_core;
162 read_file(filename, std::set<unsigned int>(), eprec);
166 return (atom_core.find(atn) != atom_core.end());
169 inline unsigned int n_core_orb(
const unsigned int atn)
const {
170 return (*(atom_core.find(atn))).second.n_orbital();
174 return (*(atom_core.find(atn))).second.orbital.size();
180 return atom_core.find(atn)->second;
184 return atom_core.find(atn)->second.potential;
187 inline unsigned int get_core_l(
unsigned int atn,
unsigned int core)
const {
191 inline double get_core_bc(
unsigned int atn,
unsigned int core)
const {
195 inline double core_eval(
unsigned int atn,
unsigned int core,
int m,
double rsq,
double x,
double y,
double z)
const {
199 inline double core_derivative(
unsigned int atn,
unsigned int core,
int m,
int axis,
double xi,
double rsq,
double x,
double y,
double z)
const {
204 AtomCore ac = (*(atom_core.find(atn))).second;
209 AtomCore ac = (*(atom_core.find(atn))).second;
219 template <
typename Archive>
223 for (std::map<unsigned int, AtomCore>::iterator it=atom_core.begin(); it != atom_core.end(); ++it) {
224 ar & it->first & it->second;
Definition: chem/corepotential.h:128
double eval_radial(double rsq) const
Definition: chem/corepotential.cc:126
unsigned int n_core_orb_base(const unsigned int atn) const
Definition: chem/corepotential.h:173
double potential(unsigned int atn, double r) const
Definition: chem/corepotential.h:203
CorePotentialManager(std::string filename, double eprec)
Definition: chem/corepotential.h:161
double potential_derivative(unsigned int atn, double xi, double r) const
Definition: chem/corepotential.h:208
unsigned int get_core_l(unsigned int atn, unsigned int core) const
Definition: chem/corepotential.h:187
Definition: chem/corepotential.h:92
unsigned int atomic_number
Definition: chem/corepotential.h:129
::std::string string
Definition: gtest-port.h:872
Defines common mathematical and physical constants.
void set_eprec(double value)
Definition: chem/corepotential.cc:372
void serialize(Archive &ar)
Definition: chem/corepotential.h:122
unsigned int n_orbital() const
Definition: chem/corepotential.h:136
double rcut
Definition: chem/corepotential.h:71
CorePotential get_potential(unsigned int atn) const
Definition: chem/corepotential.h:183
double eval_spherical_harmonics(int m, double x, double y, double z, double &dp, int axis) const
Definition: chem/corepotential.cc:142
AtomCore()
Definition: chem/corepotential.h:134
CoreOrbital()
Definition: chem/corepotential.h:98
CorePotential potential
Definition: chem/corepotential.h:132
std::vector< int > n
Definition: chem/corepotential.h:68
unsigned int n_core_orb(const unsigned int atn) const
Definition: chem/corepotential.h:169
std::string guess_file() const
Definition: chem/corepotential.h:177
int type
Definition: chem/corepotential.h:94
std::vector< int > l
Angular momentum = 0, 1, 2, ...
Definition: chem/corepotential.h:67
std::vector< double > alpha
Definition: chem/corepotential.h:70
CorePotential()
Definition: chem/corepotential.h:73
vector< double > coeff
Definition: chem/corepotential.h:95
double core_derivative(unsigned int atn, unsigned int core, int m, int axis, double xi, double rsq, double x, double y, double z) const
Definition: chem/corepotential.h:199
vector< double > expnt
Definition: chem/corepotential.h:95
Represents a core potential.
Definition: chem/corepotential.h:66
double get_core_bc(unsigned int atn, unsigned int core) const
Definition: chem/corepotential.h:191
double eval(int m, double rsq, double x, double y, double z) const
Definition: chem/corepotential.cc:229
std::vector< double > A
Definition: chem/corepotential.h:69
CoreOrbital(int type, const std::vector< double > &coeff, const std::vector< double > &expnt, double Bc)
Definition: chem/corepotential.h:99
const mpreal min(const mpreal &x, const mpreal &y)
Definition: mpreal.h:2675
unsigned int ncore
Definition: chem/corepotential.h:130
bool is_defined(const unsigned int atn) const
Definition: chem/corepotential.h:165
void serialize(Archive &ar)
Definition: chem/corepotential.h:220
CorePotential(const std::vector< int > &l, const std::vector< int > &n, const std::vector< double > &A, const std::vector< double > &alpha)
Definition: chem/corepotential.h:74
double eval(double r) const
Definition: chem/corepotential.cc:65
double eprec
Definition: chem/corepotential.h:71
std::vector< CoreOrbital > orbital
Definition: chem/corepotential.h:131
double rsqmax
Definition: chem/corepotential.h:96
double eval_derivative(double xi, double r) const
Definition: chem/corepotential.cc:88
void serialize(Archive &ar)
Definition: chem/corepotential.h:87
double Bc
Definition: chem/corepotential.h:93
const double m
Definition: gfit.cc:199
Defines simple templates for printing to std::cout "a la Python".
void set_rcut(double value)
Definition: chem/corepotential.cc:382
double eval_derivative(int m, int axis, double xi, double rsq, double x, double y, double z) const
Definition: chem/corepotential.cc:240
double rcut0
Definition: chem/corepotential.h:71
AtomCore get_atom_core(unsigned int atn) const
Definition: chem/corepotential.h:179
void serialize(Archive &ar)
Definition: chem/corepotential.h:139
double eval_radial_derivative(double rsq, double xi) const
Definition: chem/corepotential.cc:134
double core_eval(unsigned int atn, unsigned int core, int m, double rsq, double x, double y, double z) const
Definition: chem/corepotential.h:195
std::string to_string() const
Definition: chem/corepotential.cc:115
CorePotentialManager()
Definition: chem/corepotential.h:156
void read_file(std::string filename, std::set< unsigned int > atomset, double eprec)
Definition: chem/corepotential.h:148
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45