jax_dna.simulators.io

Common data structures for simulator I/O.

Classes

SimulatorTrajectory

A trajectory of a simulation run.

Module Contents

class jax_dna.simulators.io.SimulatorTrajectory[source]

A trajectory of a simulation run.

rigid_body: jax_md.rigid_body.RigidBody
slice(key: int | slice) SimulatorTrajectory[source]

Slice the trajectory.

length() int[source]

Return the length of the trajectory.

Note, that this may have been more natural to implement as the built-in __len__ method. However, the chex.dataclass decorator overrides that method to be compatabile with the abc.Mapping interface

See here: https://github.com/google-deepmind/chex/blob/8af2c9e8a19f3a57d9bd283c2a34148aef952f60/chex/_src/dataclass.py#L50

__add__(other: SimulatorTrajectory) SimulatorTrajectory[source]

Concatenate two trajectories.