openmm / openmm-torch

OpenMM plugin to define forces with neural networks
185 stars 24 forks source link

Clone the module on TorchForceImpl initialization #116

Closed RaulPPelaez closed 1 year ago

RaulPPelaez commented 1 year ago

This avoids different contexts sharing the same instance of the module owned by TorchForce. Fixes https://github.com/openmm/NNPOps/pull/113 and https://github.com/openmm/NNPOps/issues/112

peastman commented 1 year ago

Looks good.