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_extrasentries are written toatoms.info.None(default) means no extras are written.atom_extras_map (dict[AtomExtras, str] | None) – Map of
{ts_key: ase_key}controlling which_atom_extrasentries are written toatoms.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