aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
committerMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
commitc4625b175f8200f643fd6e11010932ea44c78433 (patch)
treebce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics
parent49f735974dd103039ddc4cb576bb76555164a9e7 (diff)
parentd661aa56a8843e991261510c1bb28fdc2f6975ae (diff)
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7 git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics/dl-poly-classic/default.nix37
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix66
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix67
3 files changed, 170 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics/dl-poly-classic/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics/dl-poly-classic/default.nix
new file mode 100644
index 000000000000..51978e95766d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics/dl-poly-classic/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl
+, gfortran, mpi
+}:
+
+stdenv.mkDerivation {
+ version = "1.10";
+ pname = "DL_POLY_Classic";
+
+ src = fetchurl {
+ url = "https://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/574/8924/dl_class_1.10.tar.gz";
+ sha256 = "1r76zvln3bwycxlmqday0sqzv5j260y7mdh66as2aqny6jzd5ld7";
+ };
+
+ buildInputs = [ mpi gfortran ];
+
+ configurePhase = ''
+ cd source
+ cp -v ../build/MakePAR Makefile
+ '';
+
+ buildPhase = ''
+ make dlpoly
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp -v ../execute/DLPOLY.X $out/bin
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "https://www.ccp5.ac.uk/DL_POLY_C";
+ description = "DL_POLY Classic is a general purpose molecular dynamics simulation package";
+ license = licenses.bsdOriginal;
+ platforms = [ "x86_64-linux" ];
+ maintainers = [ maintainers.costrouc ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
new file mode 100644
index 000000000000..151abb099f5b
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
@@ -0,0 +1,66 @@
+{ stdenv
+, fetchurl
+, cmake
+, singlePrec ? true
+, mpiEnabled ? false
+, fftw
+, openmpi
+, perl
+}:
+
+stdenv.mkDerivation {
+ name = "gromacs-2020.3";
+
+ src = fetchurl {
+ url = "ftp://ftp.gromacs.org/pub/gromacs/gromacs-2020.3.tar.gz";
+ sha256 = "1acjrhcfzpqy2dncblhj97602jbg9gdha4q1bgji9nrj25lq6cch";
+ };
+
+ nativeBuildInputs = [ cmake ];
+ buildInputs = [ fftw perl ]
+ ++ (stdenv.lib.optionals mpiEnabled [ openmpi ]);
+
+ cmakeFlags = (
+ if singlePrec then [
+ "-DGMX_DOUBLE=OFF"
+ ] else [
+ "-DGMX_DOUBLE=ON"
+ "-DGMX_DEFAULT_SUFFIX=OFF"
+ ]
+ ) ++ (
+ if mpiEnabled then [
+ "-DGMX_MPI:BOOL=TRUE"
+ "-DGMX_CPU_ACCELERATION:STRING=SSE4.1"
+ "-DGMX_OPENMP:BOOL=TRUE"
+ "-DGMX_THREAD_MPI:BOOL=FALSE"
+ ] else [
+ "-DGMX_MPI:BOOL=FALSE"
+ ]
+ );
+
+ meta = with stdenv.lib; {
+ homepage = "http://www.gromacs.org";
+ license = licenses.gpl2;
+ description = "Molecular dynamics software package";
+ longDescription = ''
+ GROMACS is a versatile package to perform molecular dynamics,
+ i.e. simulate the Newtonian equations of motion for systems
+ with hundreds to millions of particles.
+
+ It is primarily designed for biochemical molecules like
+ proteins, lipids and nucleic acids that have a lot of
+ complicated bonded interactions, but since GROMACS is
+ extremely fast at calculating the nonbonded interactions (that
+ usually dominate simulations) many groups are also using it
+ for research on non-biological systems, e.g. polymers.
+
+ GROMACS supports all the usual algorithms you expect from a
+ modern molecular dynamics implementation, (check the online
+ reference or manual for details), but there are also quite a
+ few features that make it stand out from the competition.
+
+ See: http://www.gromacs.org/About_Gromacs for details.
+ '';
+ platforms = platforms.unix;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix
new file mode 100644
index 000000000000..5dc31695c60d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix
@@ -0,0 +1,67 @@
+{ stdenv, fetchFromGitHub
+, libpng, gzip, fftw, blas, lapack
+, mpi ? null
+}:
+let packages = [
+ "asphere" "body" "class2" "colloid" "compress" "coreshell"
+ "dipole" "granular" "kspace" "manybody" "mc" "misc" "molecule"
+ "opt" "peri" "qeq" "replica" "rigid" "shock" "snap" "srd" "user-reaxc"
+ ];
+ lammps_includes = "-DLAMMPS_EXCEPTIONS -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64";
+ withMPI = (mpi != null);
+in
+stdenv.mkDerivation rec {
+ # LAMMPS has weird versioning converted to ISO 8601 format
+ version = "stable_22Aug2018";
+ pname = "lammps";
+
+ src = fetchFromGitHub {
+ owner = "lammps";
+ repo = "lammps";
+ rev = version;
+ sha256 = "1dlifm9wm1jcw2zwal3fnzzl41ng08c7v48w6hx2mz84zljg1nsj";
+ };
+
+ passthru = {
+ inherit mpi;
+ inherit packages;
+ };
+
+ buildInputs = [ fftw libpng blas lapack gzip ]
+ ++ (stdenv.lib.optionals withMPI [ mpi ]);
+
+ configurePhase = ''
+ cd src
+ for pack in ${stdenv.lib.concatStringsSep " " packages}; do make "yes-$pack" SHELL=$SHELL; done
+ '';
+
+ # Must do manual build due to LAMMPS requiring a seperate build for
+ # the libraries and executable. Also non-typical make script
+ buildPhase = ''
+ make mode=exe ${if withMPI then "mpi" else "serial"} SHELL=$SHELL LMP_INC="${lammps_includes}" FFT_PATH=-DFFT_FFTW3 FFT_LIB=-lfftw3 JPG_LIB=-lpng
+ make mode=shlib ${if withMPI then "mpi" else "serial"} SHELL=$SHELL LMP_INC="${lammps_includes}" FFT_PATH=-DFFT_FFTW3 FFT_LIB=-lfftw3 JPG_LIB=-lpng
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin $out/include $out/lib
+
+ cp -v lmp_* $out/bin/
+ cp -v *.h $out/include/
+ cp -v liblammps* $out/lib/
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Classical Molecular Dynamics simulation code";
+ longDescription = ''
+ LAMMPS is a classical molecular dynamics simulation code designed to
+ run efficiently on parallel computers. It was developed at Sandia
+ National Laboratories, a US Department of Energy facility, with
+ funding from the DOE. It is an open-source code, distributed freely
+ under the terms of the GNU Public License (GPL).
+ '';
+ homepage = "http://lammps.sandia.gov";
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ maintainers = [ maintainers.costrouc ];
+ };
+}