summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorDavid Elsing <david.elsing@posteo.net>2025-06-03 22:56:54 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-07-08 12:17:14 +0100
commitb353e5cb85ce126854b01b373d18d6bbe0ce831e (patch)
tree9050541b1a0d0c49faa306aba94190a28e8287a4 /gnu
parent46cb759a52185b0c9bea650b1ad0cf44159705c5 (diff)
gnu: Add libcint.
* gnu/packages/chemistry.scm (libcint): New variable. Change-Id: I72da249743392eb8a4be1673b9fc1a7bbbb1c942 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/chemistry.scm58
1 files changed, 58 insertions, 0 deletions
diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 9fb8e7af5bd..a43cedfadde 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -51,6 +51,7 @@
#:use-module (gnu packages gtk)
#:use-module (gnu packages gv)
#:use-module (gnu packages image)
+ #:use-module (gnu packages lisp)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages perl)
@@ -293,6 +294,63 @@ making chemicals and chemistry machine-readable and discoverable. A simple
analogy is that InChI is the bar-code for chemistry and chemical structures.")
(license license:expat)))
+(define-public libcint
+ (package
+ (name "libcint")
+ (version "6.1.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sunqm/libcint")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1vlzgkgdhf94w3l1nk9rswf50sqbw4l9981hmnivgwwv905mq4ji"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Autogenerated code
+ (delete-file-recursively "src/autocode")
+ (delete-file "doc/program_ref.pdf")))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list "-DWITH_RANGE_COULOMB=1"
+ "-DWITH_CINT2_INTERFACE=1"
+ "-DMIN_EXPCUTOFF=20"
+ "-DQUICK_TEST=ON"
+ "-DENABLE_TEST=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'autogenerate-integrals
+ (lambda _
+ (mkdir "src/autocode")
+ (with-directory-excursion "scripts"
+ (invoke "clisp" "auto_intor.cl")
+ (for-each
+ (lambda (file)
+ (rename-file file (string-append
+ "../src/autocode/" (basename file))))
+ (find-files "." "\\.c$")))))
+ (add-after 'unpack 'adjust-build-path
+ (lambda _
+ (substitute* (find-files "testsuite" "\\.py$")
+ (("\\.\\./\\.\\./build") "../../../build")))))))
+ (native-inputs
+ (list clisp
+ python
+ python-numpy))
+ (inputs
+ (list openblas))
+ (home-page "https://github.com/sunqm/libcint")
+ (synopsis "General GTO integrals for quantum chemistry")
+ (description
+ "@code{libcint} is a C library (also with a Fortran API) to evaluate one-
+and two-electron integrals for @acronym{GTO, Gaussian Type Function}s.")
+ (license license:bsd-2)))
+
(define-public libmsym
(package
(name "libmsym")