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")