From ddaa9d5d8120b104d2de4934855e6fc5bcc3b518 Mon Sep 17 00:00:00 2001 From: Hubertus van Dam Date: Mon, 13 Jan 2025 18:28:05 +0100 Subject: [PATCH] pace: new package (#47561) * Adding the PACE library to the LAMMPS build * Adding the PACE library for ML-PACE in LAMMPS --------- Co-authored-by: Richard Berger --- .../repos/builtin/packages/lammps/package.py | 3 +- .../repos/builtin/packages/pace/package.py | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/pace/package.py diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py index ea81e92fe48..17ad7a620f1 100644 --- a/var/spack/repos/builtin/packages/lammps/package.py +++ b/var/spack/repos/builtin/packages/lammps/package.py @@ -502,6 +502,7 @@ def url_for_version(self, version): "misc": {}, "ml-hdnnp": {"when": "@20210702:"}, "ml-iap": {"when": "@20210702:"}, + "ml-pace": {"when": "@20210702:"}, "ml-pod": {"when": "@20221222:"}, "ml-rann": {"when": "@20210702:"}, "ml-snap": {"when": "@20210702:"}, @@ -583,7 +584,6 @@ def url_for_version(self, version): "vtk": {"when": "@20210702:"}, "yaff": {"when": "@20210702:"}, # "mdi": {"when": "@20210702:"}, no mdi package - # "ml-pace": {"when": "@20210702:"}, no pace package # "ml-quip": {"when": "@20210702:"}, no quip package # "scafacos": {"when": "@20210702:"}, no scafacos package # "user-quip": {"when": "@20190201:20210527"}, no quip package @@ -716,6 +716,7 @@ def url_for_version(self, version): depends_on("plumed", when="+plumed") depends_on("eigen@3:", when="+user-smd") depends_on("eigen@3:", when="+machdyn") + depends_on("pace", when="+ml-pace", type="build") depends_on("py-cython", when="+mliap+python", type="build") depends_on("py-cython", when="+ml-iap+python", type="build") depends_on("py-pip", when="+python", type="build") diff --git a/var/spack/repos/builtin/packages/pace/package.py b/var/spack/repos/builtin/packages/pace/package.py new file mode 100644 index 00000000000..9523ebfd794 --- /dev/null +++ b/var/spack/repos/builtin/packages/pace/package.py @@ -0,0 +1,41 @@ +# Copyright Spack Project Developers. See COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class Pace(CMakePackage): + """interatomic Potentials in Atomic Cluster Expansion (PACE) + + This library is required to build the ML-PACE module + in LAMMPS. + + The library was developed at the Interdisciplinary Centre + for Advanced Materials Simulation (ICAMS), Ruhr University Bochum + + See `Phys Rev Mat 6 013804 (2022)`__ and + `Phys Rev B 99 014104 (2019)`__ for details. + """ + + maintainers("hjjvandam", "rbberger") + + homepage = ( + "https://www.icams.de/institute/departments-groups/atomistic-modelling-and-simulation/" + ) + git = "https://github.com/ICAMS/lammps-user-pace.git" + + license("GPL-2.0-or-later", checked_by="hjjvandam") + version("main", branch="main") + version( + "2023.11.25.2", tag="v.2023.11.25.fix2", commit="e60e850359b918ca93a5e9329548a58d31f4b12b" + ) + + variant("pic", default=True, description="Build position independent code") + + depends_on("yaml-cpp") + depends_on("cnpy") + + def cmake_args(self): + args = [self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic")] + return args