From patchwork Mon Dec 6 15:24:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 34998 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B1D5F27BBEA; Mon, 6 Dec 2021 15:25:21 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3764227BBE9 for ; Mon, 6 Dec 2021 15:25:21 +0000 (GMT) Received: from localhost ([::1]:35042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muFri-0007b9-IS for patchwork@mira.cbaines.net; Mon, 06 Dec 2021 10:25:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muFrS-0007ah-Sa for guix-patches@gnu.org; Mon, 06 Dec 2021 10:25:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1muFrS-0002lV-L1 for guix-patches@gnu.org; Mon, 06 Dec 2021 10:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1muFrS-0005yz-HK for guix-patches@gnu.org; Mon, 06 Dec 2021 10:25:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52124] [PATCH] gnu: Add n2p2-lib. References: <20211126130824.361671-1-zimon.toutoune@gmail.com> In-Reply-To: <20211126130824.361671-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Dec 2021 15:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52124 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52124@debbugs.gnu.org Cc: othacehe@gnu.org, Pierre-Antoine Bouttier Received: via spool by 52124-submit@debbugs.gnu.org id=B52124.163880428222963 (code B ref 52124); Mon, 06 Dec 2021 15:25:02 +0000 Received: (at 52124) by debbugs.gnu.org; 6 Dec 2021 15:24:42 +0000 Received: from localhost ([127.0.0.1]:35140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muFr4-0005yF-82 for submit@debbugs.gnu.org; Mon, 06 Dec 2021 10:24:42 -0500 Received: from mail-wm1-f53.google.com ([209.85.128.53]:38794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muFr1-0005y1-Tz for 52124@debbugs.gnu.org; Mon, 06 Dec 2021 10:24:37 -0500 Received: by mail-wm1-f53.google.com with SMTP id p3-20020a05600c1d8300b003334fab53afso10680319wms.3 for <52124@debbugs.gnu.org>; Mon, 06 Dec 2021 07:24:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UT2XgPfU94xzsnaRTouwg2E5gPDTpQXtQelIAmXxVqk=; b=qs1h1S9xNuF4ybhU9VmnvYfL8XJWs7Qz+XmXL+wJzO59s3aFccCI7PLUM1aa3cW4ga GSfo1CS2/BmK2G3zikce8gUu8leB1V9E9kxGj86TywV5bh//gjK0mkHT/dyFrGH1tlBA 0ZNrG8v+kxWp7VsvhGh5AZNHilI1Aao9iuJhXeD+1HL2L7A5zN/lYboDrS7y9WYSvRZ0 oWXTPG1a1zk+wKlmkwWoXXCHWwOeP+mPOvJcrryoueepoNbNkb6SCjaxoH3POCVwGu1w +VuHpzpPPUO5ubgjQFCKR5Qf6kKWvwGHFIAIzNTlgzOhXbdeZtoYOv+8zLhPSRTTPRTY fQmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UT2XgPfU94xzsnaRTouwg2E5gPDTpQXtQelIAmXxVqk=; b=duxwg8Lny8ku/MkK+EF1u0sdcGWUjPtw3C89ZS/4ZdM10GH5Oep/fs5s7WWy7sMOZh gPgI/ZtimEwmK6cDQOAWoliOMmufjVW5ovWXdLSdG6GOgjYVRZbUKZtzknuHxR/N+wiz QXzaBQkblvEsZo+p1goYuAbdmjtrkkWz5BNJkFazfvIXlT9kmtzqxmSiSOC9KlzcvOCt XdkLTq+kyps4irO52IIYxPhS7a92PSi4ZJzC1qX2CQOLouMEWad6Ky5FT+4ZHKvGbJTS Mutm1ZgTbpn/5QbtWuXbI6+WWQpUwh+krNv3V2C32y+FPh8ZrzJPJ8biRe8+eXhH+chp X4ww== X-Gm-Message-State: AOAM530yA+iIo0LlRbV6WAV2K1XOTNma/FHM59+UaFADLpYjhJS1LT4w tgEb6XZ+ecrgHYgovzC0MyVHQSw+GZY= X-Google-Smtp-Source: ABdhPJw8hIjgSBI96+kRaQz+5wNMgSRAO5p2SbF+ZaqfJ+/BijG834oPlkU7ONnm/UBxPsfLSY5dfA== X-Received: by 2002:a1c:4e04:: with SMTP id g4mr39081851wmh.15.1638804270122; Mon, 06 Dec 2021 07:24:30 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id r15sm13398635wmh.13.2021.12.06.07.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Dec 2021 07:24:29 -0800 (PST) From: zimoun Date: Mon, 6 Dec 2021 16:24:22 +0100 Message-Id: <20211206152422.121776-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: Pierre-Antoine Bouttier * gnu/packages/maths.scm (n2p2-lib): New variable. --- gnu/packages/maths.scm | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) base-commit: 9478a252509a93f3e7f486cbc549631185ba071d 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 ;;; Copyright © 2021 Ivan Gankevich ;;; Copyright © 2021 Jean-Baptiste Volatier +;;; Copyright © 2021 Pierre-Antoine Bouttier ;;; ;;; 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")