| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 |
|
| 27 | (define-module (gnu packages chemistry)
|
| 28 | #:use-module ((guix licenses) #:prefix license:)
|
| 29 | #:use-module (guix build-system cmake)
|
| 30 | #:use-module (guix build-system gnu)
|
| 31 | #:use-module (guix build-system pyproject)
|
| 32 | #:use-module (guix download)
|
| 33 | #:use-module (guix gexp)
|
| 34 | #:use-module (guix git-download)
|
| 35 | #:use-module (guix packages)
|
| 36 | #:use-module (guix utils)
|
| 37 | #:use-module (gnu packages)
|
| 38 | #:use-module (gnu packages algebra)
|
| 39 | #:use-module (gnu packages autotools)
|
| 40 | #:use-module (gnu packages backup)
|
| 41 | #:use-module (gnu packages base)
|
| 42 | #:use-module (gnu packages bash)
|
| 43 | #:use-module (gnu packages bison)
|
| 44 | #:use-module (gnu packages boost)
|
| 45 | #:use-module (gnu packages c)
|
| 46 | #:use-module (gnu packages check)
|
| 47 | #:use-module (gnu packages cmake)
|
| 48 | #:use-module (gnu packages compression)
|
| 49 | #:use-module (gnu packages cpp)
|
| 50 | #:use-module (gnu packages documentation)
|
| 51 | #:use-module (gnu packages compiler-tools)
|
| 52 | #:use-module (gnu packages elf)
|
| 53 | #:use-module (gnu packages fonts)
|
| 54 | #:use-module (gnu packages fontutils)
|
| 55 | #:use-module (gnu packages fortran-xyz)
|
| 56 | #:use-module (gnu packages gcc)
|
| 57 | #:use-module (gnu packages gl)
|
| 58 | #:use-module (gnu packages graphviz)
|
| 59 | #:use-module (gnu packages gtk)
|
| 60 | #:use-module (gnu packages gv)
|
| 61 | #:use-module (gnu packages image)
|
| 62 | #:use-module (gnu packages lisp)
|
| 63 | #:use-module (gnu packages maths)
|
| 64 | #:use-module (gnu packages mpi)
|
| 65 | #:use-module (gnu packages onc-rpc)
|
| 66 | #:use-module (gnu packages perl)
|
| 67 | #:use-module (gnu packages pkg-config)
|
| 68 | #:use-module (gnu packages python)
|
| 69 | #:use-module (gnu packages python-build)
|
| 70 | #:use-module (gnu packages python-science)
|
| 71 | #:use-module (gnu packages python-xyz)
|
| 72 | #:use-module (gnu packages qt)
|
| 73 | #:use-module (gnu packages serialization)
|
| 74 | #:use-module (gnu packages sphinx)
|
| 75 | #:use-module (gnu packages sqlite)
|
| 76 | #:use-module (gnu packages stb)
|
| 77 | #:use-module (gnu packages tex)
|
| 78 | #:use-module (gnu packages web)
|
| 79 | #:use-module (gnu packages xml)
|
| 80 | #:use-module (srfi srfi-1))
|
| 81 |
|
| 82 | |
| 83 | |
| 84 | |
| 85 |
|
| 86 | (define-public avogadrolibs
|
| 87 | (package
|
| 88 | (name "avogadrolibs")
|
| 89 | (version "1.102.1")
|
| 90 | (source
|
| 91 | (origin
|
| 92 | (method git-fetch)
|
| 93 | (uri (git-reference
|
| 94 | (url "https://github.com/OpenChemistry/avogadrolibs")
|
| 95 | (commit version)))
|
| 96 | (sha256
|
| 97 | (base32 "026na6np5pfi77vis1wcncs3h7vidibpwra2j00brfdm5is92qa6"))
|
| 98 | (file-name (git-file-name name version))))
|
| 99 | (build-system cmake-build-system)
|
| 100 | (native-inputs (list eigen
|
| 101 | googletest
|
| 102 | pkg-config
|
| 103 | pybind11
|
| 104 | patchelf))
|
| 105 | (inputs `(("glew" ,glew)
|
| 106 | ("libarchive" ,libarchive)
|
| 107 | ("libmsym" ,libmsym)
|
| 108 | ("python" ,python)
|
| 109 | ("spglib" ,spglib)
|
| 110 | ("qtbase" ,qtbase)
|
| 111 | ("qtsvg" ,qtsvg)
|
| 112 | ("jkqtplotter" ,jkqtplotter)
|
| 113 | ("hdf5" ,hdf5)
|
| 114 | ("avogadro-molecules"
|
| 115 | ,(origin
|
| 116 | (method git-fetch)
|
| 117 | (uri
|
| 118 | (git-reference
|
| 119 | (url "https://github.com/openchemistry/molecules")
|
| 120 | (commit "8a37883")))
|
| 121 | (file-name
|
| 122 | (git-file-name name version))
|
| 123 | (sha256
|
| 124 | (base32 "00mfx0bwmqazbiklrvaijjd5n4wa5lp3z73291ihm78q0v9dzhl4"))))
|
| 125 | ("avogadro-crystals"
|
| 126 | ,(origin
|
| 127 | (method git-fetch)
|
| 128 | (uri
|
| 129 | (git-reference
|
| 130 | (url "https://github.com/openchemistry/crystals")
|
| 131 | (commit "7adea78")))
|
| 132 | (file-name
|
| 133 | (git-file-name name version))
|
| 134 | (sha256
|
| 135 | (base32 "11pqc2ppd1lsizxs11ppaih4w3ck9qmgn92rrc4zrdwfssawa72s"))))
|
| 136 | ("avogadro-fragments"
|
| 137 | ,(origin
|
| 138 | (method git-fetch)
|
| 139 | (uri
|
| 140 | (git-reference
|
| 141 | (url "https://github.com/openchemistry/fragments")
|
| 142 | (commit "43c900d")))
|
| 143 | (file-name
|
| 144 | (git-file-name name version))
|
| 145 | (sha256
|
| 146 | (base32 "0ak3sf6vzrzxsqawb56kk4mvfazdi45xad07zvh0021f0mcbi9sb"))))))
|
| 147 | (arguments
|
| 148 | (list
|
| 149 | #:configure-flags
|
| 150 | #~(list "-DENABLE_TESTING=ON" "-DQT_VERSION=6" "-DUSE_HDF5=ON"
|
| 151 | "-DUSE_PYTHON=ON")
|
| 152 | #:phases
|
| 153 | #~(modify-phases %standard-phases
|
| 154 | (add-after 'unpack 'symlink
|
| 155 | (lambda _
|
| 156 | (symlink (assoc-ref %build-inputs "avogadro-molecules")
|
| 157 | "../molecules")
|
| 158 | (symlink (assoc-ref %build-inputs "avogadro-crystals")
|
| 159 | "../crystals")
|
| 160 | (symlink (assoc-ref %build-inputs "avogadro-fragments")
|
| 161 | "../fragments")))
|
| 162 | (add-before 'install 'patch-python-install-path
|
| 163 | (lambda _
|
| 164 | (substitute* "python/cmake_install.cmake"
|
| 165 | ((#$(this-package-input "python"))
|
| 166 | #$output))))
|
| 167 | (add-after 'install 'extend-python-rpath
|
| 168 | |
| 169 | |
| 170 | (lambda _
|
| 171 | (invoke "patchelf" "--add-rpath"
|
| 172 | (string-append #$output "/lib")
|
| 173 | (string-append #$output
|
| 174 | "/lib/python3.12/site-packages/avogadro/"
|
| 175 | "core.cpython-312-x86_64-linux-gnu.so"))
|
| 176 | (invoke "patchelf" "--add-rpath"
|
| 177 | (string-append #$output "/lib")
|
| 178 | (string-append #$output
|
| 179 | "/lib/python3.12/site-packages/avogadro/"
|
| 180 | "io.cpython-312-x86_64-linux-gnu.so")))))))
|
| 181 | (home-page "https://www.openchemistry.org/projects/avogadro2/")
|
| 182 | (synopsis "Libraries for chemistry, bioinformatics, and related areas")
|
| 183 | (description
|
| 184 | "Avogadro libraries provide 3D rendering, visualization, analysis and data
|
| 185 | processing useful in computational chemistry, molecular modeling,
|
| 186 | bioinformatics, materials science, and related areas.")
|
| 187 | (license license:bsd-3)))
|
| 188 |
|
| 189 | (define-public avogadro2
|
| 190 | (package
|
| 191 | (name "avogadro2")
|
| 192 | (version "1.102.1")
|
| 193 | (source
|
| 194 | (origin
|
| 195 | (method git-fetch)
|
| 196 | (uri (git-reference
|
| 197 | (url "https://github.com/OpenChemistry/avogadroapp")
|
| 198 | (commit version)))
|
| 199 | (sha256
|
| 200 | (base32 "08343y0gbnng1mk18s8ixbl3pzdpsc787zg6sh3gffw91s5hw6cw"))
|
| 201 | (file-name (git-file-name name version))))
|
| 202 | (build-system cmake-build-system)
|
| 203 | (native-inputs
|
| 204 | `(("eigen" ,eigen)
|
| 205 | ("pkg-config" ,pkg-config)
|
| 206 | ("avogadro-i18n"
|
| 207 | ,(origin
|
| 208 | (method git-fetch)
|
| 209 | (uri
|
| 210 | (git-reference
|
| 211 | (url "https://github.com/openchemistry/avogadro-i18n")
|
| 212 | (commit "f91da38")))
|
| 213 | (file-name
|
| 214 | (git-file-name name version))
|
| 215 | (sha256
|
| 216 | (base32 "1nymlznpz58a7gwk0g6c1f6ri068n54iq7yd8z6zacia1ihrj1qi"))))))
|
| 217 | (inputs (list avogadrolibs
|
| 218 | hdf5
|
| 219 | jkqtplotter
|
| 220 | openbabel
|
| 221 | qtbase
|
| 222 | qtsvg
|
| 223 | qtwayland
|
| 224 | bash-minimal))
|
| 225 | |
| 226 | (arguments
|
| 227 | (list
|
| 228 | #:tests? #f
|
| 229 | |
| 230 | #:configure-flags
|
| 231 | #~(list "-DQT_VERSION=6" "-DAvogadro_ENABLE_RPC=OFF")
|
| 232 | #:phases
|
| 233 | #~(modify-phases %standard-phases
|
| 234 | (add-after 'unpack 'symlink
|
| 235 | (lambda _
|
| 236 | (symlink (assoc-ref %build-inputs "avogadro-i18n")
|
| 237 | "../avogadro-i18n")))
|
| 238 | (add-after 'install 'wrap-program
|
| 239 | (lambda _
|
| 240 | (wrap-program (string-append #$output "/bin/avogadro2")
|
| 241 | (list "PATH"
|
| 242 | 'suffix
|
| 243 | (list (string-append #$openbabel "/bin")))
|
| 244 | (list "QT_PLUGIN_PATH"
|
| 245 | 'suffix
|
| 246 | (list (string-append #$qtsvg "/lib/qt6/plugins")))))))))
|
| 247 | (home-page "https://www.openchemistry.org/projects/avogadro2/")
|
| 248 | (synopsis "Advanced molecule editor")
|
| 249 | (description
|
| 250 | "Avogadro 2 is an advanced molecule editor and visualizer designed for use
|
| 251 | in computational chemistry, molecular modeling, bioinformatics, materials
|
| 252 | science, and related areas. It offers flexible high quality rendering and a
|
| 253 | powerful plugin architecture.")
|
| 254 | (license license:bsd-3)))
|
| 255 |
|
| 256 | (define-public inchi
|
| 257 | (package
|
| 258 | (name "inchi")
|
| 259 | |
| 260 | (version "1.07.3")
|
| 261 | (source
|
| 262 | (origin
|
| 263 | (method git-fetch)
|
| 264 | (uri (git-reference
|
| 265 | (url "https://github.com/IUPAC-InChI/InChI")
|
| 266 | (commit (string-append "v" version))))
|
| 267 | (file-name (git-file-name name version))
|
| 268 | (sha256
|
| 269 | (base32
|
| 270 | "0r32f6i5d8ir96ic3nvqb5lywxrznwrkk6hnz1q0a4bgsw5pmk0n"))
|
| 271 | (modules '((guix build utils)))
|
| 272 | (snippet '(delete-file-recursively "INCHI-1-BIN"))))
|
| 273 | (build-system gnu-build-system)
|
| 274 | (arguments
|
| 275 | (list
|
| 276 | #:tests? #f |
| 277 | #:phases
|
| 278 | #~(modify-phases %standard-phases
|
| 279 | (delete 'configure) |
| 280 | (add-after 'unpack 'chdir-to-build-directory
|
| 281 | (lambda _ (chdir "INCHI-1-SRC/INCHI_EXE/inchi-1/gcc")))
|
| 282 | (add-after 'build 'build-library
|
| 283 | (lambda* (#:key parallel-build? #:allow-other-keys)
|
| 284 | (chdir "../../../INCHI_API/libinchi/gcc")
|
| 285 | (invoke "make" "-j" (if parallel-build?
|
| 286 | (number->string (parallel-job-count))
|
| 287 | "1"))))
|
| 288 | (replace 'install
|
| 289 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 290 | (let* ((bin (string-append #$output "/bin"))
|
| 291 | (doc (string-append #$output "/share/doc/inchi"))
|
| 292 | (include-dir (string-append #$output "/include/inchi"))
|
| 293 | (lib (string-append #$output "/lib/inchi")))
|
| 294 | (chdir "../../..")
|
| 295 | |
| 296 | (with-directory-excursion "INCHI_EXE/bin/Linux"
|
| 297 | (rename-file "inchi-1" "inchi")
|
| 298 | (install-file "inchi" bin))
|
| 299 | |
| 300 | (with-directory-excursion "INCHI_API/bin/Linux"
|
| 301 | (let ((libname (basename
|
| 302 | (car
|
| 303 | (find-files "." "libinchi\\.so\\.1\\.*")))))
|
| 304 | (install-file libname lib)
|
| 305 | (with-directory-excursion lib
|
| 306 | (symlink libname "libinchi.so.1")
|
| 307 | (symlink "libinchi.so.1" "libinchi.so"))))
|
| 308 | |
| 309 | (with-directory-excursion "INCHI_BASE/src"
|
| 310 | (for-each (lambda (file)
|
| 311 | (install-file file include-dir))
|
| 312 | (find-files "." "\\.h$")))
|
| 313 | |
| 314 | (with-directory-excursion "../INCHI-1-DOC"
|
| 315 | (for-each
|
| 316 | (lambda (file)
|
| 317 | (install-file file doc))
|
| 318 | (find-files "." "\\.pdf$")))))))))
|
| 319 | (native-inputs (list unzip))
|
| 320 | (home-page "https://www.inchi-trust.org")
|
| 321 | (synopsis "Utility for manipulating machine-readable chemical structures")
|
| 322 | (description
|
| 323 | "The @dfn{InChI} (IUPAC International Chemical Identifier) algorithm turns
|
| 324 | chemical structures into machine-readable strings of information. InChIs are
|
| 325 | unique to the compound they describe and can encode absolute stereochemistry
|
| 326 | making chemicals and chemistry machine-readable and discoverable. A simple
|
| 327 | analogy is that InChI is the bar-code for chemistry and chemical structures.")
|
| 328 | (license license:expat)))
|
| 329 |
|
| 330 | (define-public libcint
|
| 331 | (package
|
| 332 | (name "libcint")
|
| 333 | (version "6.1.2")
|
| 334 | (source
|
| 335 | (origin
|
| 336 | (method git-fetch)
|
| 337 | (uri (git-reference
|
| 338 | (url "https://github.com/sunqm/libcint")
|
| 339 | (commit (string-append "v" version))))
|
| 340 | (file-name (git-file-name name version))
|
| 341 | (sha256
|
| 342 | (base32 "1vlzgkgdhf94w3l1nk9rswf50sqbw4l9981hmnivgwwv905mq4ji"))
|
| 343 | (modules '((guix build utils)))
|
| 344 | (snippet
|
| 345 | '(begin
|
| 346 | |
| 347 | (delete-file-recursively "src/autocode")
|
| 348 | (delete-file "doc/program_ref.pdf")))))
|
| 349 | (build-system cmake-build-system)
|
| 350 | (arguments
|
| 351 | (list
|
| 352 | #:configure-flags
|
| 353 | #~(list "-DWITH_RANGE_COULOMB=1"
|
| 354 | "-DWITH_CINT2_INTERFACE=1"
|
| 355 | "-DMIN_EXPCUTOFF=20"
|
| 356 | "-DQUICK_TEST=ON"
|
| 357 | "-DENABLE_TEST=ON")
|
| 358 | #:phases
|
| 359 | #~(modify-phases %standard-phases
|
| 360 | (add-after 'unpack 'autogenerate-integrals
|
| 361 | (lambda _
|
| 362 | (mkdir "src/autocode")
|
| 363 | (with-directory-excursion "scripts"
|
| 364 | (invoke "clisp" "auto_intor.cl")
|
| 365 | (for-each
|
| 366 | (lambda (file)
|
| 367 | (rename-file file (string-append
|
| 368 | "../src/autocode/" (basename file))))
|
| 369 | (find-files "." "\\.c$")))))
|
| 370 | (add-after 'unpack 'adjust-build-path
|
| 371 | (lambda _
|
| 372 | (substitute* (find-files "testsuite" "\\.py$")
|
| 373 | (("\\.\\./\\.\\./build") "../../../build")))))))
|
| 374 | (native-inputs
|
| 375 | (list clisp
|
| 376 | python
|
| 377 | python-numpy))
|
| 378 | (inputs
|
| 379 | (list openblas))
|
| 380 | (home-page "https://github.com/sunqm/libcint")
|
| 381 | (synopsis "General GTO integrals for quantum chemistry")
|
| 382 | (description
|
| 383 | "@code{libcint} is a C library (also with a Fortran API) to evaluate one-
|
| 384 | and two-electron integrals for @acronym{GTO, Gaussian Type Function}s.")
|
| 385 | (license license:bsd-2)))
|
| 386 |
|
| 387 | (define-public libmsym
|
| 388 | (package
|
| 389 | (name "libmsym")
|
| 390 | (version "0.2.3")
|
| 391 | (source
|
| 392 | (origin
|
| 393 | (method git-fetch)
|
| 394 | (uri (git-reference
|
| 395 | (url "https://github.com/mcodev31/libmsym")
|
| 396 | (commit (string-append "v" version))))
|
| 397 | (sha256
|
| 398 | (base32
|
| 399 | "0a9j28irdsr461qpzlc9z1yjyb9kp64fh5zw7ylspc9zn3189qwk"))
|
| 400 | (file-name (git-file-name name version))))
|
| 401 | (build-system cmake-build-system)
|
| 402 | (arguments
|
| 403 | '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
|
| 404 | #:tests? #f)) |
| 405 | (home-page "https://github.com/mcodev31/libmsym")
|
| 406 | (synopsis "C library dealing with point group symmetry in molecules")
|
| 407 | (description "libmsym is a C library dealing with point group symmetry in
|
| 408 | molecules.")
|
| 409 | (license license:expat)))
|
| 410 |
|
| 411 | (define-public molequeue
|
| 412 | (package
|
| 413 | (name "molequeue")
|
| 414 | (version "0.9.0")
|
| 415 | (source
|
| 416 | (origin
|
| 417 | (method url-fetch)
|
| 418 | (uri (string-append "https://github.com/OpenChemistry/molequeue/"
|
| 419 | "releases/download/" version "/molequeue-"
|
| 420 | version ".tar.bz2"))
|
| 421 | (sha256
|
| 422 | (base32
|
| 423 | "1w1fgxzqrb5yxvpmnc3c9ymnvixy0z1nfafkd9whg9zw8nbgl998"))))
|
| 424 | (build-system cmake-build-system)
|
| 425 | (inputs
|
| 426 | (list qtbase-5))
|
| 427 | (arguments
|
| 428 | '(#:configure-flags '("-DENABLE_TESTING=ON")
|
| 429 | #:phases
|
| 430 | (modify-phases %standard-phases
|
| 431 | (add-after 'unpack 'patch-tests
|
| 432 | (lambda _
|
| 433 | |
| 434 | |
| 435 | |
| 436 | |
| 437 | (substitute* "molequeue/app/testing/messagetest.cpp"
|
| 438 | (("5\\.36893473232") "5.36893"))
|
| 439 | |
| 440 | |
| 441 | (substitute* "molequeue/app/testing/CMakeLists.txt"
|
| 442 | ((".*clientserver.*") ""))
|
| 443 | #t))
|
| 444 | (add-before 'check 'set-display
|
| 445 | (lambda _
|
| 446 | |
| 447 | (setenv "QT_QPA_PLATFORM" "offscreen")
|
| 448 | #t)))))
|
| 449 | (home-page "https://www.openchemistry.org/projects/molequeue/")
|
| 450 | (synopsis "Application for coordinating computational jobs")
|
| 451 | (description "MoleQueue is a system-tray resident desktop application for
|
| 452 | abstracting, managing, and coordinating the execution of tasks both locally and
|
| 453 | on remote computational resources. Users can set up local and remote queues
|
| 454 | that describe where the task will be executed. Each queue can have programs,
|
| 455 | with templates to facilitate the execution of the program. Input files can be
|
| 456 | staged, and output files collected using a standard interface.")
|
| 457 | (license license:bsd-3)))
|
| 458 |
|
| 459 | (define-public tng
|
| 460 | (package
|
| 461 | (name "tng")
|
| 462 | (version "1.8.2")
|
| 463 | (source (origin
|
| 464 | (method git-fetch)
|
| 465 | (uri (git-reference
|
| 466 | (url "https://github.com/gromacs/tng")
|
| 467 | (commit (string-append "v" version))))
|
| 468 | (file-name (git-file-name name version))
|
| 469 | (sha256
|
| 470 | (base32
|
| 471 | "1apf2n8nb34z09xarj7k4jgriq283l769sakjmj5aalpbilvai4q"))))
|
| 472 | (build-system cmake-build-system)
|
| 473 | (inputs
|
| 474 | (list zlib))
|
| 475 | (arguments
|
| 476 | `(#:phases
|
| 477 | (modify-phases %standard-phases
|
| 478 | (add-after 'unpack 'remove-bundled-zlib
|
| 479 | (lambda _
|
| 480 | (delete-file-recursively "external")
|
| 481 | #t))
|
| 482 | (replace 'check
|
| 483 | (lambda _
|
| 484 | (invoke "../build/bin/tests/tng_testing")
|
| 485 | #t)))))
|
| 486 | (home-page "https://github.com/gromacs/tng")
|
| 487 | (synopsis "Trajectory Next Generation binary format manipulation library")
|
| 488 | (description "TRAJNG (Trajectory next generation) is a program library for
|
| 489 | handling molecular dynamics (MD) trajectories. It can store coordinates, and
|
| 490 | optionally velocities and the H-matrix. Coordinates and velocities are
|
| 491 | stored with user-specified precision.")
|
| 492 | (license license:bsd-3)))
|
| 493 |
|
| 494 | (define-public gromacs
|
| 495 | (package
|
| 496 | (name "gromacs")
|
| 497 | (version "2025.3")
|
| 498 | (source
|
| 499 | (origin
|
| 500 | (method git-fetch)
|
| 501 | (uri (git-reference
|
| 502 | (url "https://gitlab.com/gromacs/gromacs")
|
| 503 | (commit (string-append "v" version))))
|
| 504 | (file-name (git-file-name name version))
|
| 505 | (sha256
|
| 506 | (base32
|
| 507 | "1p9vvlbrysh8lwnbgy845pgx664k6mkw8p66f8bx468f7z2rp900"))
|
| 508 | (modules '((guix build utils)))
|
| 509 | (snippet
|
| 510 | '(begin
|
| 511 | |
| 512 | |
| 513 | |
| 514 | |
| 515 | |
| 516 | |
| 517 | |
| 518 | |
| 519 | |
| 520 | |
| 521 | (delete-file-recursively "src/external/lmfit")
|
| 522 | (delete-file-recursively "src/external/clFFT")
|
| 523 | (delete-file-recursively "src/external/fftpack")
|
| 524 | (delete-file-recursively "src/external/build-fftw")
|
| 525 | (delete-file-recursively "src/external/tng_io")
|
| 526 | (delete-file-recursively "src/external/tinyxml2")
|
| 527 | (delete-file-recursively "src/external/googletest")
|
| 528 | (delete-file-recursively "src/external/muparser")
|
| 529 | (delete-file-recursively "src/external/rpc_xdr")
|
| 530 | (delete-file-recursively "src/external/vkfft")))))
|
| 531 | (build-system cmake-build-system)
|
| 532 | (arguments
|
| 533 | (list #:configure-flags
|
| 534 | #~(list "-DGMX_DEVELOPER_BUILD=on" |
| 535 | |
| 536 | "-DGMX_USE_LMFIT=EXTERNAL"
|
| 537 | "-DGMX_USE_MUPARSER=EXTERNAL"
|
| 538 | "-DGMX_BUILD_OWN_FFTW=off"
|
| 539 | "-DGMX_EXTERNAL_BLAS=on"
|
| 540 | "-DGMX_EXTERNAL_LAPACK=on"
|
| 541 | "-DGMX_EXTERNAL_TNG=on"
|
| 542 | "-DGMX_EXTERNAL_ZLIB=on"
|
| 543 | "-DGMX_EXTERNAL_TINYXML2=on"
|
| 544 | (string-append "-DTinyXML2_DIR="
|
| 545 | #$(this-package-input "tinyxml2"))
|
| 546 | |
| 547 | |
| 548 | (string-append "-DSPHINX_EXECUTABLE_VERSION="
|
| 549 | #$(package-version python-sphinx))
|
| 550 | (string-append
|
| 551 | "-DCMAKE_CXX_FLAGS=-I"
|
| 552 | (search-input-directory %build-inputs "/include/tirpc")))
|
| 553 | #:phases
|
| 554 | #~(modify-phases %standard-phases
|
| 555 | (add-after 'unpack 'fixes
|
| 556 | (lambda _
|
| 557 | (copy-recursively #$(package-source googletest-1.13)
|
| 558 | "src/external/googletest")
|
| 559 | |
| 560 | (substitute* "src/gromacs/hardware/tests/hardwaretopology.cpp"
|
| 561 | (("TEST\\(HardwareTopologyTest, HwlocExecute\\)")
|
| 562 | "void __guix_disabled()"))
|
| 563 | (substitute* "cmake/gmxTestXDR.cmake"
|
| 564 | (("TestXDR\\.cpp\"" orig)
|
| 565 | (string-append orig " LINK_LIBRARIES -ltirpc")))
|
| 566 | (substitute* "CMakeLists.txt"
|
| 567 | (("set\\(GMX_EXTRA_LIBRARIES.*" orig)
|
| 568 | (string-append
|
| 569 | orig "\nlist(APPEND GMX_EXTRA_LIBRARIES \"-ltirpc\")\n")))
|
| 570 | (substitute* "src/external/CMakeLists.txt"
|
| 571 | (("add_subdirectory\\(rpc_xdr\\)") "")))))))
|
| 572 | (native-inputs
|
| 573 | (list doxygen
|
| 574 | graphviz
|
| 575 | pkg-config
|
| 576 | python
|
| 577 | python-pygments
|
| 578 | python-sphinx))
|
| 579 | (inputs
|
| 580 | (list fftwf
|
| 581 | `(,hwloc "lib")
|
| 582 | libtirpc
|
| 583 | lmfit
|
| 584 | muparser
|
| 585 | openblas
|
| 586 | perl
|
| 587 | tinyxml2
|
| 588 | tng))
|
| 589 | (home-page "https://www.gromacs.org/")
|
| 590 | (synopsis "Molecular dynamics software package")
|
| 591 | (description "GROMACS is a versatile package to perform molecular dynamics,
|
| 592 | i.e. simulate the Newtonian equations of motion for systems with hundreds to
|
| 593 | millions of particles. It is primarily designed for biochemical molecules like
|
| 594 | proteins, lipids and nucleic acids that have a lot of complicated bonded
|
| 595 | interactions, but since GROMACS is extremely fast at calculating the nonbonded
|
| 596 | interactions (that usually dominate simulations) many groups are also using it
|
| 597 | for research on non-biological systems, e.g. polymers. GROMACS supports all the
|
| 598 | usual algorithms you expect from a modern molecular dynamics implementation.")
|
| 599 | (license license:lgpl2.1+)
|
| 600 | (properties '((tunable? . #t)))))
|
| 601 |
|
| 602 | (define-public openbabel
|
| 603 | (package
|
| 604 | (name "openbabel")
|
| 605 | (version "3.1.1")
|
| 606 | (source
|
| 607 | (origin
|
| 608 | (method git-fetch)
|
| 609 | (uri (git-reference
|
| 610 | (url "https://github.com/openbabel/openbabel")
|
| 611 | (commit (string-append
|
| 612 | "openbabel-"
|
| 613 | (string-replace-substring version "." "-")))))
|
| 614 | (sha256
|
| 615 | (base32 "1ijl4px8nw9824znrsw9nsv4qf9xy0zgd8wrw8hhl15jy1sn02n1"))
|
| 616 | (file-name (git-file-name name version))))
|
| 617 | (build-system cmake-build-system)
|
| 618 | (arguments
|
| 619 | (list
|
| 620 | |
| 621 | |
| 622 | #:tests? (or (%current-target-system)
|
| 623 | (not (string=? "i686-linux" (%current-system))))
|
| 624 | #:configure-flags
|
| 625 | '(list
|
| 626 | "-DOPENBABEL_USE_SYSTEM_INCHI=ON"
|
| 627 | (string-append
|
| 628 | "-DINCHI_LIBRARY="
|
| 629 | (search-input-file %build-inputs "/lib/inchi/libinchi.so.1"))
|
| 630 | (string-append "-DINCHI_INCLUDE_DIR="
|
| 631 | (search-input-directory %build-inputs "/include/inchi")))
|
| 632 | #:phases
|
| 633 | '(modify-phases %standard-phases
|
| 634 | |
| 635 | |
| 636 | (add-after 'unpack 'fix-time-check
|
| 637 | (lambda _
|
| 638 | (substitute* "src/config.h.cmake"
|
| 639 | (("(#ifdef HAVE_(SYS_)?TIME)(.*)$" _ old _ suffix)
|
| 640 | (string-append old "_H" suffix))))))))
|
| 641 | (native-inputs
|
| 642 | (list pkg-config))
|
| 643 | (inputs
|
| 644 | (list eigen inchi libxml2 rapidjson zlib))
|
| 645 | (home-page "https://openbabel.org/")
|
| 646 | (synopsis "Chemistry data manipulation toolbox")
|
| 647 | (description
|
| 648 | "Open Babel is a chemical toolbox designed to speak the many languages of
|
| 649 | chemical data. It's a collaborative project allowing anyone to search, convert,
|
| 650 | analyze, or store data from molecular modeling, chemistry, solid-state
|
| 651 | materials, biochemistry, or related areas.")
|
| 652 | (license license:gpl2)))
|
| 653 |
|
| 654 | (define-public spglib
|
| 655 | (package
|
| 656 | (name "spglib")
|
| 657 | (version "2.5.0")
|
| 658 | (source
|
| 659 | (origin
|
| 660 | (method git-fetch)
|
| 661 | (uri (git-reference
|
| 662 | (url "https://github.com/spglib/spglib")
|
| 663 | (commit (string-append "v" version))))
|
| 664 | (sha256
|
| 665 | (base32 "0x5igrqwx7r2shysmi9sqcjg4hpb7hba3ddlwg05z6c57a3ifbqc"))
|
| 666 | (file-name (git-file-name name version))))
|
| 667 | (build-system cmake-build-system)
|
| 668 | (arguments
|
| 669 | '(#:tests? #f |
| 670 | #:configure-flags '("-DSPGLIB_WITH_TESTS=OFF")
|
| 671 | #:phases (modify-phases %standard-phases
|
| 672 | (add-before 'configure 'patch-files (lambda _ (substitute* "CMakeLists.txt"
|
| 673 | (("include\\(cmake/DynamicVersion.cmake\\)")
|
| 674 | "")
|
| 675 | (("dynamic_version.*")
|
| 676 | "")
|
| 677 | (("PROJECT_PREFIX.*")
|
| 678 | "")
|
| 679 | (("FALLBACK_VERSION.*")
|
| 680 | "set (PROJECT_VERSION 2.5.0")
|
| 681 | (("\\$\\{PROJECT_VERSION_FULL\\}")
|
| 682 | "2.5.0")
|
| 683 | (("\\$\\{GIT_COMMIT\\}")
|
| 684 | "\"\""))
|
| 685 | (substitute* "src/CMakeLists.txt"
|
| 686 | ((".*Spglib_GitHash.*")
|
| 687 | ""))))
|
| 688 | (add-after 'unpack 'patch-header-install-dir
|
| 689 | (lambda _
|
| 690 | |
| 691 | |
| 692 | |
| 693 | |
| 694 | |
| 695 | |
| 696 | |
| 697 | (substitute* "CMakeLists.txt"
|
| 698 | (("\\$\\{CMAKE_INSTALL_INCLUDEDIR\\}" include-dir)
|
| 699 | (string-append include-dir "/spglib"))))))))
|
| 700 | (home-page "https://spglib.github.io/spglib/index.html")
|
| 701 | (synopsis "Library for crystal symmetry search")
|
| 702 | (description "Spglib is a library for finding and handling crystal
|
| 703 | symmetries written in C. Spglib can be used to:
|
| 704 |
|
| 705 | @enumerate
|
| 706 | @item Find symmetry operations
|
| 707 | @item Identify space-group type
|
| 708 | @item Wyckoff position assignment
|
| 709 | @item Refine crystal structure
|
| 710 | @item Find a primitive cell
|
| 711 | @item Search irreducible k-points
|
| 712 | @end enumerate")
|
| 713 | (license license:bsd-3)))
|
| 714 |
|
| 715 | (define-public python-geometric
|
| 716 | (package
|
| 717 | (name "python-geometric")
|
| 718 | (version "1.1")
|
| 719 | (source
|
| 720 | (origin
|
| 721 | (method git-fetch)
|
| 722 | (uri (git-reference
|
| 723 | (url "https://github.com/leeping/geomeTRIC")
|
| 724 | (commit version)))
|
| 725 | (file-name (git-file-name name version))
|
| 726 | (sha256
|
| 727 | (base32 "0w3c71wvhnc44pfafcjfgqkjimkcdkpjk3bahg9v6l1z8c0cyhfy"))))
|
| 728 | (build-system pyproject-build-system)
|
| 729 | (arguments
|
| 730 | (list
|
| 731 | #:phases
|
| 732 | #~(modify-phases %standard-phases
|
| 733 | (add-after 'unpack 'remove-six
|
| 734 | (lambda _
|
| 735 | (substitute* "geometric/nifty.py"
|
| 736 | (("import six") "")
|
| 737 | (("six\\.string_types") "str"))
|
| 738 | (substitute* "setup.py"
|
| 739 | (("'six',") "")))))))
|
| 740 | (native-inputs
|
| 741 | (list python-pytest
|
| 742 | python-setuptools))
|
| 743 | (propagated-inputs
|
| 744 | (list python-numpy
|
| 745 | python-scipy
|
| 746 | python-networkx))
|
| 747 | (home-page "https://github.com/leeping/geomeTRIC")
|
| 748 | (synopsis "Geometry optimization of molecular structures")
|
| 749 | (description
|
| 750 | "@code{geomeTRIC} is a Python library and program for geometry
|
| 751 | optimization of molecular structures, which works with different external
|
| 752 | quantum chemistry (and molecular mechanics) softwares.")
|
| 753 | (license license:bsd-3)))
|
| 754 |
|
| 755 | (define-public python-pymol
|
| 756 | (package
|
| 757 | (name "python-pymol")
|
| 758 | (version "3.1.0")
|
| 759 | (source
|
| 760 | (origin
|
| 761 | (method git-fetch)
|
| 762 | (uri (git-reference
|
| 763 | (url "https://github.com/schrodinger/pymol-open-source")
|
| 764 | (commit (string-append "v" version))))
|
| 765 | (file-name (git-file-name name version))
|
| 766 | (sha256
|
| 767 | (base32 "199zhpdljsvfjnvs7h7q17ib7ajnjiwg790rg8xxhaszjd968byq"))))
|
| 768 | (build-system pyproject-build-system)
|
| 769 | (arguments
|
| 770 | (list
|
| 771 | |
| 772 | #:tests? #f
|
| 773 | #:configure-flags
|
| 774 | #~(list "--glut" "--testing")
|
| 775 | #:phases
|
| 776 | #~(modify-phases %standard-phases
|
| 777 | (add-after 'unpack 'make-reproducible
|
| 778 | (lambda _
|
| 779 | (substitute* "create_shadertext.py"
|
| 780 | (("time\\.time\\(\\)")
|
| 781 | "0"))))
|
| 782 | (add-after 'unpack 'add-include-directories
|
| 783 | (lambda* (#:key inputs #:allow-other-keys)
|
| 784 | (setenv "CPLUS_INCLUDE_PATH"
|
| 785 | (string-join
|
| 786 | (list
|
| 787 | (search-input-directory inputs "/include/freetype2")
|
| 788 | (search-input-directory inputs "/include/libxml2")
|
| 789 | (getenv "CPLUS_INCLUDE_PATH"))
|
| 790 | ":"))))
|
| 791 | |
| 792 | |
| 793 | (add-after 'unpack 'disable-unchroot
|
| 794 | (lambda _
|
| 795 | (substitute* "setup.py"
|
| 796 | (("self\\.unchroot")
|
| 797 | ""))))
|
| 798 | |
| 799 | |
| 800 | (delete 'build)
|
| 801 | (replace 'install
|
| 802 | (lambda _
|
| 803 | (invoke "python" "setup.py" "install"
|
| 804 | (string-append "--prefix=" #$output) "--root=/"))))))
|
| 805 | (inputs (list freetype
|
| 806 | libpng
|
| 807 | freeglut
|
| 808 | glew
|
| 809 | libxml2
|
| 810 | python-pyqt-6
|
| 811 | glm
|
| 812 | netcdf))
|
| 813 | (native-inputs (list cmake-minimal catch2-2 python-pytest python-setuptools))
|
| 814 | (propagated-inputs (list python-numpy-1))
|
| 815 | (home-page "https://pymol.org")
|
| 816 | (synopsis "Molecular visualization system")
|
| 817 | (description
|
| 818 | "PyMOL is a capable molecular viewer and renderer. It can be used to
|
| 819 | prepare publication-quality figures, to share interactive results with your
|
| 820 | colleagues, or to generate pre-rendered animations.")
|
| 821 | (license license:bsd-3)))
|
| 822 |
|
| 823 | (define-public python-pyscf
|
| 824 | (package
|
| 825 | (name "python-pyscf")
|
| 826 | (version "2.9.0")
|
| 827 | (source
|
| 828 | (origin
|
| 829 | (method git-fetch)
|
| 830 | (uri (git-reference
|
| 831 | (url "https://github.com/pyscf/pyscf")
|
| 832 | (commit (string-append "v" version))))
|
| 833 | (file-name (git-file-name name version))
|
| 834 | (sha256
|
| 835 | (base32 "1lj48c749aqf9zd5xbshjsfr0y972r2nsm8lf3760jbfadg9jdsi"))))
|
| 836 | (build-system pyproject-build-system)
|
| 837 | (arguments
|
| 838 | (list
|
| 839 | #:modules
|
| 840 | '((guix build pyproject-build-system)
|
| 841 | (guix build utils)
|
| 842 | (ice-9 textual-ports))
|
| 843 | |
| 844 | #:tests? #f
|
| 845 | #:phases
|
| 846 | #~(modify-phases %standard-phases
|
| 847 | (add-before 'build 'set-cmake-arguments
|
| 848 | (lambda _
|
| 849 | |
| 850 | |
| 851 | (setenv "CMAKE_CONFIGURE_ARGS"
|
| 852 | (string-join
|
| 853 | `("-DCMAKE_BUILD_TYPE=RelWithDebInfo"
|
| 854 | ,(string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
|
| 855 | |
| 856 | "-DCMAKE_INSTALL_LIBDIR=lib"
|
| 857 | |
| 858 | "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
|
| 859 | |
| 860 | ,(string-append "-DCMAKE_INSTALL_RPATH=" #$output "/lib")
|
| 861 | |
| 862 | "-DCMAKE_VERBOSE_MAKEFILE=ON"
|
| 863 | "-DENABLE_LIBXC=OFF"
|
| 864 | "-DBUILD_LIBXC=OFF"
|
| 865 | "-DBUILD_XCFUN=OFF"
|
| 866 | "-DBUILD_LIBCINT=OFF"))))))))
|
| 867 | (native-inputs
|
| 868 | (list
|
| 869 | cmake-minimal
|
| 870 | |
| 871 | |
| 872 | |
| 873 | |
| 874 | |
| 875 | (canonical-package gcc)
|
| 876 | python-setuptools
|
| 877 | python-wheel))
|
| 878 | (inputs
|
| 879 | (list
|
| 880 | |
| 881 | (if (and (assq 'cpu-tuning (package-properties this-package))
|
| 882 | (target-x86-64?))
|
| 883 | qcint
|
| 884 | libcint)
|
| 885 | xcfun
|
| 886 | openblas))
|
| 887 | (propagated-inputs
|
| 888 | (list python-numpy
|
| 889 | python-scipy
|
| 890 | python-h5py))
|
| 891 | (home-page "https://github.com/pyscf/pyscf")
|
| 892 | (synopsis "Python library for quantum chemistry calculations")
|
| 893 | (description
|
| 894 | "@code{PySCF} (Python-based Simulations of Chemistry Framework) is a
|
| 895 | Python library for quantum chemistry calculations and method development.
|
| 896 | Most of the functionality is implemented in Python, while computationally
|
| 897 | critical parts are implemented in C.")
|
| 898 | (properties '((tunable? . #t)))
|
| 899 | (license license:asl2.0)))
|
| 900 |
|
| 901 | (define-public python-pyscf-dispersion
|
| 902 | (package
|
| 903 | (name "python-pyscf-dispersion")
|
| 904 | (version "1.2.0")
|
| 905 | (source
|
| 906 | (origin
|
| 907 | (method git-fetch)
|
| 908 | (uri (git-reference
|
| 909 | (url "https://github.com/pyscf/dispersion")
|
| 910 | (commit (string-append "v" version))))
|
| 911 | (file-name (git-file-name name version))
|
| 912 | (sha256
|
| 913 | (base32 "0za1qmn0v948zalw1j6j0qdbj7cnfz398aq1lf145frxddmprz8n"))))
|
| 914 | (build-system pyproject-build-system)
|
| 915 | (arguments
|
| 916 | (list
|
| 917 | #:phases
|
| 918 | #~(modify-phases %standard-phases
|
| 919 | |
| 920 | (add-after 'unpack 'disable-build
|
| 921 | (lambda _
|
| 922 | (substitute* "setup.py"
|
| 923 | (("packages=modules.*")
|
| 924 | "packages=modules,")
|
| 925 | (("cmdclass=.*") ""))))
|
| 926 | (add-after 'install 'symlink
|
| 927 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 928 | (let ((outdir (string-append (site-packages inputs outputs)
|
| 929 | "/pyscf/lib")))
|
| 930 | (mkdir-p outdir)
|
| 931 | (symlink (string-append #$(this-package-input "fortran-simple-dftd3")
|
| 932 | "/lib/libs-dftd3.so")
|
| 933 | (string-append outdir "/libs-dftd3.so"))
|
| 934 | (symlink (string-append #$(this-package-input "fortran-dftd4")
|
| 935 | "/lib/libdftd4.so")
|
| 936 | (string-append outdir "/libdftd4.so"))))))))
|
| 937 | (native-inputs
|
| 938 | (list python-pytest
|
| 939 | python-setuptools
|
| 940 | python-wheel))
|
| 941 | (inputs
|
| 942 | (list fortran-simple-dftd3
|
| 943 | fortran-dftd4))
|
| 944 | (propagated-inputs
|
| 945 | (list python-pyscf))
|
| 946 | (home-page "https://github.com/pyscf/dispersion")
|
| 947 | (synopsis "PySCF extensions for dispersion calculations")
|
| 948 | (description
|
| 949 | "This package is a wrapper around simple-dftd3 and dftd4 for use with pyscf.")
|
| 950 | (license license:asl2.0)))
|
| 951 |
|
| 952 | (define-public python-pyscf-properties
|
| 953 | (let ((commit "4eee5a430fb47eca5962f36fdcaf75c2b87e7ede")
|
| 954 | (revision "1"))
|
| 955 | (package
|
| 956 | (name "python-pyscf-properties")
|
| 957 | (version (git-version "0.1" revision commit))
|
| 958 | (source
|
| 959 | (origin
|
| 960 | (method git-fetch)
|
| 961 | (uri (git-reference
|
| 962 | (url "https://github.com/pyscf/properties")
|
| 963 | (commit commit)))
|
| 964 | (file-name (git-file-name name version))
|
| 965 | (sha256
|
| 966 | (base32 "0jzyfqhk6hcn1dpc311iiamc5dnwp71q5087432f5gqqvpg1zz94"))))
|
| 967 | (build-system pyproject-build-system)
|
| 968 | (arguments (list #:tests? #f)) |
| 969 | (native-inputs
|
| 970 | (list python-setuptools
|
| 971 | python-wheel))
|
| 972 | (propagated-inputs
|
| 973 | (list python-pyscf))
|
| 974 | (home-page "https://github.com/pyscf/properties")
|
| 975 | (synopsis "PySCF electronic properties extension")
|
| 976 | (description
|
| 977 | "This extension to python-pyscf provides calculations of different
|
| 978 | electromagnetic properties for molecules and crystals.")
|
| 979 | (license license:asl2.0))))
|
| 980 |
|
| 981 | |
| 982 | |
| 983 | (define-public qcint
|
| 984 | (hidden-package
|
| 985 | (let ((base libcint))
|
| 986 | (package
|
| 987 | (inherit base)
|
| 988 | (name "qcint")
|
| 989 | (source
|
| 990 | (origin
|
| 991 | (method git-fetch)
|
| 992 | (uri (git-reference
|
| 993 | (url "https://github.com/sunqm/qcint")
|
| 994 | (commit (string-append "v" (package-version base)))))
|
| 995 | (file-name (git-file-name name (package-version base)))
|
| 996 | (sha256
|
| 997 | (base32
|
| 998 | "17cgb2m93n48fagl5m2kr8n6kk8m9j6bxkhmh492ms3dbm0xpxml"))
|
| 999 | (modules '((guix build utils)))
|
| 1000 | (snippet
|
| 1001 | '(begin
|
| 1002 | |
| 1003 | (delete-file-recursively "src/autocode")))))
|
| 1004 | (arguments
|
| 1005 | (substitute-keyword-arguments arguments
|
| 1006 | ((#:configure-flags flags '())
|
| 1007 | #~(cons "-DBUILD_MARCH_NATIVE=OFF"
|
| 1008 | #$flags))
|
| 1009 | ((#:phases phases)
|
| 1010 | #~(modify-phases #$phases
|
| 1011 | (delete 'adjust-build-path)))
|
| 1012 | |
| 1013 | ((#:tests? _ #f) #f)))
|
| 1014 | (native-inputs
|
| 1015 | (modify-inputs native-inputs
|
| 1016 | (prepend (package-source base))))
|
| 1017 | (supported-systems '("x86_64-linux"))
|
| 1018 | (home-page "https://github.com/sunqm/qcint")
|
| 1019 | (synopsis "General GTO integrals for quantum chemistry (SIMD version
|
| 1020 | for x86_64)")
|
| 1021 | (description "@code{qcint} is an optimized version of @code{libcint}, a
|
| 1022 | C library (also with a Fortran API) to evaluate one- and two-electron
|
| 1023 | integrals for Gaussian type functions.")
|
| 1024 | (properties `((tunable? . #t)))
|
| 1025 | (license license:gpl3+)))))
|
| 1026 |
|
| 1027 | (define-public gemmi
|
| 1028 | (package
|
| 1029 | (name "gemmi")
|
| 1030 | (version "0.7.3")
|
| 1031 | (source (origin
|
| 1032 | (method git-fetch)
|
| 1033 | (uri (git-reference
|
| 1034 | (url "https://github.com/project-gemmi/gemmi")
|
| 1035 | (commit (string-append "v" version))))
|
| 1036 | (file-name (git-file-name name version))
|
| 1037 | (sha256
|
| 1038 | (base32
|
| 1039 | "01fdpb695gqsl5xznrlqjydnrckqbfndzr8fj66pryzv8d0fdfsg"))
|
| 1040 | (patches
|
| 1041 | (search-patches "gemmi-fix-pegtl-usage.patch"))
|
| 1042 | (modules '((guix build utils)))
|
| 1043 | (snippet
|
| 1044 | '(begin
|
| 1045 | (delete-file-recursively "include/gemmi/third_party")
|
| 1046 | (delete-file-recursively "third_party")))))
|
| 1047 | (outputs '("out" "bin" "python"))
|
| 1048 | (build-system cmake-build-system)
|
| 1049 | (arguments
|
| 1050 | (list
|
| 1051 | #:imported-modules (append %cmake-build-system-modules
|
| 1052 | %pyproject-build-system-modules)
|
| 1053 | #:modules
|
| 1054 | '((guix build cmake-build-system)
|
| 1055 | (guix build utils)
|
| 1056 | ((guix build pyproject-build-system) #:select (site-packages)))
|
| 1057 | #:configure-flags
|
| 1058 | #~(list "-DUSE_PYTHON=ON"
|
| 1059 | (string-append "-DPYTHON_INSTALL_DIR="
|
| 1060 | (site-packages %build-inputs %outputs)))
|
| 1061 | #:phases
|
| 1062 | #~(modify-phases %standard-phases
|
| 1063 | (add-after 'unpack 'patch-includes
|
| 1064 | (lambda _
|
| 1065 | (substitute* (list "src/json.cpp"
|
| 1066 | "src/sprintf.cpp"
|
| 1067 | "include/gemmi/dirwalk.hpp"
|
| 1068 | "include/gemmi/cif.hpp"
|
| 1069 | "include/gemmi/json.hpp"
|
| 1070 | "python/gemmi.cpp"
|
| 1071 | "python/serial.h"
|
| 1072 | "include/gemmi/atof.hpp"
|
| 1073 | "include/gemmi/numb.hpp"
|
| 1074 | "include/gemmi/fourier.hpp")
|
| 1075 | (("<stb/stb_sprintf.h>") "<stb_sprintf.h>")
|
| 1076 | (("\"third_party/tinydir.h\"") "<tinydir.h>")
|
| 1077 | (("\"third_party/tao/pegtl.hpp\"") "<tao/pegtl.hpp>")
|
| 1078 | (("\"\\.\\./third_party/sajson.h\"") "<sajson.h>")
|
| 1079 | (("\"gemmi/third_party/tao/pegtl/parse_error.hpp\"")
|
| 1080 | "<tao/pegtl/parse_error.hpp>")
|
| 1081 | (("\"third_party/fast_float.h\"")
|
| 1082 | "<fast_float/fast_float.h>")
|
| 1083 | (("\"third_party/pocketfft_hdronly.h\"")
|
| 1084 | "<pocketfft_hdronly.h>")
|
| 1085 | (("\"\\.\\./third_party/serializer.h\"")
|
| 1086 | "<zpp/serializer.h>"))))
|
| 1087 | (add-after 'unpack 'change-bin-prefix
|
| 1088 | (lambda _
|
| 1089 | (substitute* "CMakeLists.txt"
|
| 1090 | (("install\\(TARGETS program DESTINATION bin\\)")
|
| 1091 | (string-append
|
| 1092 | "install(TARGETS program DESTINATION "
|
| 1093 | #$output:bin "/bin)")))))
|
| 1094 | (replace 'check
|
| 1095 | (lambda* (#:key tests? #:allow-other-keys)
|
| 1096 | (when tests?
|
| 1097 | (with-directory-excursion "../source"
|
| 1098 | (setenv "PYTHONPATH" "../build/py")
|
| 1099 | (invoke "python3" "-m" "unittest" "discover" "-v"
|
| 1100 | "-s" "tests"))))))))
|
| 1101 | (inputs (list python zlib))
|
| 1102 | (native-inputs
|
| 1103 | (list fast-float
|
| 1104 | optionparser
|
| 1105 | pegtl
|
| 1106 | pocketfft-cpp
|
| 1107 | python-nanobind
|
| 1108 | sajson-for-gemmi
|
| 1109 | stb-sprintf
|
| 1110 | tinydir
|
| 1111 | zpp-serializer))
|
| 1112 | (home-page "https://gemmi.readthedocs.io/en/latest/")
|
| 1113 | (synopsis "Macromolecular crystallography library and utilities")
|
| 1114 | (description "GEMMI is a C++ library for macromolecular crystallography.
|
| 1115 | It can be used for working with
|
| 1116 | @enumerate
|
| 1117 | @item macromolecular models (content of PDB, PDBx/mmCIF and mmJSON files),
|
| 1118 | @item refinement restraints (CIF files),
|
| 1119 | @item reflection data (MTZ and mmCIF formats),
|
| 1120 | @item data on a 3D grid (electron density maps, masks, MRC/CCP4 format)
|
| 1121 | @item crystallographic symmetry.
|
| 1122 | @end enumerate")
|
| 1123 | (license license:mpl2.0)))
|
| 1124 |
|
| 1125 | (define-public freesasa
|
| 1126 | (package
|
| 1127 | (name "freesasa")
|
| 1128 | (version "2.1.2")
|
| 1129 | (source (origin
|
| 1130 | (method git-fetch)
|
| 1131 | (uri (git-reference
|
| 1132 | (url "https://github.com/mittinatten/freesasa")
|
| 1133 | (commit version)))
|
| 1134 | (file-name (git-file-name name version))
|
| 1135 | (sha256
|
| 1136 | (base32
|
| 1137 | "07wdnahf3g355ryaiqvfxd5f4rl54wv8jwxcbn0nia89fqysbv0f"))
|
| 1138 | (modules '((guix build utils)))
|
| 1139 | (snippet
|
| 1140 | '(begin
|
| 1141 | |
| 1142 | (for-each delete-file
|
| 1143 | '("src/parser.c" "src/parser.h"
|
| 1144 | "src/lexer.c" "src/lexer.h"))))))
|
| 1145 | (outputs '("out" "doc"))
|
| 1146 | (build-system gnu-build-system)
|
| 1147 | (arguments
|
| 1148 | (list
|
| 1149 | #:configure-flags
|
| 1150 | #~(list "--enable-check"
|
| 1151 | "--enable-parser-generator"
|
| 1152 | "CXXFLAGS=-std=c++17"
|
| 1153 | "--enable-doxygen"
|
| 1154 | |
| 1155 | |
| 1156 | |
| 1157 | |
| 1158 | "CFLAGS=-fno-builtin-malloc")
|
| 1159 | #:phases
|
| 1160 | #~(modify-phases %standard-phases
|
| 1161 | (add-after 'unpack 'remove-libc++-linking
|
| 1162 | (lambda _
|
| 1163 | (substitute* "src/Makefile.am"
|
| 1164 | (("-lc\\+\\+") ""))))
|
| 1165 | (add-after 'unpack 'build-shared-library
|
| 1166 | (lambda _
|
| 1167 | (substitute* "src/Makefile.am"
|
| 1168 | (("lib_LIBRARIES") "lib_LTLIBRARIES")
|
| 1169 | (("libfreesasa\\.a") "libfreesasa.la")
|
| 1170 | (("freesasa_LDADD \\+= libfreesasa\\.la" prev)
|
| 1171 | (string-append prev "\nlibfreesasa_la_LIBADD"
|
| 1172 | " = -ljson-c -lgemmi_cpp ${libxml2_LIBS}\n"))
|
| 1173 | (("_a_SOURCES") "_la_SOURCES"))
|
| 1174 | (substitute* "configure.ac"
|
| 1175 | (("AC_PROG_INSTALL" inst)
|
| 1176 | (string-append "AM_PROG_LIBTOOL\n" inst)))
|
| 1177 | (substitute* "tests/Makefile.am"
|
| 1178 | (("libfreesasa\\.a") "libfreesasa.la"))))
|
| 1179 | (add-after 'unpack 'fix-new-gemmi
|
| 1180 | (lambda _
|
| 1181 | (substitute* "src/cif.cc"
|
| 1182 | (("models\\[i\\]\\.name")
|
| 1183 | "std::to_string(models[i].num)")
|
| 1184 | (("convert_pair_to_loop") "ensure_loop"))))
|
| 1185 | (add-before 'build 'build-lexer-and-parser
|
| 1186 | (lambda _
|
| 1187 | (with-directory-excursion "src"
|
| 1188 | (invoke "make" "lexer.h" "parser.h"))))
|
| 1189 | (add-after 'install 'install-doc
|
| 1190 | (lambda _
|
| 1191 | (copy-recursively
|
| 1192 | "doc/html"
|
| 1193 | (string-append #$output:doc "/share/doc/"
|
| 1194 | #$name "-" #$version)))))))
|
| 1195 | (inputs (list gemmi json-c libxml2))
|
| 1196 | (native-inputs
|
| 1197 | (list autoconf
|
| 1198 | automake
|
| 1199 | bison
|
| 1200 | check
|
| 1201 | doxygen
|
| 1202 | fast-float
|
| 1203 | flex
|
| 1204 | libtool
|
| 1205 | pegtl
|
| 1206 | perl
|
| 1207 | pkg-config))
|
| 1208 | (home-page "https://freesasa.github.io/")
|
| 1209 | (synopsis "Calculate the solvent accessible surface area (SASA) of
|
| 1210 | molecules")
|
| 1211 | (description "FreeSASA is a command line tool and C-library for
|
| 1212 | calculating @acronym{SASAs, solvent accessible surface areas}. By default Lee
|
| 1213 | & Richards' algorithm is used, but Shrake & Rupley's is also available. Both
|
| 1214 | can be parameterized to arbitrary precision, and for high resolution versions
|
| 1215 | of the algorithms, the calculations give identical results.")
|
| 1216 | (license license:expat)))
|
| 1217 |
|
| 1218 | (define-public maeparser
|
| 1219 | (package
|
| 1220 | (name "maeparser")
|
| 1221 | (version "1.3.1")
|
| 1222 | (source (origin
|
| 1223 | (method git-fetch)
|
| 1224 | (uri (git-reference
|
| 1225 | (url "https://github.com/schrodinger/maeparser")
|
| 1226 | (commit (string-append "v" version))))
|
| 1227 | (file-name (git-file-name name version))
|
| 1228 | (sha256
|
| 1229 | (base32
|
| 1230 | "0mr5glg4br04ql5grby8yqni9fqq1l1cc75wyc159a1b9lwr7q7r"))))
|
| 1231 | (build-system cmake-build-system)
|
| 1232 | (inputs (list boost zlib))
|
| 1233 | (home-page "https://github.com/schrodinger/maeparser")
|
| 1234 | (synopsis "Maestro file parser")
|
| 1235 | (description "maeparser is a parser for Schrodinger Maestro files.")
|
| 1236 | (license license:expat)))
|
| 1237 |
|
| 1238 | (define-public coordgenlibs
|
| 1239 | (package
|
| 1240 | (name "coordgenlibs")
|
| 1241 | (version "3.0.2")
|
| 1242 | (source (origin
|
| 1243 | (method git-fetch)
|
| 1244 | (uri (git-reference
|
| 1245 | (url "https://github.com/schrodinger/coordgenlibs/")
|
| 1246 | (commit (string-append "v" version))))
|
| 1247 | (file-name (git-file-name name version))
|
| 1248 | (sha256
|
| 1249 | (base32
|
| 1250 | "1wjaxwaihjy9xm5ys23f5abl50zcar1h9pww5ajdkgygsqy0bavi"))))
|
| 1251 | (build-system cmake-build-system)
|
| 1252 | (arguments
|
| 1253 | (list
|
| 1254 | #:configure-flags
|
| 1255 | #~(list "-DCOORDGEN_RIGOROUS_BUILD=OFF"
|
| 1256 | "-DCOORDGEN_USE_MAEPARSER=ON")))
|
| 1257 | (inputs (list boost maeparser))
|
| 1258 | (home-page "https://github.com/schrodinger/coordgenlibs/")
|
| 1259 | (synopsis "2D molecule coordinate generation")
|
| 1260 | (description "@code{coordgenlibs} contains algorithms to generate 2D
|
| 1261 | coordinates of molecules including macrocycles and metal complexes. It has an
|
| 1262 | emphasis on quality rather than speed.")
|
| 1263 | (license license:bsd-3)))
|
| 1264 |
|
| 1265 | (define-public yaehmop
|
| 1266 | (package
|
| 1267 | (name "yaehmop")
|
| 1268 | (version "2024.03.1")
|
| 1269 | (source (origin
|
| 1270 | (method git-fetch)
|
| 1271 | (uri (git-reference
|
| 1272 | (url "https://github.com/greglandrum/yaehmop")
|
| 1273 | (commit (string-append "v" version))))
|
| 1274 | (file-name (git-file-name name version))
|
| 1275 | (sha256
|
| 1276 | (base32
|
| 1277 | "1wy38cfqfs203p1k3qqsizzlpvasldjcfxmlng54y5mxzw97n55f"))
|
| 1278 | (modules '((guix build utils)))
|
| 1279 | (snippet
|
| 1280 | '(begin
|
| 1281 | |
| 1282 | (delete-file-recursively "viewkel")
|
| 1283 | |
| 1284 | (for-each delete-file (find-files "examples" "\\.Z$"))
|
| 1285 | |
| 1286 | (for-each delete-file (find-files "docs" "\\.(ps|pdf)$"))
|
| 1287 | |
| 1288 | |
| 1289 | (delete-file-recursively "tightbind/f2c_files")
|
| 1290 | (with-directory-excursion "tightbind"
|
| 1291 | (for-each delete-file '("abfns.c"
|
| 1292 | "cboris.c"
|
| 1293 | "diag.c"
|
| 1294 | "lovlap.c")))))))
|
| 1295 | (build-system cmake-build-system)
|
| 1296 | (arguments
|
| 1297 | (list
|
| 1298 | #:configure-flags
|
| 1299 | #~(list
|
| 1300 | "-DUSE_BLAS_LAPACK=ON"
|
| 1301 | |
| 1302 | "-DCMAKE_C_FLAGS=-Wno-implicit-function-declaration"
|
| 1303 | (string-append "-DPARM_FILE_LOC=" #$output
|
| 1304 | "/share/" #$name "-" #$version "/eht_parms.dat")
|
| 1305 | "-DBIND_EXE_NAME=yaehmop-bind")
|
| 1306 | #:phases
|
| 1307 | #~(modify-phases %standard-phases
|
| 1308 | (add-after 'unpack 'chdir
|
| 1309 | (lambda _
|
| 1310 | (chdir "tightbind")))
|
| 1311 | (add-after 'chdir 'patch-fortran-functions
|
| 1312 | (lambda _
|
| 1313 | (substitute* '("mov.c" "prototypes.h")
|
| 1314 | (("lovlap\\(") "lovlap_(")
|
| 1315 | (("abfns\\(") "abfns_("))))
|
| 1316 | (add-after 'chdir 'patch-cmake
|
| 1317 | (lambda _
|
| 1318 | (substitute* "CMakeLists.txt"
|
| 1319 | (("project\\(yaehmop C\\)") "project(yaehmop C Fortran)")
|
| 1320 | (("abfns.c") "fortran77/abfns.f")
|
| 1321 | (("lovlap.c") "fortran77/lovlap.f")
|
| 1322 | (("(set\\(PARM_FILE_LOC.*)\\)" all init)
|
| 1323 | (string-append init " CACHE STRING \"\")"))
|
| 1324 | (("add_library\\(yaehmop_eht" lib)
|
| 1325 | (string-append lib " SHARED "))
|
| 1326 | (("target_link_libraries\\(test_eht \\$\\{LAPACK_LIBRARIES\\}.*"
|
| 1327 | all)
|
| 1328 | (string-append all "\ntarget_link_libraries(yaehmop_eht "
|
| 1329 | "${LAPACK_LIBRARIES})\n")))))
|
| 1330 | (add-after 'build 'build-doc
|
| 1331 | (lambda _
|
| 1332 | (with-directory-excursion "../docs"
|
| 1333 | (substitute* "bind_manual.tex"
|
| 1334 | (("\\\\usepackage\\{bindpage\\}")
|
| 1335 | (string-append
|
| 1336 | "\\usepackage[left=2cm,right=2cm,top=4cm,bottom=2cm]"
|
| 1337 | "{geometry}\n"
|
| 1338 | "\\pdfsuppressptexinfo=-1\n")))
|
| 1339 | (substitute* "Zmat_appendix.tex"
|
| 1340 | (("file=dihedral\\.eps")
|
| 1341 | "file=figs/dihedral.eps"))
|
| 1342 | (setenv "FORCE_SOURCE_DATE" "1")
|
| 1343 | (setenv "TEXMFVAR" "/tmp")
|
| 1344 | (invoke "latexmk" "-pdf" "bind_manual.tex"))))
|
| 1345 | (add-after 'install 'install-eht-parms
|
| 1346 | (lambda _
|
| 1347 | (install-file "../tightbind/eht_parms.dat"
|
| 1348 | (string-append #$output "/share/"
|
| 1349 | #$name "-" #$version))))
|
| 1350 | (add-after 'install-eht-parms 'install-doc
|
| 1351 | (lambda _
|
| 1352 | (install-file "../docs/bind_manual.pdf"
|
| 1353 | (string-append #$output "/share/doc/"
|
| 1354 | #$name "-" #$version))))
|
| 1355 | (delete 'check)
|
| 1356 | (add-after 'install-doc 'check
|
| 1357 | (lambda* (#:key tests? #:allow-other-keys)
|
| 1358 | (when tests?
|
| 1359 | (invoke "./test_eht")))))))
|
| 1360 | (inputs (list openblas))
|
| 1361 | (native-inputs
|
| 1362 | (list gfortran
|
| 1363 | (texlive-local-tree
|
| 1364 | (list texlive-epstopdf
|
| 1365 | texlive-latexmk))))
|
| 1366 | (home-page "https://github.com/greglandrum/yaehmop")
|
| 1367 | (synopsis "Perform extended Hückel calculations")
|
| 1368 | (description "@acronym{YAeHMOP, Yet Another extended Hueckel Molecular
|
| 1369 | Orbital Package} contains a program and library for performing extended Hückel
|
| 1370 | calculations and analyzing the results.")
|
| 1371 | (license license:bsd-2)))
|
| 1372 |
|
| 1373 | (define-public avalon-toolkit
|
| 1374 | (package
|
| 1375 | (name "avalon-toolkit")
|
| 1376 | (version "2.0.5a")
|
| 1377 | (source (origin
|
| 1378 | (method git-fetch)
|
| 1379 | (uri (git-reference
|
| 1380 | (url "https://github.com/rohdebe1/ava-formake")
|
| 1381 | (commit (string-append "AvalonToolkit_" version))))
|
| 1382 | (file-name (git-file-name name version))
|
| 1383 | (sha256
|
| 1384 | (base32
|
| 1385 | "1mfg40y5xc17sm59zdfc5sk22n9zm5zk0z1aw47chvl6hp465szk"))
|
| 1386 | (patches
|
| 1387 | (search-patches "avalon-toolkit-rdkit-fixes.patch"))
|
| 1388 | (modules '((guix build utils) (ice-9 ftw)))
|
| 1389 | (snippet
|
| 1390 | #~(begin
|
| 1391 | (delete-file-recursively "src/main/java")
|
| 1392 | (delete-file-recursively "src/test/target")))))
|
| 1393 | (build-system gnu-build-system)
|
| 1394 | (arguments
|
| 1395 | (list
|
| 1396 | |
| 1397 | #:tests? #f
|
| 1398 | #:phases
|
| 1399 | #~(modify-phases %standard-phases
|
| 1400 | (delete 'configure)
|
| 1401 | (replace 'build
|
| 1402 | (lambda* (#:key parallel-build? #:allow-other-keys)
|
| 1403 | (mkdir "build")
|
| 1404 | (mkdir-p "target/executables")
|
| 1405 | (mkdir-p "target/libraries")
|
| 1406 | (invoke "make" "programs" "-j"
|
| 1407 | (if parallel-build?
|
| 1408 | (number->string (parallel-job-count))
|
| 1409 | "1"))))
|
| 1410 | (replace 'install
|
| 1411 | (lambda _
|
| 1412 | |
| 1413 | (let ((programs '("canonizer" "matchtest" "smi2mol" "struchk")))
|
| 1414 | (for-each
|
| 1415 | (lambda (program)
|
| 1416 | (install-file (string-append "target/executables/" program)
|
| 1417 | (string-append #$output "/bin")))
|
| 1418 | programs))
|
| 1419 | (for-each
|
| 1420 | (lambda (name)
|
| 1421 | (symlink (string-append #$output "/bin/smi2mol")
|
| 1422 | (string-append #$output "/bin/" name)))
|
| 1423 | '("mol2smi" "rdf2smi" "mol2tbl" "mol2sma" "smi2rdf"))
|
| 1424 | |
| 1425 | (install-file "target/libraries/libavalon_tools.a"
|
| 1426 | (string-append #$output "/lib"))
|
| 1427 | (install-file "target/libraries/libavalon4rdkit.a"
|
| 1428 | (string-append #$output "/lib"))
|
| 1429 | (for-each
|
| 1430 | (lambda (file)
|
| 1431 | (install-file file (string-append #$output
|
| 1432 | "/include/avalontoolkit")))
|
| 1433 | (find-files "src/main/C/include" "\\.h$"))
|
| 1434 | (install-file "license.txt"
|
| 1435 | (string-append #$output "/share/doc/"
|
| 1436 | #$name "-" #$version "/")))))))
|
| 1437 | (home-page "https://sourceforge.net/projects/avalontoolkit/")
|
| 1438 | (synopsis "Tools for SMILES and MOL files and for structure fingerprinting")
|
| 1439 | (description "This package contains a library and programs for
|
| 1440 | canonicalization of SMILES and MOL files, molecular structure fingerprinting
|
| 1441 | and rendering molecules.")
|
| 1442 | (license license:bsd-3)))
|
| 1443 |
|
| 1444 | (define-public ringdecomposerlib
|
| 1445 | (package
|
| 1446 | (name "ringdecomposerlib")
|
| 1447 | (version "1.1.3")
|
| 1448 | (source (origin
|
| 1449 | (method git-fetch)
|
| 1450 | (uri (git-reference
|
| 1451 | (url "https://github.com/rareylab/RingDecomposerLib")
|
| 1452 | (commit (string-append "v" version "_rdkit"))))
|
| 1453 | (file-name (git-file-name name version))
|
| 1454 | (sha256
|
| 1455 | (base32
|
| 1456 | "1rxzs2wpkkdi40wdzxc4sn0brk7dm7ivgqyfh38gf2f5c7pbg0wi"))))
|
| 1457 | (build-system cmake-build-system)
|
| 1458 | (arguments
|
| 1459 | (list
|
| 1460 | #:configure-flags
|
| 1461 | #~(list "-DBUILD_PYTHON_WRAPPER=ON"
|
| 1462 | "-DPYTHON_EXECUTABLE=python3"
|
| 1463 | (string-append "-DPYTHON_FLAGS=;--prefix=" #$output ";--root=/"))
|
| 1464 | #:imported-modules (append %cmake-build-system-modules
|
| 1465 | %pyproject-build-system-modules)
|
| 1466 | #:modules '((guix build cmake-build-system)
|
| 1467 | (guix build utils)
|
| 1468 | ((guix build pyproject-build-system) #:prefix py:))
|
| 1469 | #:phases
|
| 1470 | #~(modify-phases %standard-phases
|
| 1471 | (add-before 'configure 'patch-cmake
|
| 1472 | (lambda _
|
| 1473 | (substitute* (list "src/Test/CMakeLists.txt"
|
| 1474 | "src/RingDecomposerLib/CMakeLists.txt")
|
| 1475 | (("build_.*STATIC") "#"))
|
| 1476 | (substitute* "test/CMakeLists.txt"
|
| 1477 | (("STATIC_TEST") "SHARED_TEST"))
|
| 1478 | |
| 1479 | (substitute* "src/python/CMakeLists.txt"
|
| 1480 | (("RingDecomposerLibStatic") "RingDecomposerLib"))
|
| 1481 | (substitute* "src/python/setup.py.in"
|
| 1482 | (("static_libs =.*") "static_libs = []\n")
|
| 1483 | (("shared_libs\\s*=.*")
|
| 1484 | (string-append
|
| 1485 | "shared_libs = ['RingDecomposerLib']"))
|
| 1486 | (("library_dirs\\s*=\\s*\\[\\]")
|
| 1487 | "library_dirs = ['${CMAKE_BINARY_DIR}/src/RingDecomposerLib']")
|
| 1488 | (("extra_objects=.*")
|
| 1489 | (string-append
|
| 1490 | "extra_link_args=['-Wl,-rpath=" #$output "/lib'],\n")))))
|
| 1491 | |
| 1492 | (add-after 'unpack 'patch-cython
|
| 1493 | (lambda _
|
| 1494 | (substitute* "src/python/setup.py.in"
|
| 1495 | (("extensions)")
|
| 1496 | "extensions, language_level=3, include_path=[\"./py_rdl/wrapper\"])"))
|
| 1497 | (substitute* "src/python/py_rdl/wrapper/DataInternal.pyx"
|
| 1498 | (("from cRingDecomposerLib cimport \\*")
|
| 1499 | "from .cRingDecomposerLib cimport *"))))
|
| 1500 | (add-after 'build 'build-doc
|
| 1501 | (lambda _
|
| 1502 | |
| 1503 | (substitute* "../source/documentation/sphinx/conf.py"
|
| 1504 | (("^(subprocess.*latex|shutil).*") ""))
|
| 1505 | (substitute* "../source/documentation/doxygen.cfg"
|
| 1506 | (("GENERATE_LATEX.*YES") "GENERATE_LATEX = NO"))
|
| 1507 | |
| 1508 | (invoke "sphinx-build" "-b" "html"
|
| 1509 | "../source/documentation/sphinx" "html")))
|
| 1510 | (add-after 'install 'install-doc
|
| 1511 | (lambda _
|
| 1512 | |
| 1513 | (delete-file-recursively "html/.doctrees")
|
| 1514 | (copy-recursively "html"
|
| 1515 | (string-append #$output "/share/doc/"
|
| 1516 | #$name "-" #$version "/html"))))
|
| 1517 | (delete 'check)
|
| 1518 | (add-after 'install 'check
|
| 1519 | (assoc-ref %standard-phases 'check))
|
| 1520 | (add-before 'check 'add-install-to-pythonpath
|
| 1521 | (assoc-ref py:%standard-phases 'add-install-to-pythonpath)))))
|
| 1522 | (inputs (list python))
|
| 1523 | (native-inputs
|
| 1524 | (list doxygen
|
| 1525 | python
|
| 1526 | python-cython
|
| 1527 | python-sphinx
|
| 1528 | python-setuptools))
|
| 1529 | (home-page "https://github.com/rareylab/RingDecomposerLib")
|
| 1530 | (synopsis "Calculate ring topology descriptions")
|
| 1531 | (description "RingDecomposerLib is a library for the calculation of
|
| 1532 | unique ring families, relevant cycles, the smallest set of smallest rings and
|
| 1533 | other ring topology descriptions.")
|
| 1534 | (license license:bsd-3)))
|
| 1535 |
|
| 1536 | (define-public pubchem-align3d
|
| 1537 | (let ((commit "daefab3dd0c90ca56da9d3d5e375fe4d651e6be3")
|
| 1538 | (revision "0"))
|
| 1539 | (package
|
| 1540 | (name "pubchem-align3d")
|
| 1541 | (version (git-version "0" revision commit))
|
| 1542 | (source (origin
|
| 1543 | (method git-fetch)
|
| 1544 | (uri (git-reference
|
| 1545 | (url "https://github.com/ncbi/pubchem-align3d")
|
| 1546 | (commit commit)))
|
| 1547 | (file-name (git-file-name name version))
|
| 1548 | (sha256
|
| 1549 | (base32
|
| 1550 | "1nj1zz5nvn5h3dyj66zi11mmvmzpq3b8y51fld9bkxnsmk17h05m"))))
|
| 1551 | (build-system gnu-build-system)
|
| 1552 | (arguments
|
| 1553 | (list
|
| 1554 | #:tests? #f |
| 1555 | #:phases
|
| 1556 | #~(modify-phases %standard-phases
|
| 1557 | (delete 'configure)
|
| 1558 | (replace 'build
|
| 1559 | (lambda _
|
| 1560 | (invoke "g++"
|
| 1561 | "-o" "libpubchem-align3d.so"
|
| 1562 | "-O2" "-g" "-fPIC" "-shared"
|
| 1563 | "shape_functions1.cpp" "shape_functions2.cpp"
|
| 1564 | "shape_neighbor.cpp")))
|
| 1565 | (replace 'install
|
| 1566 | (lambda _
|
| 1567 | (for-each
|
| 1568 | (lambda (file)
|
| 1569 | (install-file
|
| 1570 | file
|
| 1571 | (string-append #$output "/include/pubchem-align3d")))
|
| 1572 | (find-files "." "\\.hpp"))
|
| 1573 | (install-file "libpubchem-align3d.so"
|
| 1574 | (string-append #$output "/lib")))))))
|
| 1575 | (home-page "https://github.com/ncbi/pubchem-align3d")
|
| 1576 | (synopsis "C++ library for aligning small molecules")
|
| 1577 | (description "This is a generic C++ library that can be used to rapidly
|
| 1578 | align two small molecules in 3D space, with shape - and optionally color -
|
| 1579 | Tanimoto scoring.")
|
| 1580 | (license license:public-domain))))
|
| 1581 |
|
| 1582 | (define-public rdkit
|
| 1583 | (package
|
| 1584 | (name "rdkit")
|
| 1585 | (version "2024.09.6")
|
| 1586 | (source (origin
|
| 1587 | (method git-fetch)
|
| 1588 | (uri (git-reference
|
| 1589 | (url "https://github.com/rdkit/rdkit")
|
| 1590 | (commit
|
| 1591 | (string-append
|
| 1592 | "Release_" (string-replace-substring version "." "_")))))
|
| 1593 | (file-name (git-file-name name version))
|
| 1594 | (sha256
|
| 1595 | (base32
|
| 1596 | "0nagqy5c9b86ip8qr1rnvby235am1zyc4sqm0z7wphbb70cqazxg"))
|
| 1597 | (patches
|
| 1598 | (search-patches "rdkit-unbundle-external-dependencies.patch"))
|
| 1599 | (modules '((guix build utils)))
|
| 1600 | (snippet
|
| 1601 | #~(begin
|
| 1602 | |
| 1603 | |
| 1604 | (for-each
|
| 1605 | (lambda (name)
|
| 1606 | (display (string-append name "\n"))
|
| 1607 | (delete-file name))
|
| 1608 | (find-files "." "\\.pkl(\\.gz)?$"))
|
| 1609 | |
| 1610 | (delete-file "Data/RDData.sqlt")
|
| 1611 | (delete-file "Data/RDTests.sqlt")))))
|
| 1612 | (build-system cmake-build-system)
|
| 1613 | (arguments
|
| 1614 | (list
|
| 1615 | #:imported-modules (append %cmake-build-system-modules
|
| 1616 | %pyproject-build-system-modules)
|
| 1617 | #:modules '((guix build cmake-build-system)
|
| 1618 | (guix build utils)
|
| 1619 | ((guix build pyproject-build-system) #:prefix py:))
|
| 1620 | #:configure-flags
|
| 1621 | #~(list "-DRDK_BUILD_AVALON_SUPPORT=ON"
|
| 1622 | "-DRDK_BUILD_CAIRO_SUPPORT=ON"
|
| 1623 | "-DRDK_BUILD_FREESASA_SUPPORT=ON"
|
| 1624 | "-DRDK_BUILD_INCHI_SUPPORT=ON"
|
| 1625 | "-DRDK_BUILD_YAEHMOP_SUPPORT=ON"
|
| 1626 | (string-append "-DCATCH_DIR="
|
| 1627 | (search-input-directory %build-inputs
|
| 1628 | "/include/catch2"))
|
| 1629 | "-DRDK_INSTALL_INTREE=OFF"
|
| 1630 | "-DRDK_INSTALL_STATIC_LIBS=OFF"
|
| 1631 | (string-append
|
| 1632 | "-DRDK_OPTIMIZE_POPCNT="
|
| 1633 | #$(let ((system (or (%current-target-system)
|
| 1634 | (%current-system))))
|
| 1635 | (cond
|
| 1636 | ((string-prefix? "x86_64" system) "ON")
|
| 1637 | ((string-prefix? "i686" system) "ON")
|
| 1638 | (else "OFF"))))
|
| 1639 | "-DRDK_USE_FLEXBISON=ON"
|
| 1640 | (string-append
|
| 1641 | "-DCMAKE_INCLUDE_PATH="
|
| 1642 | (search-input-directory %build-inputs "/include/avalontoolkit")))
|
| 1643 | #:phases
|
| 1644 | #~(modify-phases %standard-phases
|
| 1645 | (add-after 'unpack 'copy-external-dependencies
|
| 1646 | (lambda _
|
| 1647 | (symlink
|
| 1648 | (string-append
|
| 1649 | (search-input-file
|
| 1650 | %build-inputs "/share/fonts/truetype/ComicNeue-Regular.ttf"))
|
| 1651 | "Data/Fonts/ComicNeue-Regular.ttf")))
|
| 1652 | (add-after 'unpack 'fix-inchi-include
|
| 1653 | (lambda _
|
| 1654 | (substitute* "Code/cmake/Modules/FindInchi.cmake"
|
| 1655 | (("inchi_api.h.*\\)") "inchi/inchi_api.h)")
|
| 1656 | (("INCHI_LIBRARY NAMES.*\\)")
|
| 1657 | "INCHI_LIBRARY NAMES inchi PATH_SUFFIXES inchi)")
|
| 1658 | (("find_library" prev)
|
| 1659 | (string-append
|
| 1660 | "list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .so.1)\n"
|
| 1661 | prev)))
|
| 1662 | (substitute* "External/INCHI-API/inchi.cpp"
|
| 1663 | (("<inchi_api.h>") "<inchi/inchi_api.h>"))))
|
| 1664 | (add-before 'build 'enable-bytecode-determinism
|
| 1665 | (assoc-ref py:%standard-phases 'enable-bytecode-determinism))
|
| 1666 | (add-after 'install 'pre-check
|
| 1667 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 1668 | (with-directory-excursion "../source"
|
| 1669 | (invoke "sqlite3" "Data/RDData.sqlt"
|
| 1670 | ".read rdkit/Dbase/test_data/RDData.sqlite")
|
| 1671 | (invoke "sqlite3" "Data/RDTests.sqlt"
|
| 1672 | ".read rdkit/Dbase/test_data/RDTests.sqlite")
|
| 1673 | (setenv "RDBASE" (canonicalize-path ".")))))
|
| 1674 | (add-after 'install 'add-install-to-pythonpath
|
| 1675 | (assoc-ref py:%standard-phases 'add-install-to-pythonpath))
|
| 1676 | (delete 'check)
|
| 1677 | (add-after 'pre-check 'check
|
| 1678 | (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
|
| 1679 | (when tests?
|
| 1680 | (let ((job-count (number->string
|
| 1681 | (if parallel-tests? (parallel-job-count) 1))))
|
| 1682 | (invoke
|
| 1683 | "ctest" "-j" job-count
|
| 1684 | "-E" (string-append
|
| 1685 | "("
|
| 1686 | (string-join
|
| 1687 | '("moldraw2DTestCatch"
|
| 1688 | |
| 1689 | "pyDiscreteValueVect" "pySparseIntVect"
|
| 1690 | "graphmoltestPickler" "pyPartialCharges"
|
| 1691 | "substructLibraryTest" "pyFeatures"
|
| 1692 | "pythonTestDirML" "pythonTestDirChem"
|
| 1693 | "pyRealValueVect" "pyDiscreteValueVect"
|
| 1694 | "pickleTestsCatch"
|
| 1695 | |
| 1696 | "pyRanker"
|
| 1697 | |
| 1698 | "testConrec"
|
| 1699 | |
| 1700 | "pySynthonSpaceSearch"
|
| 1701 | |
| 1702 | "pythonSourceTests"
|
| 1703 | ) "|")
|
| 1704 | ")")))))))))
|
| 1705 | (inputs
|
| 1706 | (list avalon-toolkit
|
| 1707 | cairo
|
| 1708 | coordgenlibs
|
| 1709 | font-comic-neue
|
| 1710 | freetype
|
| 1711 | inchi
|
| 1712 | maeparser
|
| 1713 | pubchem-align3d
|
| 1714 | python
|
| 1715 | ringdecomposerlib
|
| 1716 | sqlite
|
| 1717 | yaehmop))
|
| 1718 | (native-inputs
|
| 1719 | (list bison
|
| 1720 | boost-numpy
|
| 1721 | catch2
|
| 1722 | eigen
|
| 1723 | flex
|
| 1724 | freesasa
|
| 1725 | pkg-config
|
| 1726 | python-pytest
|
| 1727 | rapidjson
|
| 1728 | tar))
|
| 1729 | (propagated-inputs
|
| 1730 | (list python-numpy-1 python-cairocffi python-pillow))
|
| 1731 | (home-page "https://rdkit.org/")
|
| 1732 | (synopsis "Collection of cheminformatics software")
|
| 1733 | (description "RDKit is a C++ and Python library for cheminformatics, which
|
| 1734 | includes (among other things) the analysis and modification of molecules in 2D
|
| 1735 | and 3D and descriptor generation for machine learning.")
|
| 1736 | |
| 1737 | |
| 1738 | |
| 1739 | (supported-systems %64bit-supported-systems)
|
| 1740 | (license license:bsd-3)))
|
| 1741 |
|
| 1742 | (define-public xcfun
|
| 1743 | (package
|
| 1744 | (name "xcfun")
|
| 1745 | (version "2.1.1")
|
| 1746 | (source
|
| 1747 | (origin
|
| 1748 | (method git-fetch)
|
| 1749 | (uri (git-reference
|
| 1750 | (url "https://github.com/dftlibs/xcfun")
|
| 1751 | (commit (string-append "v" version))))
|
| 1752 | (file-name (git-file-name name version))
|
| 1753 | (sha256
|
| 1754 | (base32 "1bj70cnhbh6ziy02x988wwl7cbwaq17ld7qwhswqkgnnx8rpgxid"))
|
| 1755 | (modules '((guix build utils)))
|
| 1756 | (snippet
|
| 1757 | '(begin
|
| 1758 | |
| 1759 | (delete-file-recursively "external")
|
| 1760 | (delete-file-recursively "cmake/autocmake")
|
| 1761 | (delete-file-recursively "cmake/downloaded")
|
| 1762 | (delete-file-recursively "CMakeLists.txt")
|
| 1763 | (delete-file "cmake/update.py")))))
|
| 1764 | (build-system cmake-build-system)
|
| 1765 | (arguments
|
| 1766 | (list
|
| 1767 | #:phases
|
| 1768 | #~(modify-phases %standard-phases
|
| 1769 | (add-after 'unpack 'generate-cmake-file
|
| 1770 | (lambda _
|
| 1771 | (let ((autocmake-path
|
| 1772 | #$(this-package-native-input "autocmake-src")))
|
| 1773 | (with-directory-excursion "cmake"
|
| 1774 | (substitute* "autocmake.yml"
|
| 1775 | (("^url_root:.*")
|
| 1776 | (string-append "url_root: "
|
| 1777 | (string-append autocmake-path "/") "\n")))
|
| 1778 | (invoke "python3"
|
| 1779 | (string-append autocmake-path "/update.py") "..")))))
|
| 1780 | (add-after 'generate-cmake-file 'set-libtaylor-path
|
| 1781 | (lambda _
|
| 1782 | (substitute* "src/CMakeLists.txt"
|
| 1783 | (("\\$\\{PROJECT_SOURCE_DIR\\}/external/upstream/taylor")
|
| 1784 | (string-append #$(this-package-native-input "libtaylor")
|
| 1785 | "/include/taylor"))))))))
|
| 1786 | (native-inputs
|
| 1787 | `(("libtaylor" ,libtaylor)
|
| 1788 | |
| 1789 | |
| 1790 | |
| 1791 | ("autocmake-src"
|
| 1792 | ,(let* ((commit "77a1f851f08af1cbe0d95fd7dba4a16a14264412")
|
| 1793 | (revision "0")
|
| 1794 | (version (git-version "1.0.0" revision commit)))
|
| 1795 | (origin
|
| 1796 | (method git-fetch)
|
| 1797 | (uri (git-reference
|
| 1798 | (url "https://github.com/dev-cafe/autocmake")
|
| 1799 | (commit commit)))
|
| 1800 | (file-name (git-file-name "autocmake" version))
|
| 1801 | (modules '((guix build utils)))
|
| 1802 | (snippet
|
| 1803 | '(begin
|
| 1804 | (delete-file-recursively "autocmake/external")))
|
| 1805 | (sha256
|
| 1806 | (base32
|
| 1807 | "0rq5hyaj6c3yv4357a2p317cqv22gngw5085aansii69h063d0a4")))))
|
| 1808 | ("python" ,python)
|
| 1809 | ("python-pyyaml" ,python-pyyaml)))
|
| 1810 | (home-page "https://github.com/dftlibs/xcfun")
|
| 1811 | (synopsis
|
| 1812 | "Library of exchange-correlation functionals with automatic differentiation")
|
| 1813 | (description
|
| 1814 | "@code{XCFun} is a library of exchange-correlation functionals with
|
| 1815 | arbitrary-order derivatives for density functional theory.")
|
| 1816 | (license license:mpl2.0)))
|
| 1817 |
|
| 1818 | |
| 1819 | |
| 1820 | |
| 1821 | |