deepmodeling / DMFF

DMFF (Differentiable Molecular Force Field) is a Jax-based python package that provides a full differentiable implementation of molecular force field models.
GNU Lesser General Public License v3.0
154 stars 43 forks source link

[Feature Request] Install dependencies automatically and publish to PyPI #128

Open njzjz opened 1 year ago

njzjz commented 1 year ago

Summary

Make DMFF available via pip install dmff.

Motivation

Currently, the documentation lists too many dependencies to let users install manually, which is too complex. These packages should be added to dependencies and installed automatically.

mdtraj and rdkit are available in PyPI, so they can also listed as dependencies. Users only need to manually install openmm, which is blocked by https://github.com/openmm/openmm/issues/3796.

Suggested Solutions

  1. Add all required packages to dependencies;
  2. Rewrite documentation;
  3. To publish to PyPI, add a GitHub workflow file like this: https://github.com/deepmodeling/dpdispatcher/blob/master/.github/workflows/release.yml

Further Information, Files, and Links

No response

saltball commented 1 year ago

Maybe conda recipes will be necessary in the future.

The most commonly used, and perhaps the most user-friendly, method of installing OpenMM is through conda. (see http://docs.openmm.org/latest/userguide/application/01_getting_started.html#installing-openmm).

Considering that OpenMM is a mandatory dependency for dmff, it is reasonable to assume that most users already have conda installed. Also, the dmff dependencies can be primarily configured within conda.

In the future, dmff is expected to include binary files for OpenMM plugins, as developing with conda in https://github.com/deepmodeling/DMFF/tree/devel/backend. Given this, I recommend using conda recipes directly for distributing dmff instead of PyPI.


In addition, it is also worth considering whether a separate distribution of OpenMMDMFFPlugin(if named as such) is necessary.

njzjz commented 1 year ago

When building a conda recipe, one still needs to use pip install to install the package and may use pip check to check whether the dependencies are correctly installed. Only writing dependencies to the conda recipe is unsafe.

njzjz commented 1 year ago

xref for mdtraj: https://github.com/mdtraj/mdtraj/issues/1794