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 tensorsdevice (
torch.device) – Device to create tensors ondtype (
torch.dtype) – Data type for tensor values
- Returns:
State representation initialized from input system
- Return type:
- Raises:
ValueError – If system type is not supported or if list items have inconsistent
types –