1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Libcint(CMakePackage):
"""Library for analytical Gaussian integrals for quantum chemistry."""
homepage = "https://github.com/sunqm/libcint"
url = "https://github.com/sunqm/libcint/archive/v3.0.4.tar.gz"
maintainers("mfherbst")
license("BSD-2-Clause")
#
# Versions
#
version("5.3.0", sha256="9d4fae074b53a8ce0335e2672d423deca2bda6df8020352e59d23c17a0c1239d")
version("5.2.0", sha256="f9dba1040c445ee81ae5a2a59d9f1291fc0406edad0fb5ea37fceb66c2ef7799")
version("5.1.3", sha256="a239275a0464360c904fd06e67d2e76ef1147e04bc634befb40c67d3e79b3638")
version("3.0.13", sha256="ee64f0bc7fb6073063ac3c9bbef8951feada141e197b1a5cc389c8cccf8dc360")
version("3.0.12", sha256="7409ef41f1465cf4c1ae9834dfc0b0585c0fdc63b55d8ee8b8a7a6d5e31f309d")
version("3.0.11", sha256="4c9c24d4bd4791391848f19a4be5177137aca27a8e0375574101a7a1261157cf")
version("3.0.10", sha256="aac6d9630dc4c62840f03262166e877d3aeaf27b6b33498fb490fa3428f12fe4")
version("3.0.8", sha256="ca94772f74aaf7b8ad4d7c1b09578c9115ec909c3d8b82dacc908c351c631c35")
version("3.0.7", sha256="e603cd90567c6116d4f704ea66a010b447c11052e90db1d91488adc187142ead")
version("3.0.6", sha256="a7d6d46de9be044409270b27727a1d620d21b5fda6aa7291548938e1ced25404")
version("3.0.5", sha256="7bde241ce83c00b89c80459e3af5734d40925d8fd9fcaaa7245f61b08192c722")
version("3.0.4", sha256="0f25ef7ad282dd7a20e4decf283558e4f949243a5423ff4c0cd875276c310c47")
#
# Variants
#
variant("f12", default=True, description="Enable explicitly correlated f12 integrals.")
variant(
"coulomb_erf", default=True, description="Enable attenuated coulomb operator integrals."
)
variant(
"pypzpx",
default=False,
description="Enforce PYPZPX ordering of p-orbitals " "instead of PXPYPZ.",
)
variant("test", default=False, description="Build test programs")
variant("shared", default=True, description="Build the shared library")
#
# Dependencies and conflicts
#
depends_on("cmake@2.6:", type="build")
depends_on("blas")
depends_on("python", type=("build", "test"), when="+test")
depends_on("py-numpy", type=("build", "test"), when="+test")
# Libcint tests only work with a shared libcint library
conflicts("+test~shared")
#
# Settings and cmake cache
#
def cmake_args(self):
spec = self.spec
args = [
"-DWITH_RANGE_COULOMB=" + str("+coulomb_erf" in spec),
"-DPYPZPX=" + str("+pypzpx" in spec),
"-DWITH_F12=" + str("+f12" in spec),
"-DBUILD_SHARED_LIBS=" + str("+shared" in spec),
"-DENABLE_TEST=" + str("+test" in spec),
"-DENABLE_EXAMPLE=OFF", # Requires fortran compiler
]
return args
|