state_to_structures¶
- torch_sim.io.state_to_structures(state, *, system_extras_map=None, atom_extras_map=None)[source]¶
Convert a SimState to a list of Pymatgen Structure objects.
- Parameters:
state (
SimState) – Batched state containing positions, cell, and atomic numberssystem_extras_map (dict[SystemExtras, str] | None) – Map of
{ts_key: pymatgen_key}controlling which_system_extrasentries are written tostructure.properties.None(default) means no extras are written.atom_extras_map (dict[AtomExtras, str] | None) – Map of
{ts_key: pymatgen_key}controlling which_atom_extrasentries are written tostructure.site_properties.None(default) means no extras are written.
- Returns:
Pymatgen Structure objects, one per system
- Return type:
list[Structure]
- Raises:
ImportError – If Pymatgen is not installed
Notes
Output positions and cell will be in Å
Assumes periodic boundary conditions