Description
NNPOps depends on TorchANI but, as discussed in #39, it shouldn't.
@peastman proposal (#39 (comment)):
The first thing I would do is open one or more issues on the TorchANI repo suggesting these changes and offering to provide code. This class doesn't implement any kind of calculation. It's just a workaround for a particular flaw in TorchANI (that it repeats the calculation on every step). The more of these changes we can push upstream to them, the better.
For anything they don't want to accept, the next thing I would do is move the imports inside the classes. You should be able to
import NNPOps
even if TorchANI isn't installed. In practice that means we should neverimport torchani
at the top level. It should only be imported inside the specific classes or functions that use it.Finally we should consider whether NNPOps is the best place for all of these, or whether, for example, OpenMM-ML would be a better place.