Merge pull request #221301 from sheepforce/plumed

plumed: init at 2.8.2
This commit is contained in:
markuskowa
2023-03-16 20:43:54 +01:00
committed by GitHub
3 changed files with 45 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub, python3, gfortran, blas, lapack
, fftw, libint, libvori, libxc, mpi, gsl, scalapack, openssh, makeWrapper
, libxsmm, spglib, which, pkg-config
, libxsmm, spglib, which, pkg-config, plumed, zlib
, enableElpa ? false
, elpa
} :
@@ -34,6 +34,8 @@ in stdenv.mkDerivation rec {
scalapack
blas
lapack
plumed
zlib
] ++ lib.optional enableElpa elpa;
propagatedBuildInputs = [ mpi ];
@@ -64,7 +66,8 @@ in stdenv.mkDerivation rec {
AR = ar -r
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__MAX_CONTR=4 -D__LIBVORI ${lib.optionalString enableElpa "-D__ELPA"} \
-D__PLUMED2
CFLAGS = -fopenmp
FCFLAGS = \$(DFLAGS) -O2 -ffree-form -ffree-line-length-none \
-ftree-vectorize -funroll-loops -msse2 \
@@ -77,8 +80,11 @@ in stdenv.mkDerivation rec {
-lxcf03 -lxc -lxsmmf -lxsmm -lsymspg \
-lint2 -lstdc++ -lvori \
-lgomp -lpthread -lm \
-fopenmp ${lib.optionalString enableElpa "$(pkg-config --libs elpa)"}
-fopenmp ${lib.optionalString enableElpa "$(pkg-config --libs elpa)"} \
-lz -ldl -lstdc++ ${lib.optionalString (mpi.pname == "openmpi") "$(mpicxx --showme:link)"} \
-lplumed
LDFLAGS = \$(FCFLAGS) \$(LIBS)
include ${plumed}/lib/plumed/src/lib/Plumed.inc
EOF
'';

View File

@@ -0,0 +1,34 @@
{ stdenv
, lib
, fetchFromGitHub
, blas
}:
assert !blas.isILP64;
stdenv.mkDerivation rec {
pname = "plumed";
version = "2.8.2";
src = fetchFromGitHub {
owner = "plumed";
repo = "plumed2";
rev = "v${version}";
hash = "sha256-ugYhJq8KFjT8rkAOX/yZ9IlEklXCwRxKH49REd2QN9E=";
};
postPatch = ''
patchShebangs .
'';
buildInputs = [ blas ];
enableParallelBuilding = true;
meta = with lib; {
description = "Molecular metadynamics library";
homepage = "https://github.com/plumed/plumed2";
license = licenses.lgpl3Only;
maintainers = [ maintainers.sheepforce ];
};
}

View File

@@ -24228,6 +24228,8 @@ with pkgs;
mail = callPackage ../development/libraries/gsignond/plugins/mail.nix { };
};
plumed = callPackage ../development/libraries/science/chemistry/plumed { };
### DEVELOPMENT / LIBRARIES / AGDA
agdaPackages = callPackage ./agda-packages.nix {