Skip to content

Commit

Permalink
Create nix build of MD-SAPT
Browse files Browse the repository at this point in the history
  • Loading branch information
ALescoulie committed Jun 24, 2024
1 parent 73e10a1 commit 6c0fd6c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ wheels/
*.egg-info/
.installed.cfg
*.egg
result/

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
23 changes: 20 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
mrcfile = [ "setuptools" ];
griddataformats = [ "setuptools" ];
pyright = [ "setuptools" ];
#matplotlib = [ "pybind11" ];
#scipy = [ "setuptools" "wheel" "pybind11" "pythran" ];
};

p2n-overrides = pkgs.poetry2nix.defaultPoetryOverrides.extend (final: prev:
Expand Down Expand Up @@ -60,16 +58,35 @@
overrides = [ p2n-overrides unfuckScipy unfuckNumpy ]; #unfuckScipy ];
};

nonPoetryPkgs = final: prev: {
psi4 = pkgs.qchem.psi4;
openmm = pkgs.qchem.openmm;
pdbfixer = pkgs.qchem.pdbfixer;
};

devEnv = pkgs.mkShell {
propagatedBuildInputs = [ poetryEnv];
propagatedBuildInputs = [ poetryEnv ];
buildInputs = with pkgs; [pkgs.qchem.psi4 pkgs.qchem.openmm pkgs.qchem.pdbfixer pkgs.act ];
};


# DON'T FORGET TO PUT YOUR PACKAGE NAME HERE, REMOVING `throw`
packageName = "MD-SAPT";


app = pkgs.poetry2nix.mkPoetryApplication {
projectDir = ./.;
python = python;
overrides = [ p2n-overrides nonPoetryPkgs unfuckScipy unfuckNumpy ];

};


in {
packages.${packageName} = app;
packages.default = self.packages.${system}.${packageName};
devShells.default = devEnv;

});
}

12 changes: 8 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[tool.poetry]
name = "mdsapt"
version = "2.0.3"
version = "2.0.4"
description = "SAPT energy calculator built using MDAnalysis and Psi4"
authors = ["Alia Lescoulie <alia.lescoulie@gmail.com>"]
authors = [
"Alia Lescoulie <alia.lescoulie@gmail.com>",
"Astrid Yu <astrid@astrid.tech",
"Ashley Ringer McDonald <armcdona@calpoly.edu"]
license = "GPL-3.0"
readme = "README.md"

Expand All @@ -22,8 +25,9 @@ pytest-cov = "^5.0.0"
autopep8 = "^2.2.0"
pydantic = "^2.7.4"



[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
mdsapt = "mdsapt:cli"

0 comments on commit 6c0fd6c

Please sign in to comment.