28 #ifndef _chemistry_qc_basis_gaussshell_h
29 #define _chemistry_qc_basis_gaussshell_h
32 #include <util/state/state.h>
33 #include <math/scmat/vector3.h>
34 #include <util/keyval/keyval.h>
35 #ifdef MPQC_NEW_FEATURES
36 # include <util/misc/xml.h>
42 class SphericalTransformIter;
52 #ifdef MPQC_NEW_FEATURES
54 #else // MPQC_NEW_FEATURES
56 #endif // MPQC_NEW_FEATURES
59 enum PrimitiveType { Normalized, Unnormalized };
60 enum GaussianType { Cartesian, Pure };
63 static double epsilon() {
return 1.0e-13; }
66 std::vector<unsigned int> l;
67 std::vector<bool> puream;
68 std::vector<double> exp;
69 std::vector<double> coef_blk;
72 void init_computed_data();
73 static void chomp(std::vector<double>& exp, std::vector<double>& coef_blk,
77 std::vector<double*> coef;
84 std::vector<int> contr_to_func_;
85 std::vector<int> func_to_contr_;
87 double shell_normalization(
int);
89 void normalize_shell();
90 PrimitiveType keyval_init(
const Ref<KeyVal>&,
int,
int);
91 int test_monobound(
double &r,
double &bound)
const;
101 static const char* amtypes;
102 static const char* AMTYPES;
117 GaussianShell(
const std::vector<unsigned int>&
am,
118 const std::vector<bool>& puream,
119 const std::vector<double>& exps,
120 const std::vector<double>& contr_coefs,
121 PrimitiveType pt = GaussianShell::Normalized,
122 bool normalize_shell =
true);
132 GaussianShell(
const Ref<KeyVal>& kv,
int pure=-1);
134 GaussianShell(
const GaussianShell&
other);
157 DEPRECATED GaussianShell(
164 PrimitiveType pt = GaussianShell::Normalized,
165 bool do_normalize_shell =
true);
170 DEPRECATED GaussianShell(
177 PrimitiveType pt = GaussianShell::Normalized);
183 static GaussianShell
unit();
199 const std::vector<unsigned int>&
am()
const {
return l; }
201 unsigned int am(
int con)
const {
return l[con]; }
203 unsigned int max_am()
const {
return max_am_; }
205 unsigned int min_am()
const {
return min_am_; }
207 char amchar(
int con)
const {
return amtypes[l[con]]; }
216 unsigned int ncartesian(
int con)
const {
return ((l[con]+2)*(l[con]+1))>>1; }
222 bool is_pure(
int con)
const {
return puream[con]; }
224 const std::vector<bool>&
is_pure()
const {
return puream; }
238 double exponent(
int iprim)
const {
return exp[iprim]; }
240 const std::vector<double>&
exponents()
const {
return this->exp; }
245 const SCVector3& r,
double* basis_values);
251 double* basis_values=0)
const;
256 double* h_values,
double* g_values=0,
257 double* basis_values=0)
const;
263 int con,
int func1,
int func2)
const;
269 int a1,
int b1,
int c1,
270 int a2,
int b2,
int c2)
const;
278 double extent(
double threshold)
const;
287 #if MPQC_NEW_FEATURES
288 virtual boost::property_tree::ptree& write_xml(
289 boost::property_tree::ptree& parent,
const XMLWriter& writer
301 template <
typename Filter>
305 std::vector<unsigned int> am;
306 std::vector<bool> pure;
310 am.push_back(shell.
am(c));
311 pure.push_back(shell.
is_pure(c));
317 std::vector<double> coefs(am.size() * shell.
nprimitive());
331 void ToStateOut(
const GaussianShell &s, StateOut &so,
int &count);
334 void FromStateIn(GaussianShell &s, StateIn &si,
int &count);
unsigned int am(int con) const
The angular momentum of the given contraction.
Definition: gaussshell.h:201
GaussianShell filter(const GaussianShell &shell, Filter f)
constructs a new GaussianShell from shell by applying Filter filter
Definition: gaussshell.h:302
unsigned int ncartesian(int con) const
The number of Cartesian functions for the given contraction.
Definition: gaussshell.h:216
void ToStateOut(const Atom &a, StateOut &so, int &count)
writes Atom to sc::StateOut
unsigned int nprimitive() const
The number of primitive Gaussian shells.
Definition: gaussshell.h:187
const std::vector< bool > & is_pure() const
Vector of booleans that indicate whether each contraction is solid harmonics.
Definition: gaussshell.h:224
double monobound(double r) const
Returns a bound for the basis function.
CartesianIter gives the ordering of the Cartesian functions within a shell for the particular integra...
Definition: cartiter.h:35
friend void FromStateIn(GaussianShell &s, StateIn &si, int &count)
reads GaussianShell from sc::StateIn
A template class that maintains references counts.
Definition: ref.h:361
char amchar(int con) const
The character symbol for the angular momentum of the given contraction.
Definition: gaussshell.h:207
bool is_pure(int con) const
Returns true if contraction con is solid harmonics.
Definition: gaussshell.h:222
bool equiv(const GaussianShell &s) const
Returns true if this and the argument are equivalent.
double coefficient_unnorm(int con, int prim) const
Returns the contraction coef for unnormalized primitives.
Definition: gaussshell.h:232
unsigned int ncartesian() const
The total number of functions if this shell was Cartesian.
Definition: gaussshell.h:211
static double epsilon()
Definition: gaussshell.h:63
unsigned int min_am() const
The minimum angular momentum of any contraction.
Definition: gaussshell.h:205
double extent(double threshold) const
Returns a radius.
friend void ToStateOut(const GaussianShell &s, StateOut &so, int &count)
writes GaussianShell to sc::StateOut
int contraction_to_function(int c) const
Returns the number of the first function in the given contraction.
Definition: gaussshell.h:228
int hessian_values(CartesianIter **, SphericalTransformIter **, const SCVector3 &R, double *h_values, double *g_values=0, double *basis_values=0) const
Like values(...), but computes first and second derivatives of the basis function values,...
SpinCase1 other(SpinCase1 S)
given 1-spin return the other 1-spin
unsigned int ncontraction() const
The number of contractions formed from the primitives.
Definition: gaussshell.h:189
Definition: stateout.h:71
bool has_cartesian() const
Returns nonzero if any contraction is Cartesian.
Definition: gaussshell.h:220
Definition: xmlwriter.h:215
const std::vector< unsigned int > & am() const
The angular momenta of contractions.
Definition: gaussshell.h:199
double relative_overlap(const Ref< Integral > &, int con, int func1, int func2) const
Returns the intra-generalized-contraction overlap matrix element <con func1|con func2> within an arbi...
int function_to_contraction(int f) const
Returns the contraction to which this function belongs.
Definition: gaussshell.h:230
int values(CartesianIter **, SphericalTransformIter **, const SCVector3 &r, double *basis_values)
Compute the values for this shell at position r.
unsigned int max_am() const
The maximum angular momentum of any contraction.
Definition: gaussshell.h:203
int grad_values(CartesianIter **, SphericalTransformIter **, const SCVector3 &R, double *g_values, double *basis_values=0) const
Like values(...), but computes gradients of the basis function values, too.
unsigned int nfunction() const
The number of basis functions.
Definition: gaussshell.h:191
int min_angular_momentum() const
The minimum angular momentum in the shell.
Definition: gaussshell.h:195
Classes which need runtime information about themselves and their relationship to other classes can v...
Definition: class.h:233
const std::vector< double > & exponents() const
Returns the exponents.
Definition: gaussshell.h:240
a 3-element version of SCVector
Definition: vector3.h:43
static std::ostream & out0()
Return an ostream that writes from node 0.
double coefficient_norm(int con, int prim) const
Returns the contraction coef for normalized primitives.
static GaussianShell unit()
bool is_cartesian(int con) const
Returns nonzero if contraction con is Cartesian.
Definition: gaussshell.h:218
int max_cartesian() const
The maximum number of Cartesian functions in any contraction.
int max_angular_momentum() const
The maximum angular momentum in the shell.
Definition: gaussshell.h:193
bool has_pure() const
Returns true if any contraction is solid harmonics.
Definition: gaussshell.h:226
void FromStateIn(Atom &a, StateIn &si, int &count)
reads Atom from sc::StateIn
double exponent(int iprim) const
Returns the exponents of the given primitive.
Definition: gaussshell.h:238
const std::vector< double > & coefficient_unnorm_block() const
returns coefficients for unnormalization primitives, in block form
Definition: gaussshell.h:236
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
void print(std::ostream &=ExEnv::out0()) const
Print the object.
A shell of Gaussian functions.
Definition: gaussshell.h:51
unsigned int ncartesian_with_aminc(int aminc) const
The total number of Cartesian functions if this shift is applied to all of the angular momentums.
Generated at Sun Jan 26 2020 23:23:57 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.