diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/science/chemistry')
9 files changed, 112 insertions, 29 deletions
diff --git a/nixpkgs/pkgs/applications/science/chemistry/apbs/default.nix b/nixpkgs/pkgs/applications/science/chemistry/apbs/default.nix index 2a892dd56253..f4a2bab4243d 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/apbs/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/apbs/default.nix @@ -65,6 +65,10 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace CMakeLists.txt \ --replace "include(ImportFETK)" "" \ --replace 'import_fetk(''${FETK_VERSION})' "" + + # U was removed in python 3.11 because it had no effect + substituteInPlace tools/manip/inputgen.py \ + --replace '"rU"' '"r"' ''; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/applications/science/chemistry/cp2k/default.nix b/nixpkgs/pkgs/applications/science/chemistry/cp2k/default.nix index 29b983cde536..bb306fa322fe 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/cp2k/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/cp2k/default.nix @@ -1,15 +1,53 @@ -{ lib, stdenv, fetchFromGitHub, mpiCheckPhaseHook, python3, gfortran, blas, lapack -, fftw, libint, libvori, libxc, mpi, gsl, scalapack, openssh, makeWrapper -, libxsmm, spglib, which, pkg-config, plumed, zlib +{ lib +, stdenv +, fetchFromGitHub +, mpiCheckPhaseHook +, python3 +, gfortran +, blas +, lapack +, fftw +, libint +, libvori +, libxc +, mpi +, gsl +, scalapack +, openssh +, makeWrapper +, libxsmm +, spglib +, which +, pkg-config +, plumed +, zlib +, hdf5-fortran +, sirius +, libvdwxc +, spla +, spfft , enableElpa ? false , elpa -} : +, gpuBackend ? "none" +, cudaPackages +# gpuVersion needs to be set for both CUDA as well as ROCM hardware. +# gpuArch is only required for the ROCM stack. +# Change to a value suitable for your target GPU. +# For AMD values see https://github.com/cp2k/cp2k/blob/master/INSTALL.md#2v-rocmhip-support-for-amd-gpu +# and for Nvidia see https://github.com/cp2k/cp2k/blob/master/INSTALL.md#2i-cuda-optional-improved-performance-on-gpu-systems +, gpuVersion ? "Mi100" +, gpuArch ? "gfx908" +, rocmPackages +}: + +assert builtins.elem gpuBackend [ "none" "cuda" "rocm" ]; let cp2kVersion = "psmp"; arch = "Linux-x86-64-gfortran"; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "cp2k"; version = "2023.2"; @@ -36,7 +74,22 @@ in stdenv.mkDerivation rec { lapack plumed zlib - ] ++ lib.optional enableElpa elpa; + hdf5-fortran + sirius + spla + spfft + libvdwxc + ] + ++ lib.optional enableElpa elpa + ++ lib.optional (gpuBackend == "cuda") cudaPackages.cudatoolkit + ++ lib.optional (gpuBackend == "rocm") [ + rocmPackages.clr + rocmPackages.rocm-core + rocmPackages.hipblas + rocmPackages.hipfft + rocmPackages.rocblas + ] + ; propagatedBuildInputs = [ mpi ]; propagatedUserEnvPkgs = [ mpi ]; @@ -46,7 +99,7 @@ in stdenv.mkDerivation rec { "VERSION=${cp2kVersion}" ]; - doCheck = true; + doCheck = gpuBackend == "none"; enableParallelBuilding = true; @@ -64,25 +117,46 @@ in stdenv.mkDerivation rec { FC = mpif90 LD = mpif90 AR = ar -r + ${lib.strings.optionalString (gpuBackend == "cuda") '' + OFFLOAD_CC = nvcc + OFFLOAD_FLAGS = -O3 -g -w --std=c++11 + OFFLOAD_TARGET = cuda + GPUVER = ${gpuVersion} + CXX = mpicxx + CXXFLAGS = -std=c++11 -fopenmp + ''} + ${lib.strings.optionalString (gpuBackend == "rocm") '' + GPUVER = ${gpuVersion} + OFFLOAD_CC = hipcc + OFFLOAD_FLAGS = -fopenmp -m64 -pthread -fPIC -D__GRID_HIP -O2 --offload-arch=${gpuArch} --rocm-path=${rocmPackages.rocm-core} + OFFLOAD_TARGET = hip + CXX = mpicxx + CXXFLAGS = -std=c++11 -fopenmp -D__HIP_PLATFORM_AMD__ + ''} DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__parallel -D__SCALAPACK \ -D__MPI_VERSION=3 -D__F2008 -D__LIBXSMM -D__SPGLIB \ -D__MAX_CONTR=4 -D__LIBVORI ${lib.optionalString enableElpa "-D__ELPA"} \ - -D__PLUMED2 - CFLAGS = -fopenmp + -D__PLUMED2 -D__HDF5 -D__GSL -D__SIRIUS -D__LIBVDWXC -D__SPFFT -D__SPLA \ + ${lib.strings.optionalString (gpuBackend == "cuda") "-D__OFFLOAD_CUDA -D__DBCSR_ACC"} \ + ${lib.strings.optionalString (gpuBackend == "rocm") "-D__OFFLOAD_HIP -D__DBCSR_ACC -D__NO_OFFLOAD_PW"} + CFLAGS = -fopenmp -I${lib.getDev hdf5-fortran}/include -I${lib.getDev gsl}/include FCFLAGS = \$(DFLAGS) -O2 -ffree-form -ffree-line-length-none \ -ftree-vectorize -funroll-loops -msse2 \ -std=f2008 \ -fopenmp -ftree-vectorize -funroll-loops \ - -I${libxc}/include -I${libxsmm}/include \ - -I${libint}/include ${lib.optionalString enableElpa "$(pkg-config --variable=fcflags elpa)"} + -I${lib.getDev libint}/include ${lib.optionalString enableElpa "$(pkg-config --variable=fcflags elpa)"} \ + -I${lib.getDev sirius}/include/sirius \ + -I${lib.getDev libxc}/include -I${lib.getDev libxsmm}/include LIBS = -lfftw3 -lfftw3_threads \ -lscalapack -lblas -llapack \ -lxcf03 -lxc -lxsmmf -lxsmm -lsymspg \ -lint2 -lstdc++ -lvori \ -lgomp -lpthread -lm \ -fopenmp ${lib.optionalString enableElpa "$(pkg-config --libs elpa)"} \ - -lz -ldl -lstdc++ ${lib.optionalString (mpi.pname == "openmpi") "$(mpicxx --showme:link)"} \ - -lplumed + -lz -ldl ${lib.optionalString (mpi.pname == "openmpi") "$(mpicxx --showme:link)"} \ + -lplumed -lhdf5_fortran -lhdf5_hl -lhdf5 -lgsl -lsirius -lspla -lspfft -lvdwxc \ + ${lib.strings.optionalString (gpuBackend == "cuda") "-lcudart -lnvrtc -lcuda -lcublas"} \ + ${lib.strings.optionalString (gpuBackend == "rocm") "-lamdhip64 -lhipfft -lhipblas -lrocblas"} LDFLAGS = \$(FCFLAGS) \$(LIBS) include ${plumed}/lib/plumed/src/lib/Plumed.inc EOF @@ -106,6 +180,7 @@ in stdenv.mkDerivation rec { mkdir -p $out/bin $out/share/cp2k cp exe/${arch}/* $out/bin + rm $out/bin/*_unittest.* for i in cp2k cp2k_shell graph; do wrapProgram $out/bin/$i.${cp2kVersion} \ diff --git a/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix b/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix index e5807c6c108b..d6d371bf5054 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix @@ -21,10 +21,10 @@ in stdenv.mkDerivation rec { pname = "gwyddion"; - version = "2.61"; + version = "2.63"; src = fetchurl { url = "mirror://sourceforge/gwyddion/gwyddion-${version}.tar.xz"; - sha256 = "sha256-rDhYVMDTH9mSu90HZAX8ap4HF//8fYhW/ozzJdIrUgo="; + sha256 = "sha256-FSs/Dbnr1shEw/W51DhUFPb61tM+0atc6wxY81EiTdM="; }; nativeBuildInputs = [ pkg-config file ]; diff --git a/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix b/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix index 5745b87a777b..f80085278e0a 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix @@ -25,14 +25,14 @@ let }; in stdenv.mkDerivation rec { - version = "16.1.39"; + version = "16.1.41"; pname = "jmol"; src = let baseVersion = "${lib.versions.major version}.${lib.versions.minor version}"; in fetchurl { url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz"; - hash = "sha256-8M24VXMi7zHkTPNM5zd8nV4J0mXb3/MNIqqxfmlRt9M="; + hash = "sha256-91vPipS5FTqCl7BUSu47aApIfq2e8dD1SW/LEGQWWio="; }; patchPhase = '' diff --git a/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix b/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix index 0f4d76c3f26b..5f08bebd47fc 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix @@ -4,12 +4,12 @@ with lib; stdenv.mkDerivation rec { pname = "marvin"; - version = "23.4.0"; + version = "23.12.0"; src = fetchurl { name = "marvin-${version}.deb"; url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${versions.majorMinor version}.deb"; - sha256 = "sha256-+jzGcuAcbXOwsyAL+Hr9Fas2vO2S8ZKSaZeCf/bnl7A="; + hash = "sha256-5ycOteXcdgZaeDl3WQ95H2lD0OnnobCbmnVlfYwVdeI="; }; nativeBuildInputs = [ dpkg makeWrapper ]; diff --git a/nixpkgs/pkgs/applications/science/chemistry/mopac/default.nix b/nixpkgs/pkgs/applications/science/chemistry/mopac/default.nix index d2b2b558bb78..c0cdc4eff410 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/mopac/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/mopac/default.nix @@ -12,13 +12,13 @@ assert blas.isILP64 == lapack.isILP64; stdenv.mkDerivation rec { pname = "mopac"; - version = "22.0.6"; + version = "22.1.0"; src = fetchFromGitHub { owner = "openmopac"; repo = pname; rev = "v${version}"; - hash = "sha256-j4AP3tki+Ep9Pv+pDg8TwCiJvpF2j5npW3Kpat+7gGg="; + hash = "sha256-4jQ0WCHK07CXWUPj5Z1zSXObKxnitMj+FJQbLDiS2Dc="; }; nativeBuildInputs = [ gfortran cmake ]; diff --git a/nixpkgs/pkgs/applications/science/chemistry/nwchem/default.nix b/nixpkgs/pkgs/applications/science/chemistry/nwchem/default.nix index 2a17be9f8a92..062c61fa5c9e 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/nwchem/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/nwchem/default.nix @@ -54,13 +54,13 @@ let in stdenv.mkDerivation rec { pname = "nwchem"; - version = "7.2.0"; + version = "7.2.1"; src = fetchFromGitHub { owner = "nwchemgit"; repo = "nwchem"; rev = "v${version}-release"; - hash = "sha256-/biwHOSMGpdnYRGrGlDounKKLVaG2XkBgCmpE0IKR/Y="; + hash = "sha256-nnNTZ+c7VVGAqwOBMkBlW3rImNjs08Ne35XRkI3ssGo="; }; nativeBuildInputs = [ @@ -106,6 +106,9 @@ stdenv.mkDerivation rec { # Overwrite script, skipping the download echo -e '#!/bin/sh\n cd ga-${versionGA};autoreconf -ivf' > src/tools/get-tools-github + # /usr/bin/env bash fails in sandbox/Makefile setting + substituteInPlace src/config/makefile.h --replace '/usr/bin/env bash' "${stdenv.shell}" + patchShebangs ./ ''; @@ -169,7 +172,6 @@ stdenv.mkDerivation rec { cp -r $NWCHEM_TOP/src/data $out/share/nwchem/ cp -r $NWCHEM_TOP/src/basis/libraries $out/share/nwchem/data cp -r $NWCHEM_TOP/src/nwpw/libraryps $out/share/nwchem/data - cp -r $NWCHEM_TOP/QA $out/share/nwchem wrapProgram $out/bin/nwchem \ --set-default NWCHEM_BASIS_LIBRARY $out/share/nwchem/data/libraries/ @@ -196,7 +198,7 @@ stdenv.mkDerivation rec { runHook preInstallCheck # run a simple water test - mpirun -np 2 $out/bin/nwchem $out/share/nwchem/QA/tests/h2o/h2o.nw > h2o.out + mpirun -np 2 $out/bin/nwchem $NWCHEM_TOP/QA/tests/h2o/h2o.nw > h2o.out grep "Total SCF energy" h2o.out | grep 76.010538 runHook postInstallCheck diff --git a/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix b/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix index 695d5502b5eb..42cf5ddc9511 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix @@ -43,14 +43,14 @@ let in stdenv.mkDerivation { pname = "openmolcas"; - version = "23.06"; + version = "23.10"; src = fetchFromGitLab { owner = "Molcas"; repo = "OpenMolcas"; # The tag keeps moving, fix a hash instead - rev = "1cda3772686cbf99a4af695929a12d563c795ca2"; # 2023-06-12 - sha256 = "sha256-DLRQsRy2jt8V8q2sKmv2hLuKCuMihp/+zcMY/3sg1Fk="; + rev = "c74317e68572d1da82fdce4210b005c2c1b1de53"; # 2023-09-25 + hash = "sha256-wBrASZ6YFsWsu/TreEZ6Q+VxNQwCwMpyPC8AOqmNxos="; }; patches = [ @@ -104,7 +104,7 @@ stdenv.mkDerivation { "-DTOOLS=ON" "-DHDF5=ON" "-DFDE=ON" - "-DEXTERNAL_LIBXC=${libxc}" + "-DEXTERNAL_LIBXC=${lib.getDev libxc}" "-DDMRG=ON" "-DNEVPT2=ON" "-DCMAKE_SKIP_BUILD_RPATH=ON" diff --git a/nixpkgs/pkgs/applications/science/chemistry/wxmacmolplt/default.nix b/nixpkgs/pkgs/applications/science/chemistry/wxmacmolplt/default.nix index 4e8dbb6f0768..13bcf2d1dc66 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/wxmacmolplt/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/wxmacmolplt/default.nix @@ -29,6 +29,8 @@ stdenv.mkDerivation rec { xorg.libX11.dev ]; + configureFlags = [ "LDFLAGS=-lGL" ]; + enableParallelBuilding = true; meta = with lib; { |