about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/molecular-dynamics
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/science/molecular-dynamics
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/science/molecular-dynamics')
-rw-r--r--nixpkgs/pkgs/applications/science/molecular-dynamics/dl-poly-classic/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix55
-rw-r--r--nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix67
3 files changed, 159 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/science/molecular-dynamics/dl-poly-classic/default.nix b/nixpkgs/pkgs/applications/science/molecular-dynamics/dl-poly-classic/default.nix
new file mode 100644
index 000000000000..1986f3b75ec1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/molecular-dynamics/dl-poly-classic/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl
+, gfortran, mpi
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.10";
+  name = "DL_POLY_Classic-${version}";
+
+  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/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
new file mode 100644
index 000000000000..5f7b15f82d23
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
@@ -0,0 +1,55 @@
+
+{ stdenv, fetchurl, cmake,
+  singlePrec ? true,
+  mpiEnabled ? false,
+  fftw,
+  openmpi
+}:
+
+
+stdenv.mkDerivation {
+  name = "gromacs-2018.4";
+
+  src = fetchurl {
+    url = "ftp://ftp.gromacs.org/pub/gromacs/gromacs-2018.4.tar.gz";
+    sha256 = "14d8mbck1lrmz97vvy322irk557wxh0zdd6n962lm69hqxcf8bkg";
+  };
+
+  buildInputs = [cmake fftw]
+  ++ (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/nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix b/nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix
new file mode 100644
index 000000000000..f4491053e4c8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix
@@ -0,0 +1,67 @@
+{ stdenv, fetchFromGitHub
+, libpng, gzip, fftw, openblas
+, 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";
+  name = "lammps-${version}";
+
+  src = fetchFromGitHub {
+    owner = "lammps";
+    repo = "lammps";
+    rev = "${version}";
+    sha256 = "1dlifm9wm1jcw2zwal3fnzzl41ng08c7v48w6hx2mz84zljg1nsj";
+  };
+
+  passthru = {
+    inherit mpi;
+    inherit packages;
+  };
+
+  buildInputs = [ fftw libpng openblas 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 ];
+  };
+}