about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/chemistry
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/chemistry')
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/avogadro/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/gwyddion/codegen.patch22
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix86
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix53
-rwxr-xr-xnixpkgs/pkgs/applications/science/chemistry/marvin/LicenseManager.desktop9
-rwxr-xr-xnixpkgs/pkgs/applications/science/chemistry/marvin/MarvinSketch.desktop10
-rwxr-xr-xnixpkgs/pkgs/applications/science/chemistry/marvin/MarvinView.desktop10
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix48
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/molden/default.nix44
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/molden/dont_register_file_types.patch29
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix50
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix85
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/pymol/default.nix57
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/quantum-espresso/default.nix43
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/siesta/default.nix69
15 files changed, 644 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/science/chemistry/avogadro/default.nix b/nixpkgs/pkgs/applications/science/chemistry/avogadro/default.nix
new file mode 100644
index 000000000000..96dea10333b3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/avogadro/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, cmake, qt4, zlib, eigen, openbabel, pkgconfig, libGLU, libGL, libX11, doxygen }:
+
+stdenv.mkDerivation rec {
+  name = "avogadro-1.1.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/avogadro/${name}.tar.bz2";
+    sha256 = "050ag9p4vg7jg8hj1wqfv7lsm6ar2isxjw2vw85s49vsl7g7nvzy";
+  };
+
+  buildInputs = [ qt4 eigen zlib openbabel libGL libGLU libX11 ];
+
+  nativeBuildInputs = [ cmake pkgconfig doxygen ];
+
+  NIX_CFLAGS_COMPILE = "-include ${libGLU.dev}/include/GL/glu.h";
+
+  patches = [
+    (fetchurl {
+      url = "https://data.gpo.zugaina.org/fusion809/sci-chemistry/avogadro/files/avogadro-1.1.0-xlibs.patch";
+      sha256 = "1p113v19z3zwr9gxj2k599f8p97a8rwm93pa4amqvd0snn31mw0k";
+    })
+  ];
+
+  meta = {
+    description = "Molecule editor and visualizer";
+    maintainers = [ ];
+    platforms = stdenv.lib.platforms.mesaPlatforms;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/chemistry/gwyddion/codegen.patch b/nixpkgs/pkgs/applications/science/chemistry/gwyddion/codegen.patch
new file mode 100644
index 000000000000..eb306d99f8a3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/gwyddion/codegen.patch
@@ -0,0 +1,22 @@
+--- gwyddion-2.55.orig/configure	2019-11-04 01:25:31.000000000 -0800
++++ gwyddion-2.55/configure	2020-03-20 18:49:43.860452655 -0700
+@@ -18560,7 +18560,7 @@
+ fi
+   if test "x$embed_pygtk" = xno; then
+     if test "x$PYGTK_CODEGENDIR" = 'x'; then
+-      PYGTK_CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygtk-2.0`
++      PYGTK_CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygobject-2.0`
+     fi
+   else
+     # Some silly OSes want to remove pygtk2.  We can build pygwy without
+--- gwyddion-2.55.orig/configure.ac	2019-11-04 01:25:16.000000000 -0800
++++ gwyddion-2.55/configure.ac	2020-03-20 18:52:55.042724547 -0700
+@@ -270,7 +270,7 @@
+                     [embed_pygtk=yes; pygwy_warn=" (embedded pygtk2)"])
+   if test "x$embed_pygtk" = xno; then
+     if test "x$PYGTK_CODEGENDIR" = 'x'; then
+-      PYGTK_CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygtk-2.0`
++      PYGTK_CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygobject-2.0`
+     fi
+   else
+     # Some silly OSes want to remove pygtk2.  We can build pygwy without
diff --git a/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix b/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix
new file mode 100644
index 000000000000..dec63910f709
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix
@@ -0,0 +1,86 @@
+{ stdenv, fetchurl, gtk2, pkg-config, fftw, file,
+  pythonSupport ? false, pythonPackages ? null,
+  gnome2 ? null,
+  openexrSupport ? true, openexr ? null,
+  libzipSupport ? true, libzip ? null,
+  libxml2Support ? true, libxml2 ? null,
+  libwebpSupport ? true, libwebp ? null,
+  # libXmu is not used if libunique is.
+  libXmuSupport ? false, xorg ? null,
+  libxsltSupport ? true, libxslt ? null,
+  fitsSupport ? true, cfitsio ? null,
+  zlibSupport ? true, zlib ? null,
+  libuniqueSupport ? true, libunique ? null,
+  libpngSupport ? true, libpng ? null,
+  openglSupport ? !stdenv.isDarwin
+}:
+
+assert openexrSupport -> openexr != null;
+assert libzipSupport -> libzip != null;
+assert libxml2Support -> libxml2 != null;
+assert libwebpSupport -> libwebp != null;
+assert libXmuSupport -> xorg != null;
+assert libxsltSupport -> libxslt != null;
+assert fitsSupport -> cfitsio != null;
+assert zlibSupport -> zlib != null;
+assert libuniqueSupport -> libunique != null;
+assert libpngSupport -> libpng != null;
+assert openglSupport -> gnome2 != null;
+assert pythonSupport -> (pythonPackages != null && gnome2 != null);
+
+let
+    inherit (pythonPackages) pygtk pygobject2 python;
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "gwyddion";
+   version = "2.55";
+  src = fetchurl {
+    url = "mirror://sourceforge/gwyddion/gwyddion-${version}.tar.xz";
+    sha256 = "0l00zszvginpriv12idc0y1x28qmicdmrwkqa007srkxvrdgxwdi";
+  };
+  
+  nativeBuildInputs = [ pkg-config file ];
+  
+  buildInputs = with stdenv.lib;
+    [ gtk2 fftw ] ++
+    optional openglSupport gnome2.gtkglext ++
+    optional openexrSupport openexr ++
+    optional libXmuSupport xorg.libXmu ++
+    optional fitsSupport cfitsio ++
+    optional libpngSupport libpng ++
+    optional libxsltSupport libxslt ++
+    optional libxml2Support libxml2 ++
+    optional libwebpSupport libwebp ++
+    optional zlibSupport zlib ++
+    optional libuniqueSupport libunique ++
+    optional libzipSupport libzip;
+
+  propagatedBuildInputs = with stdenv.lib;
+    optionals pythonSupport [ pygtk pygobject2 python gnome2.gtksourceview ];
+
+  # This patch corrects problems with python support, but should apply cleanly
+  # regardless of whether python support is enabled, and have no effects if
+  # it is disabled.
+  patches = [ ./codegen.patch ];
+  meta = {
+    homepage = "http://gwyddion.net/";
+
+    description = "Scanning probe microscopy data visualization and analysis";
+
+    longDescription = ''
+      A modular program for SPM (scanning probe microscopy) data
+      visualization and analysis. Primarily it is intended for the
+      analysis of height fields obtained by scanning probe microscopy
+      techniques (AFM, MFM, STM, SNOM/NSOM) and it supports a lot of
+      SPM data formats. However, it can be used for general height
+      field and (greyscale) image processing, for instance for the
+      analysis of profilometry data or thickness maps from imaging
+      spectrophotometry.
+    '';
+    license = stdenv.lib.licenses.gpl2;
+    platforms = with stdenv.lib.platforms; linux ++ darwin;
+    maintainers = [ stdenv.lib.maintainers.cge ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix b/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix
new file mode 100644
index 000000000000..f52621dd71af
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix
@@ -0,0 +1,53 @@
+{ stdenv
+, lib
+, fetchurl
+, unzip
+, makeDesktopItem
+, jre
+}:
+
+let
+  desktopItem = makeDesktopItem {
+    name = "jmol";
+    exec = "jmol";
+    desktopName = "JMol";
+    genericName = "Molecular Modeler";
+    mimeType = "chemical/x-pdb;chemical/x-mdl-molfile;chemical/x-mol2;chemical/seq-aa-fasta;chemical/seq-na-fasta;chemical/x-xyz;chemical/x-mdl-sdf;";
+    categories = "Graphics;Education;Science;Chemistry;";
+  };
+in
+stdenv.mkDerivation rec {
+  version = "14.30.2";
+  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";
+    sha256 = "0f9sxhxyqrd1vvmq566v1zpzzlci37pm9j7alzak766x5dg5yyz1";
+  };
+
+  patchPhase = ''
+    sed -i -e "4s:.*:command=${jre}/bin/java:" -e "10s:.*:jarpath=$out/share/jmol/Jmol.jar:" -e "11,21d" jmol
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/share/jmol" "$out/bin"
+
+    ${unzip}/bin/unzip jsmol.zip -d "$out/share/"
+
+    cp *.jar jmol.sh "$out/share/jmol"
+    cp -r ${desktopItem}/share/applications $out/share
+    cp jmol $out/bin
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+     description = "A Java 3D viewer for chemical structures";
+     homepage = "https://sourceforge.net/projects/jmol";
+     license = licenses.lgpl2;
+     platforms = platforms.all;
+     maintainers = with maintainers; [ timokau mounium ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/chemistry/marvin/LicenseManager.desktop b/nixpkgs/pkgs/applications/science/chemistry/marvin/LicenseManager.desktop
new file mode 100755
index 000000000000..90b8ed7d20a5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/marvin/LicenseManager.desktop
@@ -0,0 +1,9 @@
+#!/usr/bin/env xdg-open
+[Desktop Entry]
+Type=Application
+Name=ChemAxon License Manager
+Exec=@out@/bin/LicenseManager
+Icon=LicenseManager
+Categories=Education;Science;Chemistry;
+StartupWMClass=com-install4j-runtime-launcher-UnixLauncher
+Comment=License manager for ChemAxon software like MarvinSketch
diff --git a/nixpkgs/pkgs/applications/science/chemistry/marvin/MarvinSketch.desktop b/nixpkgs/pkgs/applications/science/chemistry/marvin/MarvinSketch.desktop
new file mode 100755
index 000000000000..d6e0343a78c3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/marvin/MarvinSketch.desktop
@@ -0,0 +1,10 @@
+#!/usr/bin/env xdg-open
+[Desktop Entry]
+Type=Application
+Name=MarvinSketch
+Exec=@out@/bin/msketch %f
+Icon=MarvinSketch
+MimeType=text/xml;text/plain;chemical/x-cml;chemical/x-mdl-molfile;chemical/x-mdl-sdfile;chemical/x-mol2;chemical/x-pdb;chemical/x-xyz;chemical/x-mdl-rdfile;chemical/x-mdl-rxnfile;chemical/x-inchi;
+Categories=Education;Science;Chemistry;
+StartupWMClass=com-install4j-runtime-launcher-UnixLauncher
+Comment=Molecular modelling, analysis and structure drawing program
diff --git a/nixpkgs/pkgs/applications/science/chemistry/marvin/MarvinView.desktop b/nixpkgs/pkgs/applications/science/chemistry/marvin/MarvinView.desktop
new file mode 100755
index 000000000000..07a3c3c7cf33
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/marvin/MarvinView.desktop
@@ -0,0 +1,10 @@
+#!/usr/bin/env xdg-open
+[Desktop Entry]
+Type=Application
+Name=MarvinView
+Exec=@out@/bin/mview %f
+Icon=MarvinView
+Comment=Molecule viewing program
+MimeType=text/xml;text/plain;chemical/x-cml;chemical/x-mdl-molfile;chemical/x-mdl-sdfile;chemical/x-mol2;chemical/x-pdb;chemical/x-xyz;chemical/x-mdl-rdfile;chemical/x-mdl-rxnfile;chemical/x-inchi;
+Categories=Education;Science;Chemistry;
+StartupWMClass=com-install4j-runtime-launcher-UnixLauncher
diff --git a/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix b/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix
new file mode 100644
index 000000000000..c54fb3444bb0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchurl, dpkg, makeWrapper, coreutils, gawk, gnugrep, gnused, jre }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  pname = "marvin";
+  version = "20.9.0";
+
+  src = fetchurl {
+    name = "marvin-${version}.deb";
+    url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${versions.majorMinor version}.deb";
+    sha256 = "1c6q1vb96jsb37g5qbhzcnasd5pdqjyc190yg3caw3gwrd97889q";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper ];
+
+  unpackPhase = ''
+    dpkg-deb -x $src opt
+  '';
+
+  installPhase = ''
+    wrapBin() {
+      makeWrapper $1 $out/bin/$(basename $1) \
+        --set INSTALL4J_JAVA_HOME "${jre}" \
+        --prefix PATH : ${makeBinPath [ coreutils gawk gnugrep gnused ]}
+    }
+    cp -r opt $out
+    mkdir -p $out/bin $out/share/pixmaps $out/share/applications
+    for name in LicenseManager MarvinSketch MarvinView; do
+      wrapBin $out/opt/chemaxon/marvinsuite/$name
+      ln -s {$out/opt/chemaxon/marvinsuite/.install4j,$out/share/pixmaps}/$name.png
+    done
+    for name in cxcalc cxtrain evaluate molconvert mview msketch; do
+      wrapBin $out/opt/chemaxon/marvinsuite/bin/$name
+    done
+    ${concatStrings (map (name: ''
+      substitute ${./. + "/${name}.desktop"} $out/share/applications/${name}.desktop --subst-var out
+    '') [ "LicenseManager" "MarvinSketch" "MarvinView" ])}
+  '';
+
+  meta = {
+    description = "A chemical modelling, analysis and structure drawing program";
+    homepage = "https://chemaxon.com/products/marvin";
+    maintainers = with maintainers; [ fusion809 ];
+    license = licenses.unfree;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/chemistry/molden/default.nix b/nixpkgs/pkgs/applications/science/chemistry/molden/default.nix
new file mode 100644
index 000000000000..5e5df85a5279
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/molden/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchurl, which, gfortran, libGLU, xorg } :
+
+stdenv.mkDerivation rec {
+  version = "6.2";
+  pname = "molden";
+
+  src = fetchurl {
+    url = "ftp://ftp.cmbi.ru.nl/pub/molgraph/molden/molden${version}.tar.gz";
+    sha256 = "01m5p7v5pz1fi77var50sp1bzlvdckwr6kn4wanvic2jmvgp9q5n";
+  };
+
+  nativeBuildInputs = [ which ];
+  buildInputs = [ gfortran libGLU xorg.libX11 xorg.libXmu ];
+
+  patches = [ ./dont_register_file_types.patch ];
+
+  postPatch = ''
+     substituteInPlace ./makefile --replace '-L/usr/X11R6/lib'  "" \
+                                  --replace '-I/usr/X11R6/include' "" \
+                                  --replace '/usr/local/' $out/ \
+                                  --replace 'sudo' "" \
+				                          --replace '-C surf depend' '-C surf'
+     sed -in '/^# DO NOT DELETE THIS LINE/q;' surf/Makefile
+  '';
+
+  preInstall = ''
+     mkdir -p $out/bin
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+     description = "Display and manipulate molecular structures";
+     homepage = "http://www.cmbi.ru.nl/molden/";
+     license = {
+       fullName = "Free for academic/non-profit use";
+       url = "http://www.cmbi.ru.nl/molden/CopyRight.html";
+       free = false;
+     };
+     platforms = platforms.linux;
+     maintainers = with maintainers; [ markuskowa ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/science/chemistry/molden/dont_register_file_types.patch b/nixpkgs/pkgs/applications/science/chemistry/molden/dont_register_file_types.patch
new file mode 100644
index 000000000000..75ce593ed29a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/molden/dont_register_file_types.patch
@@ -0,0 +1,29 @@
+diff --git a/makefile b/makefile
+index 58a9e74..64615b6 100644
+--- a/makefile
++++ b/makefile
+@@ -32,8 +32,6 @@ os :=
+ ifeq ($(uname), Linux)
+  os := $(shell head -n 1 /etc/issue | cut -d" " -f1)
+  ifeq ($(os), Ubuntu)
+-    EXTEN = exten
+-    EXTENZ = exten2
+     LIBSG = -L/usr/X11R6/lib -lGLU -lGL -lX11 -lm
+  endif
+  ifeq ($(os), Debian)
+@@ -278,7 +276,7 @@ LIBSOGL = -lglut -lGLU -lGL -lXmu -lX11 -lm
+ #
+ #LIBSG = -L/usr/X11R6/lib -Wl,-framework -Wl,GLUT -Wl,-framework -Wl,OpenGL -Wl,-framework -Wl,Cocoa -lGLU -lGL -lXmu -lX11 -lm
+ 
+-all:	molden gmolden ambfor/ambfor ambfor/ambmd surf/surf $(EXTEN)
++all:	molden gmolden ambfor/ambfor ambfor/ambmd surf/surf
+ xwin.o:	xwin.c rots.h
+ xwingl.o:	xwin.c rots.h
+ 
+@@ -344,5 +342,5 @@ exten:
+ exten2:
+ 	./register_extension.sh /usr/local/bin
+ 
+-install:	$(EXTENZ)
++install:
+ 	sudo install -t /usr/local/bin -m 755 molden gmolden ambfor/ambfor ambfor/ambmd surf/surf
diff --git a/nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix b/nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix
new file mode 100644
index 000000000000..f30954367cf7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchFromGitLab, symlinkJoin, gfortran, perl, procps
+, libyaml, libxc, fftw, blas, lapack, gsl, netcdf, arpack, autoreconfHook
+}:
+
+assert (!blas.is64bit) && (!lapack.is64bit);
+
+stdenv.mkDerivation rec {
+  pname = "octopus";
+  version = "9.2";
+
+  src = fetchFromGitLab {
+    owner = "octopus-code";
+    repo = "octopus";
+    rev = version;
+    sha256 = "083z51sjv70asr04rv53wb9gf4396nblq1zl22qw7jdr28hji4is";
+  };
+
+  nativeBuildInputs = [ perl procps autoreconfHook ];
+  buildInputs = [ libyaml gfortran libxc blas lapack gsl fftw netcdf arpack ];
+
+  configureFlags = [
+    "--with-yaml-prefix=${libyaml}"
+    "--with-blas=-lblas"
+    "--with-lapack=-llapack"
+    "--with-fftw-prefix=${fftw.dev}"
+    "--with-gsl-prefix=${gsl}"
+    "--with-libxc-prefix=${libxc}"
+  ];
+
+  doCheck = false;
+  checkTarget = "check-short";
+
+  postPatch = ''
+    patchShebangs ./
+  '';
+
+  postConfigure = ''
+    patchShebangs testsuite/oct-run_testsuite.sh
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Real-space time dependent density-functional theory code";
+    homepage = "https://octopus-code.org";
+    maintainers = with maintainers; [ markuskowa ];
+    license = licenses.gpl2;
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix b/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix
new file mode 100644
index 000000000000..0d74e784d772
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix
@@ -0,0 +1,85 @@
+{ stdenv, fetchFromGitLab, cmake, gfortran, perl
+, openblas, blas, lapack, hdf5-cpp, python3, texlive
+, armadillo, openmpi, globalarrays, openssh
+, makeWrapper, fetchpatch
+} :
+
+assert blas.implementation == "openblas" && lapack.implementation == "openblas";
+
+let
+  version = "19.11";
+  gitLabRev = "v${version}";
+
+  python = python3.withPackages (ps : with ps; [ six pyparsing ]);
+
+in stdenv.mkDerivation {
+  pname = "openmolcas";
+  inherit version;
+
+  src = fetchFromGitLab {
+    owner = "Molcas";
+    repo = "OpenMolcas";
+    rev = gitLabRev;
+    sha256 = "1wwqhkyyi7pw5x1ghnp83ir17zl5jsj7phhqxapybyi3bmg0i00q";
+  };
+
+  patches = [ (fetchpatch {
+    name = "Fix-MPI-INT-size"; # upstream patch, fixes a Fortran compiler error
+    url = "https://gitlab.com/Molcas/OpenMolcas/commit/860e3350523f05ab18e49a428febac8a4297b6e4.patch";
+    sha256 = "0h96h5ikbi5l6ky41nkxmxfhjiykkiifq7vc2s3fdy1r1siv09sb";
+  }) (fetchpatch {
+    name = "fix-cisandbox"; # upstream patch, fixes a Fortran compiler error
+    url = "https://gitlab.com/Molcas/OpenMolcas/commit/d871590c8ce4689cd94cdbbc618954c65589393d.patch";
+    sha256 = "0dgz1w2rkglnis76spai3m51qa72j4bz6ppnk5zmzrr6ql7gwpgg";
+  })];
+
+  nativeBuildInputs = [ perl cmake texlive.combined.scheme-minimal makeWrapper ];
+  buildInputs = [
+    gfortran
+    openblas
+    hdf5-cpp
+    python
+    armadillo
+    openmpi
+    globalarrays
+    openssh
+  ];
+
+  enableParallelBuilding = true;
+
+  cmakeFlags = [
+    "-DOPENMP=ON"
+    "-DGA=ON"
+    "-DMPI=ON"
+    "-DLINALG=OpenBLAS"
+    "-DTOOLS=ON"
+    "-DHDF5=ON"
+    "-DFDE=ON"
+    "-DOPENBLASROOT=${openblas}"
+  ];
+
+  GAROOT=globalarrays;
+
+  postConfigure = ''
+    # The Makefile will install pymolcas during the build grrr.
+    mkdir -p $out/bin
+    export PATH=$PATH:$out/bin
+  '';
+
+  postFixup = ''
+    # Wrong store path in shebang (no Python pkgs), force re-patching
+    sed -i "1s:/.*:/usr/bin/env python:" $out/bin/pymolcas
+    patchShebangs $out/bin
+
+    wrapProgram $out/bin/pymolcas --set MOLCAS $out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Advanced quantum chemistry software package";
+    homepage = "https://gitlab.com/Molcas/OpenMolcas";
+    maintainers = [ maintainers.markuskowa ];
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/science/chemistry/pymol/default.nix b/nixpkgs/pkgs/applications/science/chemistry/pymol/default.nix
new file mode 100644
index 000000000000..474986901225
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/pymol/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv, fetchurl, fetchFromGitHub, makeDesktopItem
+, python3, python3Packages
+, glew, glm, freeglut, libpng, libxml2, tk, freetype, msgpack }:
+
+
+let
+  pname = "pymol";
+  description = "A Python-enhanced molecular graphics tool";
+
+  desktopItem = makeDesktopItem {
+    name = pname;
+    exec = pname;
+    desktopName = "PyMol Molecular Graphics System";
+    genericName = "Molecular Modeler";
+    comment = description;
+    icon = pname;
+    mimeType = "chemical/x-pdb;chemical/x-mdl-molfile;chemical/x-mol2;chemical/seq-aa-fasta;chemical/seq-na-fasta;chemical/x-xyz;chemical/x-mdl-sdf;";
+    categories = "Graphics;Education;Science;Chemistry;";
+  };
+in
+python3Packages.buildPythonApplication rec {
+  inherit pname;
+  version = "2.3.0";
+  src = fetchFromGitHub {
+    owner = "schrodinger";
+    repo = "pymol-open-source";
+    rev = "v${version}";
+    sha256 = "175cqi6gfmvv49i3ws19254m7ljs53fy6y82fm1ywshq2h2c93jh";
+  };
+
+  buildInputs = [ python3Packages.numpy glew glm freeglut libpng libxml2 tk freetype msgpack ];
+  NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2";
+  hardeningDisable = [ "format" ];
+
+  setupPyBuildFlags = [ "--glut" ];
+
+  installPhase = ''
+    python setup.py install --home="$out"
+    runHook postInstall
+  '';
+
+  postInstall = with python3Packages; ''
+    wrapProgram $out/bin/pymol \
+      --prefix PYTHONPATH : ${lib.makeSearchPathOutput "lib" python3.sitePackages [ Pmw tkinter ]}
+
+    mkdir -p "$out/share/icons/"
+    ln -s ../../lib/python/pymol/pymol_path/data/pymol/icons/icon2.svg "$out/share/icons/pymol.svg"
+    cp -r "${desktopItem}/share/applications/" "$out/share/"
+  '';
+
+  meta = with lib; {
+    description = description;
+    homepage = "https://www.pymol.org/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ samlich ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/chemistry/quantum-espresso/default.nix b/nixpkgs/pkgs/applications/science/chemistry/quantum-espresso/default.nix
new file mode 100644
index 000000000000..2443e6b23aba
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/quantum-espresso/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl
+, gfortran, fftw, blas, lapack
+, mpi ? null
+}:
+
+stdenv.mkDerivation rec {
+  version = "6.5";
+  pname = "quantum-espresso";
+
+  src = fetchurl {
+    url = "https://gitlab.com/QEF/q-e/-/archive/qe-${version}/q-e-qe-${version}.tar.gz";
+    sha256 = "00nnsq1vq579xsmkvwrgs6bdqdcbdlsmcp4yfynnvs40ca52m2r5";
+  };
+
+  passthru = {
+    inherit mpi;
+  };
+
+  preConfigure = ''
+    patchShebangs configure
+  '';
+
+  buildInputs = [ fftw blas lapack gfortran ]
+    ++ (stdenv.lib.optionals (mpi != null) [ mpi ]);
+
+configureFlags = if (mpi != null) then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
+
+  makeFlags = [ "all" ];
+
+  meta = with stdenv.lib; {
+    description = "Electronic-structure calculations and materials modeling at the nanoscale";
+    longDescription = ''
+        Quantum ESPRESSO is an integrated suite of Open-Source computer codes for
+        electronic-structure calculations and materials modeling at the
+        nanoscale. It is based on density-functional theory, plane waves, and
+        pseudopotentials.
+      '';
+    homepage = "https://www.quantum-espresso.org/";
+    license = licenses.gpl2;
+    platforms = [ "x86_64-linux" ];
+    maintainers = [ maintainers.costrouc ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/chemistry/siesta/default.nix b/nixpkgs/pkgs/applications/science/chemistry/siesta/default.nix
new file mode 100644
index 000000000000..c053c0a09cdf
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/siesta/default.nix
@@ -0,0 +1,69 @@
+{ stdenv, fetchurl
+, gfortran, blas, lapack
+, mpi ? null, scalapack
+}:
+
+stdenv.mkDerivation {
+  version = "4.1-b3";
+  pname = "siesta";
+
+  src = fetchurl {
+    url = "https://launchpad.net/siesta/4.1/4.1-b3/+download/siesta-4.1-b3.tar.gz";
+    sha256 = "1450jsxj5aifa0b5fcg7mxxq242fvqnp4zxpgzgbkdp99vrp06gm";
+  };
+
+  passthru = {
+    inherit mpi;
+  };
+
+  buildInputs = [ blas lapack gfortran ]
+    ++ (stdenv.lib.optionals (mpi != null) [ mpi scalapack ]);
+
+  enableParallelBuilding = true;
+
+  # Must do manualy becuase siesta does not do the regular
+  # ./configure; make; make install
+  configurePhase = ''
+    cd Obj
+    sh ../Src/obj_setup.sh
+    cp gfortran.make arch.make
+  '';
+
+  preBuild = if (mpi != null) then ''
+    makeFlagsArray=(
+        CC="mpicc" FC="mpifort"
+        FPPFLAGS="-DMPI" MPI_INTERFACE="libmpi_f90.a" MPI_INCLUDE="."
+        COMP_LIBS="" LIBS="-lblas -llapack -lscalapack"
+    );
+  '' else ''
+    makeFlagsArray=(
+      COMP_LIBS="" LIBS="-lblas -llapack"
+    );
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -a siesta $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A first-principles materials simulation code using DFT";
+    longDescription = ''
+         SIESTA is both a method and its computer program
+         implementation, to perform efficient electronic structure
+         calculations and ab initio molecular dynamics simulations of
+         molecules and solids. SIESTA's efficiency stems from the use
+         of strictly localized basis sets and from the implementation
+         of linear-scaling algorithms which can be applied to suitable
+         systems. A very important feature of the code is that its
+         accuracy and cost can be tuned in a wide range, from quick
+         exploratory calculations to highly accurate simulations
+         matching the quality of other approaches, such as plane-wave
+         and all-electron methods.
+      '';
+    homepage = "https://www.quantum-espresso.org/";
+    license = licenses.gpl2;
+    platforms = [ "x86_64-linux" ];
+    maintainers = [ maintainers.costrouc ];
+  };
+}