openmm / openmm-ml

High level API for using machine learning models in OpenMM simulations
Other
75 stars 25 forks source link

Installing openmm-ml does not install nnpops #54

Open jchodera opened 1 year ago

jchodera commented 1 year ago

Following the directions in the README does not lead to NNPOps being installed, which results in slow performance:

$ mamba install -c conda-forge openmm-ml
...
  Package             Version  Build                  Channel                     Size
────────────────────────────────────────────────────────────────────────────────────────
  Install:
────────────────────────────────────────────────────────────────────────────────────────

  future               0.18.3  pyhd8ed1ab_0           conda-forge/noarch        Cached
  h5py                  3.7.0  py39h737f45e_0         pkgs/main/linux-64          1 MB
  importlib_metadata    5.0.0  hd8ed1ab_1             conda-forge/noarch          8 KB
  lark-parser          0.12.0  pyhd8ed1ab_0           conda-forge/noarch         78 KB
  ninja                1.11.1  h924138e_0             conda-forge/linux-64        2 MB
  openmm-ml               1.0  pyhd8ed1ab_0           conda-forge/noarch         14 KB
  openmm-torch            1.0  cuda112py39h440defe_1  conda-forge/linux-64      135 KB
  pytorch              1.12.1  cpu_py39he8d8e81_0     pkgs/main/linux-64         61 MB
  setuptools-scm        6.3.2  pyhd8ed1ab_0           conda-forge/noarch         29 KB
  setuptools_scm        6.3.2  hd8ed1ab_0             conda-forge/noarch          4 KB
  tomli                 2.0.1  pyhd8ed1ab_0           conda-forge/noarch        Cached
  torchani              2.2.2  cpu_py39hc31d6b3_6     conda-forge/linux-64       22 MB

We should (1) recommend nnpops be included, and (2) consider adding it to the openmm-ml feedstock recipe.

cc @peastman @raimis @mikemhenry

peastman commented 1 year ago

Agreed, we should add it to the feedstock.

mikemhenry commented 1 year ago

If I recall correctly, the issue is that nnpops doesn't have a osx build, so if we want openmm-ml to be installable on osx and linux, it can't have nnpops as a dependency. One option is to drop the noarch section in the openmm-ml feedstock, and then I should be able to use the [linux] selector to pull in nnpops for linux installs and not osx installs.

Perhaps the best option until we get nnpops building on osx is to update the README to say "if you are on linux, run mamba install -c conda-forge openmm-ml nnpops for best performance"

mikemhenry commented 1 year ago

Looks like there is an undocumented way to do this: https://github.com/conda-forge/conda-forge.github.io/pull/1839

Not something I can tackle before my vacation, but if @hmacdope has time or someone else, it should be straightforward to setup the openmm-ml feedstock to install nnpops on linux only.