Skip to content

Commit 03b0f35

Browse files
committed
partially reverting 76b6605 since the resulting changes would be too massive ... let's stick with ERI rather than convert to twobody
1 parent 83d791a commit 03b0f35

File tree

3 files changed

+36
-31
lines changed

3 files changed

+36
-31
lines changed

cmake/libint2-config.cmake.in

+20-21
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# static - search for only static library
2424
#
2525
# onebody_dD_lL - search for library including 1-body integrals with derivative order D (D=0..4) and max angular momentum up to L (L=2..10)
26-
# twobody_cC_dD_lL - search for library including 2-body integrals with C centers, derivative order D (D=0..4), and max angular momentum up to L (L=2..10)
26+
# eri_cC_dD_lL - search for library including 2-body integrals with C centers, derivative order D (D=0..4), and max angular momentum up to L (L=2..10)
2727
#
2828
# cart shell_set used_by
2929
# -------- --------- -------
@@ -55,7 +55,7 @@
5555
# ::
5656
#
5757
# find_package(Libint2)
58-
# find_package(Libint2 2.7.0 CONFIG REQUIRED COMPONENTS shared ss twobody_c4_d0_l5 twobody_c4_d1_l4)
58+
# find_package(Libint2 2.7.0 CONFIG REQUIRED COMPONENTS shared ss eri_c4_d0_l5 eri_c4_d1_l4)
5959
#
6060
#
6161
# The following variables can be set to guide the search for this package:
@@ -77,24 +77,24 @@ set (_valid_components
7777
static
7878
shared
7979

80-
twobody_c4_d0_l2
81-
twobody_c4_d0_l3
82-
twobody_c4_d0_l4
83-
twobody_c4_d0_l5
84-
twobody_c4_d0_l6
85-
twobody_c4_d0_l7
86-
twobody_c4_d0_l8
87-
twobody_c4_d0_l9
88-
twobody_c4_d0_l10
89-
twobody_c4_d1_l2
90-
twobody_c4_d1_l3
91-
twobody_c4_d1_l4
92-
twobody_c4_d1_l5
93-
twobody_c4_d1_l6
94-
twobody_c4_d1_l7
95-
twobody_c4_d1_l8
96-
twobody_c4_d1_l9
97-
twobody_c4_d1_l10
80+
eri_c4_d0_l2
81+
eri_c4_d0_l3
82+
eri_c4_d0_l4
83+
eri_c4_d0_l5
84+
eri_c4_d0_l6
85+
eri_c4_d0_l7
86+
eri_c4_d0_l8
87+
eri_c4_d0_l9
88+
eri_c4_d0_l10
89+
eri_c4_d1_l2
90+
eri_c4_d1_l3
91+
eri_c4_d1_l4
92+
eri_c4_d1_l5
93+
eri_c4_d1_l6
94+
eri_c4_d1_l7
95+
eri_c4_d1_l8
96+
eri_c4_d1_l9
97+
eri_c4_d1_l10
9898

9999
ss
100100
so
@@ -120,7 +120,6 @@ list(FIND ${PN}_FIND_COMPONENTS "static" _seek_static)
120120

121121
# check AM & derivative component
122122
set(${PN}_MAX_AM_ERI @Libint2_MAX_AM_ERI@)
123-
set(${PN}_MAX_AM_TWOBODY4 @Libint2_MAX_AM_TWOBODY4@)
124123
foreach(_eri @Libint2_ERI_COMPONENTS@)
125124
set(${PN}_${_eri}_FOUND 1)
126125
endforeach()

cmake/modules/int_am.cmake

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# handle the defaulting and setting of the following variables
2-
# * ENABLE_[ONEBODY|TWOBODY2|TWOBODY3|TWOBODY4|G12|G12DKH]
3-
# * [LIBINT|ONEBODY|TWOBODY2|TWOBODY3|TWOBODY4|G12|G12DKH]_[MAX|OPT]_AM[|_LIST]
2+
# * ENABLE_[ONEBODY|ERI2|ERI3|ERI|G12|G12DKH]
3+
# * [LIBINT|ONEBODY|ERI2|ERI3|ERI|G12|G12DKH]_[MAX|OPT]_AM[|_LIST]
44
# * LIBINT_ONEBODY_DERIV
55
# * LIBINT_SUPPORTS_ONEBODY
66

@@ -142,7 +142,11 @@ macro(process_integrals_class class)
142142
endif()
143143
endif()
144144

145-
set(${class}_MAX_AM "")
145+
if (${INCLUDE_${class}} GREATER_EQUAL 0)
146+
set(${class}_MAX_AM ${LIBINT_MAX_AM})
147+
else()
148+
set(${class}_MAX_AM "")
149+
endif()
146150
set(_max_${class}_MAX_AM ${LIBINT_MAX_AM})
147151
else()
148152
# _max_* variable in case want to default opt_am from it some day
@@ -192,23 +196,23 @@ endmacro()
192196

193197

194198
process_integrals_class(ONEBODY)
195-
process_integrals_class(TWOBODY2)
196-
process_integrals_class(TWOBODY3)
197-
process_integrals_class(TWOBODY4)
199+
process_integrals_class(ERI2)
200+
process_integrals_class(ERI3)
201+
process_integrals_class(ERI)
198202

199203
# discrepancy, as configure doesn't do AM_LIST for these
200204
process_integrals_class(G12)
201205
process_integrals_class(G12DKH)
202206

203207
# form list of active <class>_<deriv><max_am> strings to use in Libint2Config
204-
set(Libint2_TWOBODY_COMPONENTS "")
205-
foreach(_cls TWOBODY2;TWOBODY3;TWOBODY4)
208+
set(Libint2_ERI_COMPONENTS "")
209+
foreach(_cls ERI2;ERI3;ERI4)
206210
string(TOLOWER ${_cls} _lbl)
207211
set(_lbl "${_lbl}_")
208212

209213
foreach (_deriv RANGE 0 ${INCLUDE_${_cls}})
210214
foreach(_l RANGE 0 ${_candidate_${_cls}_d${_deriv}})
211-
list(APPEND Libint2_TWOBODY_COMPONENTS "${_lbl}_d${_deriv}_l${_l}")
215+
list(APPEND Libint2_ERI_COMPONENTS "${_lbl}_d${_deriv}_l${_l}")
212216
endforeach()
213217
endforeach()
214218
endforeach()

cmake/modules/options.cmake

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ endmacro(booleanize01)
5050
#Syntax: option_with_default(<option name> <description> <default value>)
5151
#
5252
macro(option_with_default variable msge default)
53-
if (${variable} MATCHES "^LIBINT_")
53+
# TODO: need to namespace all Libint-specific cmake variables
54+
# disabled for now, pending discussion with @loriab
55+
if (TRUE OR ${variable} MATCHES "^LIBINT_")
5456
print_option(${variable} ${default})
5557
if(NOT DEFINED ${variable} OR "${${variable}}" STREQUAL "")
5658
set(${variable} "${default}" CACHE STRING "${msge}" FORCE)

0 commit comments

Comments
 (0)