-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a Metatensor adaptor #4933
Comments
Not quite, but it does have to be one of the named units in there if you want metatensor to perform unit conversion: 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. |
Where can we find a good example (trained) model to try this on? |
We have been using https://github.com/Luthaf/metatensor-lj-test/ to test the interface to other simulation engines. It can define a LJ model for a single atomic type and export the model in the metatensor format. |
We are currently going through the Lammps integration. Collecting our questions here. @Luthaf could you maybe help us with those, either here on the issue, or in a video call? Many thanks! General
MetatensorSystemOptions
MetaTensorNeighborData
PairMetatensro
Provisoinal planning
|
Hey! I'm currently on vacation, but I'm happy to answer all your questions when I'm back. I should have some time the week of the 12th of August for a video chat! |
I'm back and available for a chat about this, let me know when it is convenient for you! |
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 lammps/lammps#4163 for how Metatensor is being integrated into LAMMPS.
The text was updated successfully, but these errors were encountered: