state_to_atoms

torch_sim.io.state_to_atoms(state, *, system_extras_map=None, atom_extras_map=None)[source]

Convert a SimState to a list of ASE Atoms objects.

Parameters:
  • state (ts.SimState) – Batched state containing positions, cell, and atomic numbers.

  • system_extras_map (dict[SystemExtras, str] | None) – Map of {ts_key: ase_key} controlling which _system_extras entries are written to atoms.info. None (default) means no extras are written.

  • atom_extras_map (dict[AtomExtras, str] | None) – Map of {ts_key: ase_key} controlling which _atom_extras entries are written to atoms.arrays. None (default) means no extras are written.

Returns:

ASE Atoms objects, one per system.

Return type:

list[Atoms]

Raises:

ImportError – If ASE is not installed.

Notes

  • Output positions and cell will be in Å

  • Output masses will be in amu