MPQC  3.0.0-alpha
cartit_gamess.h
1 //
2 // cartit_gamess.h
3 //
4 // Copyright (C) 2011 Edward Valeev
5 //
6 // Author: Edward Valeev <evaleev@vt.edu>
7 // Maintainer: EV
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_libint2_cartitgamess_h
29 #define _chemistry_qc_libint2_cartitgamess_h
30 
31 #include <chemistry/qc/basis/cartiter.h>
32 #include <cgshellinfo.h>
33 #include <chemistry/qc/libint2/macros_gamess.h>
34 
35 namespace sc {
36 
38 
39  static const int lmax = LIBINT2_CARTGAUSS_MAX_AM;
40  static ::libint2::CGShellInfo< ::libint2::CGShellOrderingData< ::libint2::CGShellOrdering_GAMESS,lmax> > ordering_data_;
41 
42  public:
43  CartesianIterGAMESS(int l) :
44  CartesianIter(l) {
45  }
46 
47  void start() {
48  bfn_ = 0;
49  ordering_data_.cartindex_to_ijk(l_, bfn_, a_, b_, c_);
50  }
51 
52  void next() {
53  ++bfn_;
54  if (bfn_ >= INT_NCART(l_)) // if iterated over all basis functions
55  a_ = -1; // set a_ to an invalid value
56  else
57  ordering_data_.cartindex_to_ijk(l_, bfn_, a_, b_, c_);
58  }
59 
60  operator int() {
61  return (a_ >= 0); // check that a_ is valid
62  }
63  };
64 
66 
67  static const int lmax = LIBINT2_CARTGAUSS_MAX_AM;
68  static ::libint2::CGShellInfo< ::libint2::CGShellOrderingData< ::libint2::CGShellOrdering_GAMESS,lmax> > ordering_data_;
69 
70  public:
73  }
74 
75  int bfn() {
76  return ordering_data_.cartindex(l(), a(), b());
77  }
78  };
79 
81 
82  static const int lmax = LIBINT2_CARTGAUSS_MAX_AM;
83  static ::libint2::CGShellInfo< ::libint2::CGShellOrderingData< ::libint2::CGShellOrdering_GAMESS,lmax> > ordering_data_;
84 
85  int bfn_;
86 
87  public:
90  }
91 
92  void start(int aa, int bb, int cc) {
94  bfn_ = ordering_data_.cartindex(l(), a(), b());
95  }
96 
97  int bfn() const { return bfn_; }
98  };
99 
100 }
101 
102 #endif
103 
104 // Local Variables:
105 // mode: c++
106 // c-file-style: "CLJ"
107 // End:
sc::RedundantCartesianIter::RedundantCartesianIter
RedundantCartesianIter(int l)
Create a object for the given angular momentum.
sc::RedundantCartesianIter
RedundantCartesianIter objects loop through all possible combinations of a given number of axes.
Definition: cartiter.h:82
sc::RedundantCartesianSubIter::start
virtual void start(int a, int b, int c)
Initialize the iterator.
sc::RedundantCartesianSubIter::RedundantCartesianSubIter
RedundantCartesianSubIter(int l)
Create a object for the given angular momentum.
sc::CartesianIter::CartesianIter
CartesianIter(int l)
Initialize an iterator for the given angular momentum.
sc::RedundantCartesianIter::a
int a()
The current exponent of x.
Definition: cartiter.h:153
sc::CartesianIter
CartesianIter gives the ordering of the Cartesian functions within a shell for the particular integra...
Definition: cartiter.h:35
sc::RedundantCartesianIterGAMESS::bfn
int bfn()
Return the current Cartesian basis function number.
Definition: cartit_gamess.h:75
sc::CartesianIter::l
int l()
Returns the angular momentum.
Definition: cartiter.h:64
sc::RedundantCartesianSubIterGAMESS::start
void start(int aa, int bb, int cc)
Initialize the iterator.
Definition: cartit_gamess.h:92
sc::RedundantCartesianIterGAMESS
Definition: cartit_gamess.h:65
sc::RedundantCartesianSubIter
Like RedundantCartesianIter, except a, b, and c are fixed to a given value.
Definition: cartiter.h:172
sc::RedundantCartesianSubIter::l
int l() const
The angular momentum.
Definition: cartiter.h:210
sc::RedundantCartesianIter::b
int b()
The current exponent of y.
Definition: cartiter.h:159
sc::RedundantCartesianSubIter::a
int a() const
The current exponent of x.
Definition: cartiter.h:204
sc::RedundantCartesianSubIterGAMESS::bfn
int bfn() const
Return the current Cartesian basis function number.
Definition: cartit_gamess.h:97
sc::RedundantCartesianSubIterGAMESS
Definition: cartit_gamess.h:80
sc::CartesianIterGAMESS
Definition: cartit_gamess.h:37
sc::CartesianIterGAMESS::next
void next()
Move to the next Cartesian function.
Definition: cartit_gamess.h:52
sc::CartesianIterGAMESS::start
void start()
Start the iteration.
Definition: cartit_gamess.h:47
sc::RedundantCartesianIter::l
int l()
The angular momentum.
Definition: cartiter.h:110
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
sc::RedundantCartesianSubIter::b
int b() const
The current exponent of y.
Definition: cartiter.h:206

Generated at Sun Jan 26 2020 23:23:58 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.