espressomd / espresso

The ESPResSo package
https://espressomd.org
GNU General Public License v3.0
230 stars 187 forks source link

Support ASE Atoms #4771

Closed PythonFZ closed 5 months ago

PythonFZ commented 1 year ago

It would be helpful for ML Potentials and the ZnDraw visualisation to add support for ase.Atoms to espresso. The package https://wiki.fysik.dtu.dk/ase/ase/atoms.html is commonly used among the MLP community.

A possible interface could look like:

ase_units = espressomd.io.writer.h5md.UnitSystem(...)

ase_exporter = espressomd.io.writer.ase.ASE(unit_system=ase_units)
for i in range(2):
    atoms: ase.Atoms = ase_exporter.get()
    system.integrator.run(steps=10)

ASE uses a fixed unit system described here https://wiki.fysik.dtu.dk/ase/ase/units.html

SamTov commented 1 year ago

Beyond just ML potentials, having access to ASE calculators would allow people to use espresso for all kinds of different potentials including ab-initio methods.