MPQC  2.3.1
gaussshell.h
1 //
2 // gaussshell.h
3 //
4 // Copyright (C) 1996 Limit Point Systems, Inc.
5 //
6 // Author: Curtis Janssen <cljanss@limitpt.com>
7 // Maintainer: LPS
8 //
9 // This file is part of the SC Toolkit.
10 //
11 // The SC Toolkit is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU Library General Public License as published by
13 // the Free Software Foundation; either version 2, or (at your option)
14 // any later version.
15 //
16 // The SC Toolkit is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU Library General Public License for more details.
20 //
21 // You should have received a copy of the GNU Library General Public License
22 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 //
25 // The U.S. Government is granted a limited license as per AL 91-7.
26 //
27 
28 #ifndef _chemistry_qc_basis_gaussshell_h
29 #define _chemistry_qc_basis_gaussshell_h
30 
31 #ifdef __GNUC__
32 #pragma interface
33 #endif
34 
35 #include <iostream>
36 #include <util/state/state.h>
37 #include <math/scmat/vector3.h>
38 #include <util/keyval/keyval.h>
39 
40 namespace sc {
41 
42 class CartesianIter;
43 class SphericalTransformIter;
44 class Integral;
45 
48 {
49  public:
50  enum PrimitiveType { Normalized, Unnormalized };
51  enum GaussianType { Cartesian, Pure };
52  private:
53  int nprim;
54  int ncon;
55  int* l;
56  int* puream;
57  double* exp;
58  double** coef; // contraction coefficients for unnormalized primitives
59 
60  // computed data:
61  int nfunc;
62  int min_am_;
63  int max_am_;
64  int ncart_;
65  int has_pure_;
66  void init_computed_data();
67 
68  double shell_normalization(int);
69  void convert_coef();
70  void normalize_shell();
71  PrimitiveType keyval_init(const Ref<KeyVal>&,int,int);
72  static const char* amtypes;
73  static const char* AMTYPES;
74 
75  int test_monobound(double &r, double &bound) const;
76  public:
98  int ncn,
99  int nprm,
100  double* e,
101  int* am,
102  int* pure,
103  double** c,
104  PrimitiveType pt = GaussianShell::Normalized,
105  bool do_normalize_shell = true);
111  int ncn,
112  int nprm,
113  double* e,
114  int* am,
115  GaussianType pure,
116  double** c,
117  PrimitiveType pt = GaussianShell::Normalized);
119  GaussianShell(const Ref<KeyVal>&);
125  GaussianShell(const Ref<KeyVal>&,int pure);
126  ~GaussianShell();
127  void save_data_state(StateOut&);
129  int nprimitive() const { return nprim; }
131  int ncontraction() const { return ncon; }
133  int nfunction() const { return nfunc; }
135  int max_angular_momentum() const { return max_am_; }
137  int min_angular_momentum() const { return min_am_; }
139  int max_cartesian() const;
141  int am(int con) const { return l[con]; }
143  int max_am() const { return max_am_; }
145  int min_am() const { return min_am_; }
147  char amchar(int con) const { return amtypes[l[con]]; }
149  int nfunction(int con) const;
151  int ncartesian() const { return ncart_; }
154  int ncartesian_with_aminc(int aminc) const;
156  int ncartesian(int con) const { return ((l[con]+2)*(l[con]+1))>>1; }
158  int is_cartesian(int con) const { return !puream[con]; }
160  int is_pure(int con) const { return puream[con]; }
162  int has_pure() const { return has_pure_; }
164  double coefficient_unnorm(int con,int prim) const {return coef[con][prim];}
166  double coefficient_norm(int con,int prim) const;
168  double exponent(int iprim) const { return exp[iprim]; }
169 
173  const SCVector3& r, double* basis_values);
177  const SCVector3& R,
178  double* g_values,
179  double* basis_values=0) const;
183  const SCVector3& R,
184  double* h_values, double* g_values=0,
185  double* basis_values=0) const;
186 
190  double relative_overlap(const Ref<Integral>&,
191  int con, int func1, int func2) const;
196  double relative_overlap(int con,
197  int a1, int b1, int c1,
198  int a2, int b2, int c2) const;
199 
201  int equiv(const GaussianShell *s);
202 
205  double extent(double threshold) const;
206 
210  double monobound(double r) const;
211 
212  void print(std::ostream& =ExEnv::out0()) const;
213 };
214 
215 }
216 
217 #endif
218 
219 // Local Variables:
220 // mode: c++
221 // c-file-style: "CLJ"
222 // End:
sc::GaussianShell::nfunction
int nfunction() const
The number of basis functions.
Definition: gaussshell.h:133
sc::GaussianShell::nprimitive
int nprimitive() const
The number of primitive Gaussian shells.
Definition: gaussshell.h:129
sc::GaussianShell::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::GaussianShell::monobound
double monobound(double r) const
Returns a bound for the basis function.
sc::CartesianIter
CartesianIter gives the ordering of the Cartesian functions within a shell for the particular integra...
Definition: cartiter.h:39
sc::GaussianShell::GaussianShell
GaussianShell(int ncn, int nprm, double *e, int *am, int *pure, double **c, PrimitiveType pt=GaussianShell::Normalized, bool do_normalize_shell=true)
A GaussianShell constructor.
sc::Ref
A template class that maintains references counts.
Definition: ref.h:332
sc::GaussianShell::ncartesian
int ncartesian(int con) const
The number of Cartesian functions for the given contraction.
Definition: gaussshell.h:156
sc::GaussianShell::max_am
int max_am() const
The maximum angular momentum of any contraction.
Definition: gaussshell.h:143
sc::GaussianShell::amchar
char amchar(int con) const
The character symbol for the angular momentum of the given contraction.
Definition: gaussshell.h:147
sc::GaussianShell::has_pure
int has_pure() const
Returns nonzero if any contraction is solid harmonics.
Definition: gaussshell.h:162
sc::GaussianShell::coefficient_unnorm
double coefficient_unnorm(int con, int prim) const
Returns the contraction coef for unnormalized primitives.
Definition: gaussshell.h:164
sc::SphericalTransformIter
This iterates through the components of a SphericalTransform.
Definition: chemistry/qc/basis/transform.h:138
sc::StateIn
Restores objects that derive from SavableState.
Definition: statein.h:70
sc::GaussianShell::ncartesian
int ncartesian() const
The total number of functions if this shell was Cartesian.
Definition: gaussshell.h:151
sc::GaussianShell::min_am
int min_am() const
The minimum angular momentum of any contraction.
Definition: gaussshell.h:145
sc::GaussianShell::extent
double extent(double threshold) const
Returns a radius.
sc::GaussianShell::hessian_values
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,...
sc::GaussianShell::equiv
int equiv(const GaussianShell *s)
Returns true if this and the argument are equivalent.
sc::GaussianShell::is_cartesian
int is_cartesian(int con) const
Returns nonzero if contraction con is Cartesian.
Definition: gaussshell.h:158
sc::StateOut
Serializes objects that derive from SavableState.
Definition: stateout.h:61
sc::GaussianShell::relative_overlap
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...
sc::GaussianShell::values
int values(CartesianIter **, SphericalTransformIter **, const SCVector3 &r, double *basis_values)
Compute the values for this shell at position r.
sc::GaussianShell::grad_values
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.
sc::GaussianShell::min_angular_momentum
int min_angular_momentum() const
The minimum angular momentum in the shell.
Definition: gaussshell.h:137
sc::SCVector3
Definition: vector3.h:45
sc::GaussianShell::am
int am(int con) const
The angular momentum of the given contraction.
Definition: gaussshell.h:141
sc::ExEnv::out0
static std::ostream & out0()
Return an ostream that writes from node 0.
sc::GaussianShell::ncontraction
int ncontraction() const
The number of contractions formed from the primitives.
Definition: gaussshell.h:131
sc::GaussianShell::is_pure
int is_pure(int con) const
Returns nonzero if contraction con is solid harmonics.
Definition: gaussshell.h:160
sc::GaussianShell::coefficient_norm
double coefficient_norm(int con, int prim) const
Returns the contraction coef for normalized primitives.
sc::SavableState
Base class for objects that can save/restore state.
Definition: state.h:46
sc::GaussianShell::max_cartesian
int max_cartesian() const
The maximum number of Cartesian functions in any contraction.
sc::GaussianShell::max_angular_momentum
int max_angular_momentum() const
The maximum angular momentum in the shell.
Definition: gaussshell.h:135
sc::GaussianShell::ncartesian_with_aminc
int ncartesian_with_aminc(int aminc) const
The total number of Cartesian functions if this shift is applied to all of the angular momentums.
sc::GaussianShell::exponent
double exponent(int iprim) const
Returns the exponent of the given primitive.
Definition: gaussshell.h:168
sc::GaussianShell::print
void print(std::ostream &=ExEnv::out0()) const
Print the object.
sc::GaussianShell
A Gaussian orbital shell.
Definition: gaussshell.h:47

Generated at Sun Jan 26 2020 23:33:03 for MPQC 2.3.1 using the documentation package Doxygen 1.8.16.