Open jngrad opened 3 weeks ago
Metatensor expects distances, forces and energies in standard SI units.
Not quite, but it does have to be one of the named units in there if you want metatensor to perform unit conversion: https://docs.metatensor.org/latest/atomistic/reference/models/index.html#known-quantities-and-units.
If some unit are left unset, metatensor will just pass data as-is from engine to model and respectively (which might fail if the model is not trained to work with the same units as espresso).
The rest of the plan here looks good to me!
I will start working on it.
Data flow
See Metatensor - Data flow
Metatensor expects distances, forces and energies in standard SI units. One has to set up the ESPResSo system such that e.g. the reduced unit is in Ångstroms, e.g.
box_l=[100, 100, 100]
means a box size of 100 Å. This can be achieved by designing a convenience function that leveragespint
to create an empty ESPResSo system with the correct size, time step and energy units.For domain decomposition: typically the ML model neighborhood radius is less than the interaction range. Thus we should be able to use metatensor in parallel without the need to tweak the ESPResSo domain decomposition and cell cutoff. One caveat: without LJ interaction the non-bonded cutoff will be zero, so we need to introduce a mechanism in the Metatensor plugin of the system call to adapt the
min_cutoff
cell system property.Contact persons from the ML side: @SamTov, @Luthaf, @PicoCentauri
Roadmap
std::vector<int> nbhood(System::System const &system, Utils::Vector3d const &pos, double dist)
to return a vector of particle distances (can be achieved withstd::ranges::transform
and aParticle
toVector3d
projector)autograd
feature to compute the force as the gradient of the energysystem.min_global_cut
testsuite/python
folderSee https://github.com/lammps/lammps/pull/4163 for how Metatensor is being integrated into LAMMPS.