openff-toolkit icon indicating copy to clipboard operation
openff-toolkit copied to clipboard

Lighter-weight OpenMM dependency and future conda-forge compatibility?

Open j-wags opened this issue 7 years ago • 3 comments

To improve ease of packaging and reduce dependency size, it would be good to use a minimal build of OpenMM. This build would just be used to produce openMM-format systems for subsequent conversion.

j-wags avatar Dec 21 '18 23:12 j-wags

In the openforcefield toolkit, we currently only use openmm for the System object model as a flexible way of representing parameterized molecular mechanics systems prior to conversion to other tools. (OpenMM plays a more central role in our other tools, so this is also convenient.)

If the size of the openmm conda package is of concern (8MB on osx, 11.4MB on linux64), we can build a package that omits the CUDA and OpenCL platforms on conda-forge.

Eventually, I imagine we will have a pure Python object model version of OpenMM that will be separated from the C++/CUDA/OpenCL package, which would provide the best solution to this problem.

jchodera avatar Dec 22 '18 04:12 jchodera

Upcoming version 0.11.0 of the toolkit will enable some (I hesitate to say "all") functionality that might not require OpenMM to function without it.

>>> from openff.toolkit import *
>>> import openmm
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'openmm'
>>> ForceField("openff-2.0.0.offxml")
<openff.toolkit.typing.engines.smirnoff.forcefield.ForceField object at 0x10be98af0>
>>> Molecule.from_smiles("CCO")
Molecule with name '' and SMILES '[H]C([H])([H])C([H])([H])O[H]'
>>> Molecule.from_smiles("CCO").is_isomorphic_with(Molecule.from_smiles("C"))
False
>>> Molecule.from_smiles("CCO").to_iupac()
'ethanol'

I don't think this actually gets us much mileage since we'll probably continue to ship OpenMM with the default installation (and some of our dependencies may as well). This also bypasses the issue of CUDA toolkits brought down with vanilla OpenMM installations.

Interchange has not made the same effort to work without OpenMM. It's probably feasible if that's desired in the future.

mattwthompson avatar Jun 17 '22 20:06 mattwthompson

It could possibly change before the full release, but the RC builds of openff-toolkit-base do not pull down OpenMM.

This does not get around the problem of CUDA being downloaded for all OpenMM builds, but does provide a workaround for those that don't want to download a gigabyte blob and agree to an NVIDIA EULA to parse a SMILES string.

mattwthompson avatar Jul 07 '22 16:07 mattwthompson

Closing as (mostly) completed with the conda-forge migration and 0.11.0 release. I would still like non-CUDA builds to be more accessible, but that's a separate issue.

mattwthompson avatar Aug 31 '22 18:08 mattwthompson