concatenate_states¶
- torch_sim.state.concatenate_states(states, device=None)[source]¶
Concatenate a list of SimStates into a single SimState.
Combines multiple states into a single state with multiple systems. Global properties are taken from the first state, and per-atom and per-system properties are concatenated.
- Parameters:
states (
Sequence[SimState]) – A list of SimState objects to concatenatedevice (
torch.device, optional) – The device to place the concatenated state on. Defaults to the device of the first state.
- Returns:
A new SimState containing all input states as separate systems
- Return type:
- Raises:
ValueError – If states is empty
TypeError – If not all states are of the same type