28 #ifndef _chemistry_qc_libint2_macrosgamess_h_
29 #define _chemistry_qc_libint2_macrosgamess_h_
32 #define INT_NONZERO(x) (((x)< -1.0e-15)||((x)> 1.0e-15))
36 enum CGShellOrdering {
37 CGShellOrdering_Standard = LIBINT_CGSHELL_ORDERING_STANDARD,
38 CGShellOrdering_IntV3 = LIBINT_CGSHELL_ORDERING_INTV3,
39 CGShellOrdering_GAMESS = LIBINT_CGSHELL_ORDERING_GAMESS,
40 CGShellOrdering_ORCA = LIBINT_CGSHELL_ORDERING_ORCA
44 #include <cgshellinfo.h>
52 #define INT_CARTINDEX(am,i,j) libint2::CGShellInfo< libint2::CGShellOrderingData<libint2::CGShellOrdering_GAMESS,LIBINT_MAX_AM> >::cartindex(am,i,j)
59 #define FOR_CART(i,j,k,am) for(int __xyz=0; __xyz<INT_NCART(am); ++__xyz) { \
60 libint2::CGShellInfo< libint2::CGShellOrderingData<libint2::CGShellOrdering_GAMESS,LIBINT_MAX_AM> >::cartindex_to_ijk(am,__xyz,i,j,k);
61 #define END_FOR_CART }
71 #define FOR_GCCART(gc,index,i,j,k,sh)\
72 for ((gc)=0; (gc)<(sh)->ncon; (gc)++) {\
74 FOR_CART(i,j,k,(sh)->type[gc].am)
76 #define FOR_GCCART_GS(gc,index,i,j,k,sh)\
77 for ((gc)=0; (gc)<(sh)->ncontraction(); (gc)++) {\
79 FOR_CART(i,j,k,(sh)->am(gc))
81 #define END_FOR_GCCART(index)\
86 #define END_FOR_GCCART_GS(index)\
92 #define FOR_GCCART2(gc,i,j,k,sh)\
93 for ((gc)=0; (gc)<(sh)->ncon; (gc)++) {\
94 FOR_CART(i,j,k,(sh)->type[gc].am)
96 #define END_FOR_GCCART2\
102 #define FOR_SHELLS(c,i,j) for((i)=0;(i)<(c)->n;i++) {\
103 for((j)=0;(j)<(c)->center[(i)].basis.n;j++) {
104 #define END_FOR_SHELLS }}
110 #define INT_NCART(am) ((am>=0)?((((am)+2)*((am)+1))>>1):0)
113 #define INT_NCART_NN(am) ((((am)+2)*((am)+1))>>1)
118 #define INT_NCART_DEC(am,n) ((n)-(am)-1)
119 #define INT_NCART_INC(am,n) ((n)+(am)+2)
124 #define INT_NPURE(am) (2*(am)+1)
130 #define INT_NFUNC(pu,am) ((pu)?INT_NPURE(am):INT_NCART(am))
134 #define INT_SH(c,s) ((c)->center[(c)->center_num[s]].basis.shell[(c)->shell_num[s]])
138 #define INT_SH_AM(c,s) ((c)->center[(c)->center_num[s]].basis.shell[(c)->shell_num[s]].type.am)
142 #define INT_SH_PU(c,s) ((c)->center[(c)->center_num[s]].basis.shell[(c)->shell_num[s]].type.puream)
146 #define INT_CE_SH_AM(c,a,s) ((c)->center[(a)].basis.shell[(s)].type.am)
150 #define INT_CE_SH_PU(c,a,s) ((c)->center[(a)].basis.shell[(s)].type.puream)
155 #define INT_SH_NFUNC(c,s) ((c)->center[(c)->center_num[s]].basis.shell[(c)->shell_num[s]].nfunc)
169 #define INT_MAX1(n1) ((n1)-1)
170 #define INT_MAX2(e12,i,n2) ((e12)?(i):((n2)-1))
171 #define INT_MAX3(e13e24,i,n3) ((e13e24)?(i):((n3)-1))
172 #define INT_MAX4(e13e24,e34,i,j,k,n4) \
173 ((e34)?(((e13e24)&&((k)==(i)))?(j):(k)) \
174 :((e13e24)&&((k)==(i)))?(j):(n4)-1)
198 #endif // header guard