initialize_state

torch_sim.state.initialize_state(system, device, dtype)[source]

Initialize state tensors from a atomistic system representation.

Converts various atomistic system representations (ASE Atoms, pymatgen Structure, PhonopyAtoms, or existing SimState) to a SimState object.

Parameters:
  • system (StateLike) – Input system to convert to state tensors

  • device (device) – Device to create tensors on

  • dtype (dtype) – Data type for tensor values

Returns:

State representation initialized from input system

Return type:

SimState

Raises:
  • ValueError – If system type is not supported or if list items have inconsistent

  • types