choderalab / modelforge

Infrastructure to implement and train NNPs
https://modelforge.readthedocs.io/en/latest/
MIT License
9 stars 4 forks source link

Refactor base class for neural network potentials #108

Closed wiederm closed 2 months ago

wiederm commented 2 months ago

Description

Previously, we have implemented all base functionality, including the neighbor list calculation, in a base class from which each neural network inherits. While this was straightforward, this abstraction made exporting the model and exchanging the neighbor list calculation difficult. To make these use cases work, the new structure is as follows (outlined for ANI): ANI2x class that wraps and initializes ANI2xCore and InputPreparation instances. The InputPreparation class takes cartesian coordinates as input and outputs d_ij and r_ij, as well as neighbor indices. The ANI2Core performs all calculations necessary for the neural network operating on the output of the InputPreparation.

When models are exported, only the Core class is exported.

Todos

Status

chrisiacovella commented 2 months ago

Can you write out a slightly more detailed description of the hierarchy? Might be good to just copy and paste the same text to an issue and the wiki.

wiederm commented 2 months ago

I outlined the structure here: https://github.com/choderalab/modelforge/wiki/Neural-network-potentials#module-organization

It might be enough to add the URL?