27 #ifndef _chemistry_qc_basis_gpetite_h
28 #define _chemistry_qc_basis_gpetite_h
32 #include <mpqc_config.h>
33 #include <util/misc/scint.h>
34 #include <chemistry/qc/basis/basis.h>
35 #include <chemistry/qc/basis/petite.h>
50 sc_int_least64_t offset(
int i,
int j,
int k,
int l) {
51 long ij = (i>j?(((i*long(i+1))>>1)+j):(((j*
long(j+1))>>1)+i));
52 long kl = (k>l?(((k*long(k+1))>>1)+l):(((l*
long(l+1))>>1)+k));
54 off = (ij>kl?(((ij*sc_int_least64_t(ij+1))>>1)+kl)
55 :(((kl*sc_int_least64_t(kl+1))>>1)+ij));
72 sc_int_least64_t offset(
int i,
int j,
int k,
int l) {
73 long ij = (i>j?(((i*long(i+1))>>1)+j):(((j*
long(j+1))>>1)+i));
74 return k + nk_*sc_int_least64_t(l + nl_*ij);
90 sc_int_least64_t offset(
int i,
int j,
int k,
int l) {
91 long kl = (k>l?(((k*long(k+1))>>1)+l):(((l*
long(l+1))>>1)+k));
92 return kl + nkl_*sc_int_least64_t(j + nj_*i);
108 sc_int_least64_t offset(
int i,
int j,
int k,
int l) {
109 long ij = (i>j?(((i*long(i+1))>>1)+j):(((j*
long(j+1))>>1)+i));
110 long kl = (k>l?(((k*long(k+1))>>1)+l):(((l*
long(l+1))>>1)+k));
111 return ij + nij_*sc_int_least64_t(kl);
126 sc_int_least64_t offset(
int i,
int j,
int k,
int l) {
130 off = (ij>kl?(((ij*sc_int_least64_t(ij+1))>>1)+kl)
131 :(((kl*sc_int_least64_t(kl+1))>>1)+ij));
147 sc_int_least64_t offset(
int i,
int j,
int k,
int l) {
148 return (i + ni_*sc_int_least64_t(j + nj_*
long(k + nk_*l)));
163 bool c1()
const {
return c1_; }
164 int order()
const {
return ng_; }
175 const Ref<PointGroup>& point_group()
const {
return b1_->molecule()->point_group(); }
176 virtual int in(
int i,
int j,
int k,
int l) = 0;
195 int in(
int i,
int j,
int k,
int l);
204 sc_int_least64_t ijkl = c_.offset(i,j,k,l);
207 const int ng = order();
208 for (
int g=1; g < ng; g++) {
209 int gi = shell_map_i_[i][g];
210 int gj = shell_map_j_[j][g];
211 int gk = shell_map_k_[k][g];
212 int gl = shell_map_l_[l][g];
213 sc_int_least64_t gijkl = c_.offset(gi,gj,gk,gl);
215 if (gijkl > ijkl)
return 0;
216 else if (gijkl == ijkl) nijkl++;
228 sc_int_least64_t offset(
int i,
int j) {
229 const long ij = (i>j?(((i*long(i+1))>>1)+j):(((j*
long(j+1))>>1)+i));
242 sc_int_least64_t offset(
int i,
int j) {
243 return (i + ni_*sc_int_least64_t(j));
256 bool c1()
const {
return c1_; }
257 int order()
const {
return ng_; }
264 const Ref<PointGroup>& point_group()
const {
return b1_->molecule()->point_group(); }
265 virtual int in(
int i,
int j) = 0;
281 int in(
int i,
int j);
292 sc_int_least64_t ij = c_.offset(i,j);
295 const int ng = order();
296 for (
int g=1; g < ng; g++) {
297 int gi = shell_map_i_[i][g];
298 int gj = shell_map_j_[j][g];
299 const sc_int_least64_t gij = c_.offset(gi,gj);
301 if (gij > ij)
return 0;
302 else if (gij == ij) nij++;
This class provides a generalized 2-index petite list.
Definition: gpetite.h:274
If the shell loop structure has 2 fold symmetry between the first two indices and a 2 fold symmetry b...
Definition: gpetite.h:100
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:265
This class is an abstract base to a generalized 2-index petite list.
Definition: gpetite.h:249
The RefSCMatrix class is a smart pointer to an SCMatrix specialization.
Definition: matrix.h:135
A template class that maintains references counts.
Definition: ref.h:361
If the shell loop structure has 2 fold symmetry between the bra and the ket then this should be used ...
Definition: gpetite.h:118
void symmetrize(const Ref< GPetiteList2 > &plist2, const Ref< Integral > &integral, const RefSymmSCMatrix &skel, const RefSymmSCMatrix &sym)
Uses plist2 to convert the "skeleton" matrix into the full matrix. Only applicable when the two basis...
If the shell loop structure has 2 fold symmetry between the first two indices, then this should be us...
Definition: gpetite.h:64
This class provides a generalized four index petite list.
Definition: gpetite.h:186
If the shell loop structure has 8 fold symmetry, then this should be used as the template argument to...
Definition: gpetite.h:42
If the shell loop structure has no symmetry, then this should be used as the template argument to Gen...
Definition: gpetite.h:139
Produces generalized 2 and 4-index petite list objects.
Definition: gpetite.h:310
If the shell loop structure has 2 fold symmetry between the last two indices, then this should be use...
Definition: gpetite.h:82
Can be used as a template argument to GenericPetiteList2.
Definition: gpetite.h:236
The base class for all reference counted objects.
Definition: ref.h:192
This class is an abstract base to a generalized four index petite list.
Definition: gpetite.h:154
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
Can be used as a template argument to GenericPetiteList2.
Definition: gpetite.h:223
Generated at Sun Jan 26 2020 23:23:57 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.