Skip to content

Commit

Permalink
correct eri3 am ordering in script
Browse files Browse the repository at this point in the history
  • Loading branch information
loriab committed Nov 2, 2023
1 parent 73de7d1 commit 3171be8
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 17 deletions.
16 changes: 8 additions & 8 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@ Evenually, these will be CMake Components, too.

```
multipole_hh_dD - library includes spherical multipole integrals with max angular momentum up to
"h" (h=(sp)dfghikl...; s,p not enumerated) and derivative order "D" (D=0,1,2,...).
"h" (h=spdfghikl...; s,p not enumerated) and derivative order "D" (D=0,1,2,...).
For example, the presence of "multipole_ii_d0" means mpole ints are available for L=6.
onebody_hh_dD - library includes 1-body integrals with max angular momentum up to "h"
(h=(sp)dfghikl...; s,p not enumerated) and derivative order "D" (D=0,1,2,...).
(h=spdfghikl...; s,p not enumerated) and derivative order "D" (D=0,1,2,...).
For example, the presence of "onebody_ii_d1" means onebody gradient ints are
available for L=6.
eri_hhhh_dD - library includes 2-body integrals with 4 centers and max angular momentum up to
"h" (h=(sp)dfghikl...; s,p not enumerated) and derivative order "D" (D=0,1,2,...).
"h" (h=spdfghikl...; s,p not enumerated) and derivative order "D" (D=0,1,2,...).
For example, the presence of "eri_ffff_d1" means 4-center gradient ints are
available for L=3. That is, the library was configured with at least
"--enable-eri=1 --with-eri-max-am=?,>=3".
eri_hhL_dD - library includes 2-body integrals with 3 centers and max angular momentum up to
eri_hhl_dD Cartesian "h" for the two paired centers and Cartesian "l" or solid harmonics "L"
for the unpaired/fitting center, (h/l=(sp)dfghikl..., L=(SP)DFGHIKL...; l>=h
enumerated; s,p not enumerated) and derivative order "D" (D=0,1,2,...). The
for the unpaired/fitting center, (h/l=spdfghikl..., L=SPDFGHIKL...; l>=h
enumerated; s,p,S,P not enumerated) and derivative order "D" (D=0,1,2,...). The
"eri_hhL_dD" component is always available when 3-center ints are present. When pure
solid harmonics are assumed for 3-center ints, "eri_hhl_dD" will *not be available*.
For example, the presence of "eri_ffG_d0" means 3-center energy ints are
Expand All @@ -103,16 +103,16 @@ Evenually, these will be CMake Components, too.
The presence of "eri_ffg_d0" means the library configuration did not additionally
include "--enable-eri3-pure-sh[=yes]".
eri_HH_dD - library includes 2-body integrals with 2 centers and max angular momentum up to
eri_hh_dD Cartesian "h" or solid harmonics "H", (h=(sp)dfghikl..., H=(SP)DFGHIKL...; s,p not
eri_hh_dD Cartesian "h" or solid harmonics "H", (h=spdfghikl..., H=SPDFGHIKL...; s,p,S,P not
enumerated) and derivative order "D" (D=0,1,2,...). The "eri_HH_dD" component is
always available when 2-center ints are present. When pure solid harmonics are
assumed for 2-center ints, "eri_hh_dD" will *not be available*.
For example, the presence of "eri_FF_d2" means 2-center Hessian ints are
available for L=3. That is, the library was configured with at least
"--enable-eri2=2 --with-eri2-max-am=?,?,>=3". The presence of "eri_ff_d2" means the
library configuration did not additionally include "--enable-eri2-pure-sh[=yes]".
g12_hhhh_dD - library includes F12 integrals with Gaussian factors max angular momentum up to
"h" (h=(sp)dfghikl...; s,p not enumerated) and derivative order "D" (D=0,1,2,...).
g12_hhhh_dD - library includes F12 integrals with Gaussian factors and max angular momentum up to
"h" (h=spdfghikl...; s,p not enumerated) and derivative order "D" (D=0,1,2,...).
For example, the presence of "g12_iiii_d2" means g12 Hessian ints are available for L=6.
cart shell_set used_by
Expand Down
45 changes: 37 additions & 8 deletions export/cmake/configuration-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# * For each integrals class, supply a list with max AM for each enabled derivative level.
# * User is responsible for "distributing" defaults across classes and derivs.
# e.g., `--enable-eri3=2 --with-max-am=4` becomes `eri3_max_am = [4, 4, 4]`
# e.g., `--enable-eri2=2 --with-max-am=4` (`--with-eri2-max-am` not specified) becomes `eri2_max_am = [4, 4, 4]`
orderings = "ss"
# max am:
# * only used for unpaired on eri3.
# * only used for paired on eri3.
# * must be same length as eri3_max_am.
# * if `--with-max-am` not given to ./configure, duplicate `eri3_max_am` as `max_am` here.
# * this script will NOT use this as default for other integrals classes.
Expand Down Expand Up @@ -48,12 +48,12 @@
# eri3
no_pure_sh = []
for deriv in range(len(eri3_max_am)):
for am in range(eri3_max_am[deriv], 1, -1):
for am2 in range(max_am[deriv], 1, -1):
if am2 >= am:
centers = amstr[am].lower() * 2 + amstr[am2].upper()
for am_paired in range(max_am[deriv], 1, -1):
for am_fitting in range(eri3_max_am[deriv], 1, -1):
if am_fitting >= am_paired:
centers = amstr[am_paired].lower() * 2 + amstr[am_fitting].upper()
comp = f"eri_{centers}_d{deriv}"
#print(deriv, am, am2, centers, comp)
#print(deriv, am_fitting, am_paired, centers, comp)
components.append(comp)
no_pure_sh.append(comp.lower())
if not eri3_pure_sh:
Expand Down Expand Up @@ -112,8 +112,37 @@
#g12_max_am = [4, 4]

#ans = "ss;multipole_nn_d0;multipole_mm_d0;multipole_ll_d0;multipole_kk_d0;multipole_ii_d0;multipole_hh_d0;multipole_gg_d0;multipole_ff_d0;multipole_dd_d0;onebody_ii_d0;onebody_hh_d0;onebody_gg_d0;onebody_ff_d0;onebody_dd_d0;onebody_hh_d1;onebody_gg_d1;onebody_ff_d1;onebody_dd_d1;onebody_gg_d2;onebody_ff_d2;onebody_dd_d2;eri_hhhh_d0;eri_gggg_d0;eri_ffff_d0;eri_dddd_d0;eri_gggg_d1;eri_ffff_d1;eri_dddd_d1;eri_iiI_d0;eri_hhI_d0;eri_hhH_d0;eri_ggI_d0;eri_ggH_d0;eri_ggG_d0;eri_ffI_d0;eri_ffH_d0;eri_ffG_d0;eri_ffF_d0;eri_ddI_d0;eri_ddH_d0;eri_ddG_d0;eri_ddF_d0;eri_ddD_d0;eri_hhH_d1;eri_ggH_d1;eri_ggG_d1;eri_ffH_d1;eri_ffG_d1;eri_ffF_d1;eri_ddH_d1;eri_ddG_d1;eri_ddF_d1;eri_ddD_d1;eri_iii_d0;eri_hhi_d0;eri_hhh_d0;eri_ggi_d0;eri_ggh_d0;eri_ggg_d0;eri_ffi_d0;eri_ffh_d0;eri_ffg_d0;eri_fff_d0;eri_ddi_d0;eri_ddh_d0;eri_ddg_d0;eri_ddf_d0;eri_ddd_d0;eri_hhh_d1;eri_ggh_d1;eri_ggg_d1;eri_ffh_d1;eri_ffg_d1;eri_fff_d1;eri_ddh_d1;eri_ddg_d1;eri_ddf_d1;eri_ddd_d1;eri_II_d0;eri_HH_d0;eri_GG_d0;eri_FF_d0;eri_DD_d0;eri_HH_d1;eri_GG_d1;eri_FF_d1;eri_DD_d1;eri_ii_d0;eri_hh_d0;eri_gg_d0;eri_ff_d0;eri_dd_d0;eri_hh_d1;eri_gg_d1;eri_ff_d1;eri_dd_d1;g12_gggg_d0;g12_ffff_d0;g12_dddd_d0;g12_gggg_d1;g12_ffff_d1;g12_dddd_d1"

# Another example

#./configure \
# --with-max-am=2,2 \
# --with-eri-max-am=2,2 \
# --with-eri3-max-am=3,2 \
# --enable-eri=1 \
# --enable-eri3=1 \
# --enable-1body=1 \
# --disable-1body-property-derivs \
# --with-multipole-max-order=2 \
# --enable-eri3-pure-sh

## script headmatter
#orderings = "ss"
#max_am = [2, 2]
#multipole = [2]
#onebody = [2, 2]
#eri_max_am = [2, 2]
#eri3_max_am = [3, 2]
#eri3_pure_sh = True
#eri2_max_am = []
#eri2_pure_sh = False
#g12_max_am = []

#ans = "ss;multipole_dd_d0;onebody_dd_d0;onebody_dd_d1;eri_dddd_d0;eri_dddd_d1;eri_ddF_d0;eri_ddD_d0;eri_ddD_d1"

# Check examples

#ans = ans.split(";")
#
#for idx, comp in enumerate(components.split(";")):
# print(comp, ans[idx], comp == ans[idx])
#ans = ";".join(ans)
Expand Down
2 changes: 1 addition & 1 deletion include/libint2/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ enum class Operator {
//! in the order of increasing \c l , with the operators of same \c l but different \c m ordered according to the solid harmonics ordering
//! CCA standard (see macro FOR_SOLIDHARM_STANDARD in shgshell_ordering.h.in). For example, the operators will appear in the following order
//! \f$ \mathcal{N}^+_{0,0} , \mathcal{N}^-_{1,1}, \mathcal{N}^+_{1,0}, \mathcal{N}^+_{1,1}, \mathcal{N}^-_{2,2}, \mathcal{N}^-_{2,1}, \mathcal{N}^+_{2,0}, \mathcal{N}^+_{2,1}, \mathcal{N}^+_{2,2}. \dots \f$ .
//! Previous to cdbb9f3 released in v2.8.0, Standard -or- Gaussian ordering could be be specified at configure time.
//! Previous to cdbb9f3 released in v2.8.0, Standard -or- Gaussian ordering could be be specified at generator/compiler configure time.
sphemultipole,
/// \f$ \delta(\vec{r}_1 - \vec{r}_2) \f$
delta,
Expand Down

0 comments on commit 3171be8

Please sign in to comment.