generate_swaps¶ torch_sim.monte_carlo.generate_swaps(state, generator=None)[source]¶ Generate atom swaps for a given batched system. Generates proposed swaps between atoms of different types within the same batch. The function ensures that swaps only occur between atoms with different atomic numbers. Parameters: state (SimState) – The simulation state generator (Generator | None, optional) – Random number generator for reproducibility. Defaults to None. Returns: A tensor of proposed swaps with shape [n_batches, 2],where each row contains indices of atoms to be swapped Return type: Tensor