From: zimoun <zimon.toutoune@gmail.com>
To: 52124@debbugs.gnu.org
Cc: othacehe@gnu.org,
Pierre-Antoine Bouttier
<pierre-antoine.bouttier@univ-grenoble-alpes.fr>
Subject: [bug#52124] [PATCH] gnu: Add n2p2-lib.
Date: Mon, 6 Dec 2021 16:24:22 +0100 [thread overview]
Message-ID: <20211206152422.121776-1-zimon.toutoune@gmail.com> (raw)
In-Reply-To: <20211126130824.361671-1-zimon.toutoune@gmail.com>
From: Pierre-Antoine Bouttier <pierre-antoine.bouttier@univ-grenoble-alpes.fr>
* gnu/packages/maths.scm (n2p2-lib): New variable.
---
gnu/packages/maths.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 83f31c1396..b08dc6fe67 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -48,6 +48,7 @@
;;; Copyright © 2021 Paul A. Patience <paul@apatience.com>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
+;;; Copyright © 2021 Pierre-Antoine Bouttier <pierre-antoine.bouttier@univ-grenoble-alpes.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1753,6 +1754,60 @@ (define-public netcdf-fortran
(home-page (package-home-page netcdf))
(license (package-license netcdf))))
+(define-public n2p2-lib
+ (package
+ (name "n2p2-lib")
+ (version "2.1.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/CompPhysVienna/n2p2")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1lw195ihpxwh08387i4gamk1glhalpq888q6nj8l5vswbgnrv1pq"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags '("MODE=shared" "-C" "src")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'post-unpack
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/makefile.gnu"
+ (("PROJECT_EIGEN=/usr/include/eigen3")
+ (string-append "PROJECT_EIGEN="
+ (assoc-ref inputs "eigen") "/include/eigen3")))
+ (substitute* "src/makefile.gnu"
+ (("-lblas")
+ (string-append "-L"
+ (assoc-ref inputs "openblas") "/lib -lopenblas")))))
+ (delete 'configure)
+ (delete 'check)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bindir (string-append out "/bin"))
+ (libdir (string-append out "/lib"))
+ (incdir (string-append out "/include")))
+ (for-each (lambda (f) (install-file f libdir))
+ (find-files "../lib/" "."))
+ (for-each (lambda (f) (install-file f incdir))
+ (find-files "../include/" "."))))))))
+ (inputs
+ `(("openmpi" ,openmpi)
+ ("gsl" ,gsl)
+ ("openblas" ,openblas)
+ ("eigen" ,eigen)))
+ (synopsis "Neural network potentials for chemistry and physics")
+ (description "This package contains software that will allow you to use
+existing neural network potential parameterizations to predict energies and
+forces (with standalone tools but also in conjunction with the MD software
+LAMMPS). In addition it is possible to train new neural network potentials
+with the provided training tools.")
+ (home-page "https://compphysvienna.github.io/n2p2")
+ (license license:gpl3)))
+
(define-public nlopt
(package
(name "nlopt")
base-commit: 9478a252509a93f3e7f486cbc549631185ba071d
--
2.33.1
next prev parent reply other threads:[~2021-12-06 15:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 13:08 [bug#52124] [PATCH 0/1] Add n2p2-lib zimoun
2021-12-02 14:46 ` Mathieu Othacehe
2021-12-02 15:54 ` zimoun
2021-12-06 15:24 ` zimoun [this message]
2022-05-03 12:38 ` zimoun
2022-05-05 21:28 ` bug#52124: " Ludovic Courtès
2022-05-06 8:30 ` [bug#52124] " zimoun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211206152422.121776-1-zimon.toutoune@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=52124@debbugs.gnu.org \
--cc=othacehe@gnu.org \
--cc=pierre-antoine.bouttier@univ-grenoble-alpes.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.