Opening an issue to start the discussion about this, since multiple separate people are talking about it independently (ping @ceriottm, @PicoCentauri). We should try to use this as a central coordination point.
The way I see it, we would like to have something like this:
- the model has access to function(s) to compute properties related to electrostatics/long range interactions (electric field, electrostatic energy/forces, …). For the sake of example, this could be something like
compute_electric_potential_at_atoms_positions(charges: Array, potential_out: Array).
- these functions are provided by the simulation engine, using whatever implementation already exist in there. Model gain access to the function though something like a function pointer inside metatomic, which will be set to some implementation-specific version by the engine at initialization.
Both of these mean that the model can always assume that the same function is available and will compute the same thing in any simulation engine.
Unresolved questions
- how much would small difference in the output that arise from different implementations/algorithm matter?
- what exact function(s) are needed. We want to have as few functions as possible to make it easy to add new engines
- how to integrate the functions with autograd/jit/vmap/… all the usual kinds of function transformations done in ML models
Things to look into
- what exact functionalities different models need
- what is exactly implemented in different engines, with which API
Please share here any insight you have!
Opening an issue to start the discussion about this, since multiple separate people are talking about it independently (ping @ceriottm, @PicoCentauri). We should try to use this as a central coordination point.
The way I see it, we would like to have something like this:
compute_electric_potential_at_atoms_positions(charges: Array, potential_out: Array).Both of these mean that the model can always assume that the same function is available and will compute the same thing in any simulation engine.
Unresolved questions
Things to look into
Please share here any insight you have!