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
40namespace sc {
41
42class CartesianIter;
43class SphericalTransformIter;
44class 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);
125 GaussianShell(const Ref<KeyVal>&,int pure);
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
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:
CartesianIter gives the ordering of the Cartesian functions within a shell for the particular integra...
Definition cartiter.h:39
static std::ostream & out0()
Return an ostream that writes from node 0.
A Gaussian orbital shell.
Definition gaussshell.h:48
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.
void print(std::ostream &=ExEnv::out0()) const
Print the object.
int nfunction(int con) const
The number of basis functions coming from the given contraction.
int nprimitive() const
The number of primitive Gaussian shells.
Definition gaussshell.h:129
int has_pure() const
Returns nonzero if any contraction is solid harmonics.
Definition gaussshell.h:162
int max_cartesian() const
The maximum number of Cartesian functions in any contraction.
int ncartesian(int con) const
The number of Cartesian functions for the given contraction.
Definition gaussshell.h:156
double coefficient_norm(int con, int prim) const
Returns the contraction coef for normalized primitives.
int is_cartesian(int con) const
Returns nonzero if contraction con is Cartesian.
Definition gaussshell.h:158
int am(int con) const
The angular momentum of the given contraction.
Definition gaussshell.h:141
int equiv(const GaussianShell *s)
Returns true if this and the argument are equivalent.
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.
int max_am() const
The maximum angular momentum of any contraction.
Definition gaussshell.h:143
char amchar(int con) const
The character symbol for the angular momentum of the given contraction.
Definition gaussshell.h:147
double relative_overlap(int con, int a1, int b1, int c1, int a2, int b2, int c2) const
Returns the intra-generalized-contraction overlap matrix element <con func1|con func2> within an arbi...
double coefficient_unnorm(int con, int prim) const
Returns the contraction coef for unnormalized primitives.
Definition gaussshell.h:164
double extent(double threshold) const
Returns a radius.
int ncartesian() const
The total number of functions if this shell was Cartesian.
Definition gaussshell.h:151
int nfunction() const
The number of basis functions.
Definition gaussshell.h:133
GaussianShell(StateIn &)
Restore a GaussianShell from a StateIn object.
int ncartesian_with_aminc(int aminc) const
The total number of Cartesian functions if this shift is applied to all of the angular momentums.
int is_pure(int con) const
Returns nonzero if contraction con is solid harmonics.
Definition gaussshell.h:160
int max_angular_momentum() const
The maximum angular momentum in the shell.
Definition gaussshell.h:135
int min_am() const
The minimum angular momentum of any contraction.
Definition gaussshell.h:145
int min_angular_momentum() const
The minimum angular momentum in the shell.
Definition gaussshell.h:137
int ncontraction() const
The number of contractions formed from the primitives.
Definition gaussshell.h:131
GaussianShell(int ncn, int nprm, double *e, int *am, GaussianType pure, double **c, PrimitiveType pt=GaussianShell::Normalized)
A GaussianShell constructor.
double monobound(double r) const
Returns a bound for the basis function.
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,...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
int values(CartesianIter **, SphericalTransformIter **, const SCVector3 &r, double *basis_values)
Compute the values for this shell at position r.
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...
GaussianShell(const Ref< KeyVal > &, int pure)
Construct a GaussianShell from KeyVal input.
double exponent(int iprim) const
Returns the exponent of the given primitive.
Definition gaussshell.h:168
GaussianShell(const Ref< KeyVal > &)
Construct a GaussianShell from KeyVal input.
A template class that maintains references counts.
Definition ref.h:332
Definition vector3.h:46
Base class for objects that can save/restore state.
Definition state.h:46
This iterates through the components of a SphericalTransform.
Definition chemistry/qc/basis/transform.h:138
Restores objects that derive from SavableState.
Definition statein.h:70
Serializes objects that derive from SavableState.
Definition stateout.h:61

Generated at Thu Jul 18 2024 00:00:00 for MPQC 2.3.1 using the documentation package Doxygen 1.12.0.