guix_mirror_bot pushed a commit to branch kernel-updates
in repository guix.

commit b353e5cb85ce126854b01b373d18d6bbe0ce831e
Author: David Elsing <[email protected]>
AuthorDate: Tue Jun 3 22:56:54 2025 +0200

    gnu: Add libcint.
    
    * gnu/packages/chemistry.scm (libcint): New variable.
    
    Change-Id: I72da249743392eb8a4be1673b9fc1a7bbbb1c942
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/chemistry.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 9fb8e7af5b..a43cedfadd 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")

Reply via email to