diff --git a/flake.lock b/flake.lock index 3b91ae5dc..50adc962d 100644 --- a/flake.lock +++ b/flake.lock @@ -21,11 +21,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -49,20 +49,96 @@ "type": "github" } }, + "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "inputs": { + "systems": "systems_5" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_6": { + "inputs": { + "systems": "systems_6" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nix-bundle": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "nixBundlers", + "nixpkgs" + ], + "utils": "utils" }, "locked": { - "lastModified": 1626704917, - "narHash": "sha256-cJ73kxY5ZCPWQeQZyCSdvkBqjqJkU5wgETBNaXfqF18=", - "owner": "matthewbauer", + "lastModified": 1729095141, + "narHash": "sha256-2AXV3I8D/I3UkQY797j/fSKrIwbUpTVZ82s2O/ErtVM=", + "owner": "nix-community", "repo": "nix-bundle", - "rev": "223f4ffc4179aa318c34dc873a08cb00090db829", + "rev": "4f6330b20767744a4c28788e3cdb05e02d096cd8", "type": "github" }, "original": { - "owner": "matthewbauer", + "owner": "nix-community", "repo": "nix-bundle", "type": "github" } @@ -70,7 +146,7 @@ "nix-utils": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1632973430, @@ -90,14 +166,14 @@ "inputs": { "nix-bundle": "nix-bundle", "nix-utils": "nix-utils", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1696517060, - "narHash": "sha256-V296JCORatNg44vQnNCkZASOmElY8NFT15OQ45a1ACQ=", + "lastModified": 1730753393, + "narHash": "sha256-HqV1S2idL29QpW4atCEd0qf8LUCmmTG9RRCPtEwoufw=", "owner": "NixOS", "repo": "bundlers", - "rev": "00762a03a3d862a2ca6272a21fdc50bda5d36c42", + "rev": "4dd1b979551b11faeae47e6599d71cd415d21bee", "type": "github" }, "original": { @@ -109,54 +185,106 @@ }, "nixpkgs": { "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", + "lastModified": 1629252929, + "narHash": "sha256-Aj20gmGBs8TG7pyaQqgbsqAQ6cB+TVuL18Pk3DPBxcQ=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", + "rev": "3788c68def67ca7949e0864c27638d484389363d", "type": "github" }, "original": { - "id": "nixpkgs", - "ref": "nixos-20.03-small", - "type": "indirect" + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1629252929, - "narHash": "sha256-Aj20gmGBs8TG7pyaQqgbsqAQ6cB+TVuL18Pk3DPBxcQ=", - "owner": "nixos", + "lastModified": 1728492678, + "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "3788c68def67ca7949e0864c27638d484389363d", + "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_3": { "locked": { - "lastModified": 1634782485, - "narHash": "sha256-psfh4OQSokGXG0lpq3zKFbhOo3QfoeudRcaUnwMRkQo=", - "path": "/nix/store/p53cz6rh27q40g9i0q98k3vfrz6lm12w-source", - "rev": "34ad3ffe08adfca17fcb4e4a47bb5f3b113687be", - "type": "path" + "lastModified": 1727777050, + "narHash": "sha256-5jw7zwOcWOpxTO6NCzmFZfq0klNGA+ktw+Yb3n35eUQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d78d09350ac7dfe503cf48cbc59764aef4157b9a", + "type": "github" }, "original": { - "id": "nixpkgs", - "type": "indirect" + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs_4": { "locked": { - "lastModified": 1709780214, - "narHash": "sha256-p4iDKdveHMhfGAlpxmkCtfQO3WRzmlD11aIcThwPqhk=", + "lastModified": 1724748588, + "narHash": "sha256-NlpGA4+AIf1dKNq76ps90rxowlFXUsV9x7vK/mN37JM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a6292e34000dc93d43bccf78338770c1c5ec8a99", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1728472043, + "narHash": "sha256-+fUCZ7C34cp+bY5E9Hw4biRyI+IINVsO+sXFCieWkZA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4fa56ac6d86a213b556d4db9b1cb43a51b3e40ec", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1724748588, + "narHash": "sha256-NlpGA4+AIf1dKNq76ps90rxowlFXUsV9x7vK/mN37JM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a6292e34000dc93d43bccf78338770c1c5ec8a99", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1728472043, + "narHash": "sha256-+fUCZ7C34cp+bY5E9Hw4biRyI+IINVsO+sXFCieWkZA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f945939fd679284d736112d3d5410eb867f3b31c", + "rev": "4fa56ac6d86a213b556d4db9b1cb43a51b3e40ec", "type": "github" }, "original": { @@ -166,16 +294,36 @@ "type": "github" } }, + "pysisyphus-addons": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs_3", + "sympleints": "sympleints" + }, + "locked": { + "lastModified": 1727857962, + "narHash": "sha256-MwQJ+dW7qsEkZoDH0Zq6Dibb1JoimSK7NSPaWCFb7gM=", + "owner": "eljost", + "repo": "pysisyphus-addons", + "rev": "e4ff9817e9f48a68a7548700559fdffe925ee43d", + "type": "github" + }, + "original": { + "owner": "eljost", + "repo": "pysisyphus-addons", + "type": "github" + } + }, "qchem": { "inputs": { - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1710238240, - "narHash": "sha256-HKbY7EOfbIf0nM2bf1HP7TEwnySNeIr0P5GxQrXhePc=", + "lastModified": 1729862339, + "narHash": "sha256-681g/vv+ZNnhT/5U1dJvORk4vnsrbgtGUumhMuO0meM=", "owner": "nix-qchem", "repo": "nixos-qchem", - "rev": "bda8e9ef66a315521575e26e71089209b13ed89a", + "rev": "6b4144e50a901785dee3271763a3d23a1079a9f1", "type": "github" }, "original": { @@ -185,12 +333,71 @@ "type": "github" } }, + "qchem_2": { + "inputs": { + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1729514893, + "narHash": "sha256-2uC4QJCcnS37UJ1npGv+0N/77Qx9ylkQhDplGTMq9EU=", + "owner": "nix-qchem", + "repo": "nixos-qchem", + "rev": "64d3989e6be4a7f34bdbf10cc5b71009aa155071", + "type": "github" + }, + "original": { + "owner": "nix-qchem", + "repo": "nixos-qchem", + "type": "github" + } + }, "root": { "inputs": { "flake-compat": "flake-compat", "flake-utils": "flake-utils", "nixBundlers": "nixBundlers", - "qchem": "qchem" + "pysisyphus-addons": "pysisyphus-addons", + "qchem": "qchem", + "sympleints": "sympleints_2", + "thermoanalysis": "thermoanalysis" + } + }, + "sympleints": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1727857764, + "narHash": "sha256-v/wJBb0b4P/jViiB1Uin0PelioQcm09MEFUazYW9uMo=", + "owner": "eljost", + "repo": "sympleints", + "rev": "fe51f170d6cef36d92806643fcbaa8b8d5fabc2d", + "type": "github" + }, + "original": { + "owner": "eljost", + "repo": "sympleints", + "type": "github" + } + }, + "sympleints_2": { + "inputs": { + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1727857764, + "narHash": "sha256-v/wJBb0b4P/jViiB1Uin0PelioQcm09MEFUazYW9uMo=", + "owner": "eljost", + "repo": "sympleints", + "rev": "fe51f170d6cef36d92806643fcbaa8b8d5fabc2d", + "type": "github" + }, + "original": { + "owner": "eljost", + "repo": "sympleints", + "type": "github" } }, "systems": { @@ -207,6 +414,118 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "thermoanalysis": { + "inputs": { + "flake-utils": "flake-utils_6", + "qchem": "qchem_2" + }, + "locked": { + "lastModified": 1729518383, + "narHash": "sha256-5r2AYQMhNQW3rkHswbdETS8r1Z8xX7ejFNQoAXGzCDY=", + "owner": "eljost", + "repo": "thermoanalysis", + "rev": "b3e5d8673f900500d5f35bf5fb9e48c33456272b", + "type": "github" + }, + "original": { + "owner": "eljost", + "repo": "thermoanalysis", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 96b68033f..517f60498 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,12 @@ flake-utils.url = "github:numtide/flake-utils"; nixBundlers.url = "github:NixOS/bundlers/master"; + + pysisyphus-addons.url = "github:eljost/pysisyphus-addons"; + + sympleints.url = "github:eljost/sympleints"; + + thermoanalysis.url = "github:eljost/thermoanalysis"; }; nixConfig = { @@ -20,13 +26,19 @@ extra-subtituters = [ "https://pysisyphus.cachix.org" ]; }; - outputs = { self, qchem, flake-utils, nixBundlers, ... }: + outputs = { self, qchem, sympleints, pysisyphus-addons, thermoanalysis, flake-utils, nixBundlers, ... }: flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: let pkgs = import qchem.inputs.nixpkgs { inherit system; - overlays = [ qchem.overlays.default (import ./nix/overlay.nix) ]; + overlays = [ + qchem.overlays.default + thermoanalysis.overlays.default + sympleints.overlays.default + pysisyphus-addons.overlays.default + (import ./nix/overlay.nix) + ]; config = { allowUnfree = true; qchem-config = { @@ -73,7 +85,7 @@ devShells.default = let pythonEnv = pkgs.python3.withPackages (p: with p; - [ pip ] + [ pip pytest ] ++ p.pysisyphus.nativeBuildInputs ++ p.pysisyphus.buildInputs ++ p.pysisyphus.propagatedBuildInputs diff --git a/nix/overlay.nix b/nix/overlay.nix index b72293b9e..854d814fc 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -1,17 +1,48 @@ final: prev: { pysisyphus = prev.python3.pkgs.toPythonApplication final.python3.pkgs.pysisyphus; + qchem = prev.qchem // { + orca = prev.qchem.orca.overrideAttrs (oldAttrs: { + version = "5.0.4"; + + src = prev.requireFile { + name = "orca_5_0_4_linux_x86-64_shared_openmpi411.tar.xz"; + sha256 = "sha256-xOpa6mDae8sYprcEJgkgb76yp2XG+pWMVonUULWIsDY="; + message = "Please add orca_5_0_4_linux_x86-64_shared_openmpi411.tar.xz to the nix store"; + }; + + installPhase = '' + mkdir -p $out/bin $out/lib $out/share/doc/orca + + cp autoci_* $out/bin + cp orca_* $out/bin + cp orca $out/bin + cp otool_* $out/bin + + cp -r ORCACompoundMethods $out/bin/. + + cp *.so.5 $out/lib/. + + cp *.pdf $out/share/doc/orca + + wrapProgram $out/bin/orca --prefix PATH : '${final.openmpi}/bin:${final.openssh}/bin' + + ln -s ${final.qchem.xtb}/bin/xtb $out/bin/otool_xtb + ''; + }); + }; + python3 = prev.python3.override (old: { packageOverrides = prev.lib.composeExtensions (old.packageOverrides or (_: _: { })) (pfinal: pprev: { - pysisyphus = prev.qchem.python3.pkgs.callPackage ./pysisyphus.nix { - inherit (prev.qchem) + pysisyphus = pfinal.callPackage ./pysisyphus.nix { + inherit (final.qchem) multiwfn xtb molcas psi4 wfoverlap nwchem - orca + orca # Requires ORCA 5.0 series turbomole gaussian cfour diff --git a/nix/pysisyphus.nix b/nix/pysisyphus.nix index aacd8dce2..7206a1f52 100644 --- a/nix/pysisyphus.nix +++ b/nix/pysisyphus.nix @@ -7,6 +7,8 @@ , pytestCheckHook , nix-gitignore # Python dependencies +, pysisyphus-addons +, thermoanalysis , setuptools-scm , autograd , dask @@ -25,9 +27,10 @@ , psutils , qcengine , ase -, xtb-python , openbabel-bindings , pyscf +, numba +, optuna # Runtime dependencies , runtimeShell , jmol @@ -36,6 +39,8 @@ , enableMultiwfn ? true , xtb , enableXtb ? true +, tblite +, enableTblite ? true , molcas , enableMolcas ? true , psi4 @@ -93,6 +98,7 @@ let ++ lib.optional enableJmol jmol ++ lib.optional enableMultiwfn multiwfn ++ lib.optional enableXtb xtb + ++ lib.optional enableTblite tblite ++ lib.optional enableMolcas molcas ++ lib.optional enablePsi4 psi4 ++ lib.optional enableWfoverlap wfoverlap @@ -108,15 +114,16 @@ let in buildPythonPackage rec { pname = "pysisyphus"; - version = "0.8.0b0"; + version = "1.0.0"; - nativeBuildInputs = [ + build-system = [ makeWrapper setuptools-scm - mpiCheckPhaseHook ]; - propagatedBuildInputs = [ + dependencies = [ + pysisyphus-addons + thermoanalysis autograd dask distributed @@ -137,9 +144,11 @@ buildPythonPackage rec { openbabel-bindings openssh pyscf + numba + optuna ] # Syscalls - ++ lib.optional enableXtb xtb-python ++ lib.optional enableXtb xtb + ++ lib.optional enableTblite tblite ++ lib.optional enableJmol jmol ++ lib.optional enableMultiwfn multiwfn ++ lib.optional enableMolcas molcas @@ -160,7 +169,7 @@ buildPythonPackage rec { preBuild = "export SETUPTOOLS_SCM_PRETEND_VERSION=${version}"; - checkInputs = [ openssh pytestCheckHook ]; + checkInputs = [ openssh pytestCheckHook mpiCheckPhaseHook ]; preCheck = '' export PYSISRC=${pysisrc} @@ -183,6 +192,7 @@ buildPythonPackage rec { "hcn_neb_dimer_irc" "test_ci_opt[RFOptimizer-opt_kwargs1--78.2487951]" # Broken as of PySCF >= 2.3 as a DFT functional definition was changed "test_composite_oniom[lib:subst_effect/toluene_minus_H_b3lypG_631g.xyz-2-high_inds1--270.824806805671]" # Slight numerical deviations + "test_spectrum_ctnum" ]; in [