diff options
Diffstat (limited to 'pkgs/development/libraries/science/chemistry')
7 files changed, 301 insertions, 0 deletions
diff --git a/pkgs/development/libraries/science/chemistry/dftd4/default.nix b/pkgs/development/libraries/science/chemistry/dftd4/default.nix new file mode 100644 index 000000000000..a099a14a8e63 --- /dev/null +++ b/pkgs/development/libraries/science/chemistry/dftd4/default.nix @@ -0,0 +1,47 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, gfortran +, blas +, lapack +, mctc-lib +, mstore +, multicharge +}: + +assert !blas.isILP64 && !lapack.isILP64; + +stdenv.mkDerivation rec { + pname = "dftd4"; + version = "3.5.0"; + + src = fetchFromGitHub { + owner = "dftd4"; + repo = pname; + rev = "v${version}"; + hash = "sha256-ZCoFbjTNQD7slq5sKwPRPkrHSHofsxU9C9h/bF5jmZI="; + }; + + nativeBuildInputs = [ cmake gfortran ]; + + buildInputs = [ blas lapack mctc-lib mstore multicharge ]; + + postInstall = '' + substituteInPlace $out/lib/pkgconfig/${pname}.pc \ + --replace "''${prefix}" "" + ''; + + doCheck = true; + preCheck = '' + export OMP_NUM_THREADS=2 + ''; + + meta = with lib; { + description = "Generally Applicable Atomic-Charge Dependent London Dispersion Correction"; + license = with licenses; [ lgpl3Plus gpl3Plus ]; + homepage = "https://github.com/grimme-lab/dftd4"; + platforms = platforms.linux; + maintainers = [ maintainers.sheepforce ]; + }; +} diff --git a/pkgs/development/libraries/science/chemistry/mctc-lib/default.nix b/pkgs/development/libraries/science/chemistry/mctc-lib/default.nix new file mode 100644 index 000000000000..e9be83970fbf --- /dev/null +++ b/pkgs/development/libraries/science/chemistry/mctc-lib/default.nix @@ -0,0 +1,39 @@ +{ stdenv +, lib +, fetchFromGitHub +, gfortran +, pkg-config +, json-fortran +, cmake +}: + +stdenv.mkDerivation rec { + pname = "mctc-lib"; + version = "0.3.1"; + + src = fetchFromGitHub { + owner = "grimme-lab"; + repo = pname; + rev = "v${version}"; + hash = "sha256-AXjg/ZsitdDf9fNoGVmVal1iZ4/sxjJb7A9W4yye/rg="; + }; + + nativeBuildInputs = [ gfortran pkg-config cmake ]; + + buildInputs = [ json-fortran ]; + + postInstall = '' + substituteInPlace $out/lib/pkgconfig/${pname}.pc \ + --replace "''${prefix}" "" + ''; + + doCheck = true; + + meta = with lib; { + description = "Modular computation tool chain library"; + homepage = "https://github.com/grimme-lab/mctc-lib"; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = [ maintainers.sheepforce ]; + }; +} diff --git a/pkgs/development/libraries/science/chemistry/mstore/default.nix b/pkgs/development/libraries/science/chemistry/mstore/default.nix new file mode 100644 index 000000000000..7fcdfbdf5492 --- /dev/null +++ b/pkgs/development/libraries/science/chemistry/mstore/default.nix @@ -0,0 +1,36 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, gfortran +, mctc-lib +}: + +stdenv.mkDerivation rec { + pname = "mstore"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "grimme-lab"; + repo = pname; + rev = "v${version}"; + hash = "sha256-dN2BulLS/ENRFVdJIrZRxgBV8S4d5+7BjTCGnhBbf4I="; + }; + + nativeBuildInputs = [ cmake gfortran ]; + + buildInputs = [ mctc-lib ]; + + postInstall = '' + substituteInPlace $out/lib/pkgconfig/${pname}.pc \ + --replace "''${prefix}" "" + ''; + + meta = with lib; { + description = "Molecular structure store for testing"; + license = licenses.asl20; + homepage = "https://github.com/grimme-lab/mstore"; + platforms = platforms.linux; + maintainers = [ maintainers.sheepforce ]; + }; +} diff --git a/pkgs/development/libraries/science/chemistry/multicharge/default.nix b/pkgs/development/libraries/science/chemistry/multicharge/default.nix new file mode 100644 index 000000000000..5a5046cd2a54 --- /dev/null +++ b/pkgs/development/libraries/science/chemistry/multicharge/default.nix @@ -0,0 +1,46 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, gfortran +, blas +, lapack +, mctc-lib +, mstore +}: + +assert !blas.isILP64 && !lapack.isILP64; + +stdenv.mkDerivation rec { + pname = "multicharge"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "grimme-lab"; + repo = pname; + rev = "v${version}"; + hash = "sha256-oUI5x5/Gd0EZBb1w+0jlJUF9X51FnkHFu8H7KctqXl0="; + }; + + nativeBuildInputs = [ cmake gfortran ]; + + buildInputs = [ blas lapack mctc-lib mstore ]; + + postInstall = '' + substituteInPlace $out/lib/pkgconfig/${pname}.pc \ + --replace "''${prefix}" "" + ''; + + doCheck = true; + preCheck = '' + export OMP_NUM_THREADS=2 + ''; + + meta = with lib; { + description = "Electronegativity equilibration model for atomic partial charges"; + license = licenses.asl20; + homepage = "https://github.com/grimme-lab/multicharge"; + platforms = platforms.linux; + maintainers = [ maintainers.sheepforce ]; + }; +} diff --git a/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix b/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix new file mode 100644 index 000000000000..a9bd2c8faa73 --- /dev/null +++ b/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix @@ -0,0 +1,46 @@ +{ stdenv +, lib +, fetchFromGitHub +, gfortran +, cmake +, mctc-lib +, mstore +, toml-f +, blas +}: + +assert !blas.isILP64; + +stdenv.mkDerivation rec { + pname = "simple-dftd3"; + version = "0.7.0"; + + src = fetchFromGitHub { + owner = "dftd3"; + repo = pname; + rev = "v${version}"; + hash = "sha256-5OvmMgjD8ujjKHkuw4NT8hEXKh5YPxuBl/Mu6g2/KIA="; + }; + + nativeBuildInputs = [ cmake gfortran ]; + + buildInputs = [ mctc-lib mstore toml-f blas ]; + + postInstall = '' + substituteInPlace $out/lib/pkgconfig/s-dftd3.pc \ + --replace "''${prefix}" "" + ''; + + doCheck = true; + preCheck = '' + export OMP_NUM_THREADS=2 + ''; + + meta = with lib; { + description = "Reimplementation of the DFT-D3 program"; + license = with licenses; [lgpl3Only gpl3Only]; + homepage = "https://github.com/dftd3/simple-dftd3"; + platforms = [ "x86_64-linux" ]; + maintainers = [ maintainers.sheepforce ]; + }; +} diff --git a/pkgs/development/libraries/science/chemistry/tblite/default.nix b/pkgs/development/libraries/science/chemistry/tblite/default.nix new file mode 100644 index 000000000000..0f05315b9d88 --- /dev/null +++ b/pkgs/development/libraries/science/chemistry/tblite/default.nix @@ -0,0 +1,59 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, gfortran +, blas +, lapack +, mctc-lib +, mstore +, toml-f +, multicharge +, dftd4 +, simple-dftd3 +}: + +assert !blas.isILP64 && !lapack.isILP64; + +stdenv.mkDerivation rec { + pname = "tblite"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "tblite"; + repo = pname; + rev = "v${version}"; + hash = "sha256-R7CAFG/x55k5Ieslxeq+DWq1wPip4cI+Yvn1cBbeVNs="; + }; + + nativeBuildInputs = [ cmake gfortran ]; + + buildInputs = [ + blas + lapack + mctc-lib + mstore + toml-f + multicharge + dftd4 + simple-dftd3 + ]; + + doCheck = true; + preCheck = '' + export OMP_NUM_THREADS=2 + ''; + + postInstall = '' + substituteInPlace $out/lib/pkgconfig/${pname}.pc \ + --replace "''${prefix}" "" + ''; + + meta = with lib; { + description = "Light-weight tight-binding framework"; + license = with licenses; [ gpl3Plus lgpl3Plus ]; + homepage = "https://github.com/tblite/tblite"; + platforms = platforms.linux; + maintainers = [ maintainers.sheepforce ]; + }; +} diff --git a/pkgs/development/libraries/science/chemistry/tblite/python.nix b/pkgs/development/libraries/science/chemistry/tblite/python.nix new file mode 100644 index 000000000000..00301d957662 --- /dev/null +++ b/pkgs/development/libraries/science/chemistry/tblite/python.nix @@ -0,0 +1,28 @@ +{ buildPythonPackage +, meson +, ninja +, pkg-config +, tblite +, cffi +}: + +buildPythonPackage rec { + inherit (tblite) pname version src meta; + + nativeBuildInputs = [ meson ninja pkg-config ]; + + buildInputs = [ tblite ]; + + propagatedBuildInputs = [ cffi ]; + + format = "other"; + + configurePhase = '' + runHook preConfigure + + meson setup build python --prefix=$out + cd build + + runHook postConfigure + ''; +} |