DeformGradMixin¶ class torch_sim.state.DeformGradMixin[source]¶ Bases: object Mixin for states that support deformation gradients. property momenta: Tensor¶ Calculate momenta from velocities and masses. Returns: The momenta of the particles property reference_row_vector_cell: Tensor¶ Get the original unit cell in terms of row vectors. deform_grad()[source]¶ Calculate the deformation gradient from original cell to current cell. Returns: The deformation gradient Return type: Tensor