openmm / openmm-ml

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

Installation with latest torch #85

Closed shenoynikhil closed 3 months ago

shenoynikhil commented 3 months ago

Installing this package with recent versions of torch results in package conflicts. I am using the following yml file to install my environment.

name: custom_env
channels:
  - conda-forge
  - pytorch
  - nvidia
  - pyg

dependencies:
  # standard stuff
  - python >=3.8
  - pip

  # ML
  - e3nn
  - pytorch::pytorch
  - pytorch::pytorch-cuda==12.1
  - pyg::pyg

  # MD
  - openmm
  - openmm-ml
  - openmm-torch

I think it comes from torchani's incompatibility with recent torch versions. Any suggestions on how this could be potentially fixed?

JMorado commented 3 months ago

Hi @shenoynikhil, What happens if you use the following YAML file:

name: custom_env
channels:
  - conda-forge

dependencies:
  # standard stuff
  - python >=3.8
  - pip
  - cudatoolkit

  # ML
  - e3nn
  - pytorch

  # MD
  - openmm
  - openmm-ml
  - openmm-torch

Assuming you're on x86_64, this resolves to the latest packages on my end.

JMorado commented 3 months ago

It seems the package causing the conflicts was PyG. It works fine if you install it afterwards via pip, as described here.

peastman commented 3 months ago

Combining packages from conda-forge with any other channel often doesn't work correctly.

shenoynikhil commented 3 months ago

@JMorado That seems to resolve the issue!