summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEisuke Kawashima <e-kwsm@users.noreply.github.com>2021-03-02 19:11:45 +0900
committerGitHub <noreply@github.com>2021-03-02 10:11:45 +0000
commit1e0d3115476f0a391b961879e09062fde124ec0b (patch)
treeef74e55205dfabda38c3451d8b14c9e143f8b207
parent50ffb4b868bdc202ffa622e3ae6831a03ef4fcd5 (diff)
downloadspack-1e0d3115476f0a391b961879e09062fde124ec0b.tar.gz
spack-1e0d3115476f0a391b961879e09062fde124ec0b.tar.bz2
spack-1e0d3115476f0a391b961879e09062fde124ec0b.tar.xz
spack-1e0d3115476f0a391b961879e09062fde124ec0b.zip
dftd4: add new package at v3.1.0 (#22007)
-rw-r--r--var/spack/repos/builtin/packages/dftd4/package.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/dftd4/package.py b/var/spack/repos/builtin/packages/dftd4/package.py
new file mode 100644
index 0000000000..cfe4e53728
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dftd4/package.py
@@ -0,0 +1,43 @@
+# Copyright 2013-2021 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 import *
+
+
+class Dftd4(MesonPackage):
+ """Generally Applicable Atomic-Charge Dependent London Dispersion Correction"""
+
+ homepage = "https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dftd4"
+ git = "https://github.com/dftd4/dftd4.git"
+
+ version("main", branch="main")
+ version("3.1.0", tag="v3.1.0")
+ version("3.0.0", tag="v3.0.0")
+
+ variant("openmp", default=True, description="Use OpenMP parallelisation")
+ variant("python", default=False, description="Build Python extension module")
+
+ depends_on("blas")
+ depends_on("cmake", type="build")
+ depends_on("lapack")
+ depends_on("meson@0.57.1:", type="build") # mesonbuild/meson#8377
+ depends_on("pkg-config", type="build")
+ depends_on("py-cffi", when="+python")
+ depends_on("python@3.6:", when="+python")
+
+ def meson_args(self):
+ lapack = self.spec["lapack"].libs.names[0]
+ if lapack == "lapack":
+ lapack = "netlib"
+ elif lapack.startswith("mkl"):
+ lapack = "mkl"
+ elif lapack != "openblas":
+ lapack = "auto"
+
+ return [
+ "-Dlapack={0}".format(lapack),
+ "-Dopenmp={0}".format(str("+openmp" in self.spec).lower()),
+ "-Dpython={0}".format(str("+python" in self.spec).lower()),
+ ]