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 batches. Global properties are taken from the first state, and per-atom and per-batch properties are concatenated.

Parameters:
  • states (list[SimState]) – A list of SimState objects to concatenate

  • device (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 batches

Return type:

SimState

Raises: