Skip to content

Commit

Permalink
fix for am=1. final amstr correction
Browse files Browse the repository at this point in the history
  • Loading branch information
loriab committed May 17, 2024
1 parent 85246a1 commit 359df6f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
12 changes: 6 additions & 6 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,21 +213,21 @@ Eventually, these will be CMake Components, too.
```
multipole_hh_dD - library includes spherical multipole integrals with max angular momentum up to
"h" (h=spdfghikl...; s,p not enumerated) and derivative order "D" (D=0,1,2,...).
"h" (h=spdfghikl...) 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=spdfghikl...; s,p not enumerated) and derivative order "D" (D=0,1,2,...).
(h=spdfghikl...) 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=spdfghikl...; s,p not enumerated) and derivative order "D" (D=0,1,2,...).
"h" (h=spdfghikl...) 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
'-D ENABLE_ERI=1 -D 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=spdfghikl..., L=SPDFGHIKL...; l>=h
enumerated; s,p,S,P not enumerated) and derivative order "D" (D=0,1,2,...). The
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 @@ -245,7 +245,7 @@ Eventually, these will be CMake Components, too.
'-D ENABLE_ERI2=2 -D WITH_ERI2_MAX_AM="?;?;>=3"'. The presence of "eri_ff_d2" means the
library configuration did not additionally include "-D ERI2_PURE_SH=ON".
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,...).
"h" (h=spdfghikl...) 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 All @@ -264,7 +264,7 @@ Eventually, these will be CMake Components, too.
### Interfacing
Eventually (approximately 2.9.0 CMake-based), additional functions will be available to retrive Libint version, commit, and literature citation. Below are outputs at the libtool stage.
Eventually (approximately 2.10.0 CMake-based), additional functions will be available to retrive Libint version, commit, and literature citation. Below are outputs at the libtool stage.
```
auto Mmp = libint2::libint_version();
Expand Down
21 changes: 14 additions & 7 deletions cmake/modules/int_am.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
# library to include gradient integrals of at least AM=5.
# See INSTALL.md for details.

# these bounds are for components. Above hard_max produces cmake warning. 0 produces
# error in keeping with configure.ac logic.
set(LIBINT_HARD_MAX_AM 12)
# amstr = "SPDFGHIKLMNOPQRTUVWXYZ"
set(LIBINT_HARD_MIN_AM 0) # formerly 2
# amstr = "SPDFGHIKLMNOQRTUVWXYZ"
set(_am0 "s")
set(_am1 "p")
set(_am2 "d")
set(_am3 "f")
set(_am4 "g")
Expand All @@ -25,7 +30,9 @@ set(_am8 "l")
set(_am9 "m")
set(_am10 "n")
set(_am11 "o")
set(_am12 "p")
set(_am12 "q")
set(_AM0 "S")
set(_AM1 "P")
set(_AM2 "D")
set(_AM3 "F")
set(_AM4 "G")
Expand All @@ -36,7 +43,7 @@ set(_AM8 "L")
set(_AM9 "M")
set(_AM10 "N")
set(_AM11 "O")
set(_AM12 "P")
set(_AM12 "Q")

macro(numerical_max_of_list ansvar liste)
set(_max "-100")
Expand Down Expand Up @@ -375,7 +382,7 @@ add_feature_info(
"MULTIPOLE_MAX_ORDER"
"max_am ${MULTIPOLE_MAX_ORDER}"
)
foreach(_l RANGE 2 ${MULTIPOLE_MAX_ORDER})
foreach(_l RANGE ${LIBINT_HARD_MIN_AM} ${MULTIPOLE_MAX_ORDER})
# RANGE with count-down works but docs say behavior is undefined, so we count-up and reverse
# RANGE starting at 2 avoids enumerating s, p
set(_lbl "multipole_${_am${_l}}${_am${_l}}_d0")
Expand Down Expand Up @@ -412,7 +419,7 @@ foreach(_cls ONEBODY;ERI;ERI3;ERI2;G12;G12DKH)
)
set(_amlist "")
set(_pureamlist "")
foreach(_l RANGE 2 ${_candidate_${_cls}_d${_d}}) # LIBINT_cls_MAX_AM[_LIST]
foreach(_l RANGE ${LIBINT_HARD_MIN_AM} ${_candidate_${_cls}_d${_d}}) # LIBINT_cls_MAX_AM[_LIST]
if (_cls STREQUAL "ERI")
list(APPEND _amlist "eri_${_am${_l}}${_am${_l}}${_am${_l}}${_am${_l}}_d${_d}")
elseif (_cls STREQUAL "ERI2")
Expand All @@ -425,8 +432,8 @@ foreach(_cls ONEBODY;ERI;ERI3;ERI2;G12;G12DKH)
endif()
endforeach()
if (_cls STREQUAL "ERI3")
foreach(_lpr RANGE 2 ${_candidate0_d${_d}}) # LIBINT_MAX_AM[_LIST]
foreach(_lfit RANGE 2 ${_candidate_${_cls}_d${_d}}) # LIBINT_ERI3_MAX_AM[_LIST]
foreach(_lpr RANGE ${LIBINT_HARD_MIN_AM} ${_candidate0_d${_d}}) # LIBINT_MAX_AM[_LIST]
foreach(_lfit RANGE ${LIBINT_HARD_MIN_AM} ${_candidate_${_cls}_d${_d}}) # LIBINT_ERI3_MAX_AM[_LIST]
if (_lfit GREATER_EQUAL _lpr)
list(APPEND _amlist "eri_${_am${_lpr}}${_am${_lpr}}${_AM${_lfit}}_d${_d}")
list(APPEND _pureamlist "eri_${_am${_lpr}}${_am${_lpr}}${_am${_lfit}}_d${_d}")
Expand Down
2 changes: 1 addition & 1 deletion include/libint2/config.h.cmake.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2004-2023 Edward F. Valeev
* Copyright (C) 2004-2024 Edward F. Valeev
*
* This file is part of Libint.
*
Expand Down

0 comments on commit 359df6f

Please sign in to comment.