ASE integration#
Turn an ASE Atoms into labels. The engine repository does not
install Python. The full howto is
pydseams ASE.
pip install 'pydseamslib[ase]'
import ase.io
import pydseams as ds
atoms = ase.io.read("input/traj/exampleTraj.lammpstrj", format="lammps-dump-text")
# The dump stores LAMMPS types, not element symbols. Type 2 is oxygen.
atoms.set_chemical_symbols(["O" if int(t) == 2 else "H" for t in atoms.arrays["type"]])
frame = ds.from_ase(atoms)
print(frame.chill_plus())
labeled = frame.to_ase()
assert str(frame.chill_plus()) == "IceCounts(interClathrate=9, water=241)"
assert len(labeled) == 250
from_ase needs an orthorhombic cell. The analysed species is oxygen
by default (select="O"). bonded is auto, hbond, or cutoff.
to_ase writes arrays['ice_type'] after CHILL, and hc / ddc
after cages(). Optional extra pydseamslib[solvis] builds a solvis
System (frame.to_solvis()).