mythos.simulators.jax_md
jax_md sampler implementation for mythos.
Submodules
Classes
A sampler based on running a jax_md simulation routine. |
|
Neighbor list for managing unbonded neighbors. |
|
A dummy neighbor list that does nothing. |
|
This is a protocol to help with typing. |
|
Static parameters for the simulator. |
Package Contents
- class mythos.simulators.jax_md.JaxMDSimulator[source]
Bases:
mythos.simulators.base.SimulatorA sampler based on running a jax_md simulation routine.
- energy_fn: mythos.energy.base.EnergyFunction
- simulator_params: mythos.simulators.jax_md.utils.StaticSimulatorParams
- space: jax_md.space.Space
- simulator_init: collections.abc.Callable[[collections.abc.Callable, collections.abc.Callable], jax_md.simulate.Simulator]
- class mythos.simulators.jax_md.NeighborList[source]
Bases:
NeighborHelperNeighbor list for managing unbonded neighbors.
- displacement_fn: collections.abc.Callable
- topology: mythos.input.topology.Topology
- box_size: jax.numpy.ndarray
- init_positions: jax_md.rigid_body.RigidBody
- property idx: jax.numpy.ndarray
Return the indices of the unbonded neighbors.
- allocate(locs: jax_md.rigid_body.RigidBody) NeighborList[source]
Allocate memory for the neighbor list.
- update(locs: jax_md.rigid_body.RigidBody) NeighborList[source]
Update the neighbor list.
- class mythos.simulators.jax_md.NoNeighborList[source]
Bases:
NeighborHelperA dummy neighbor list that does nothing.
- unbonded_nbrs: jax.numpy.ndarray
- property idx: jax.numpy.ndarray
Return the indices of the unbonded neighbors.
- allocate(locs: jax_md.rigid_body.RigidBody) NoNeighborList[source]
Allocate memory for the neighbor list.
- update(locs: jax_md.rigid_body.RigidBody) NoNeighborList[source]
Update the neighbor list.
- class mythos.simulators.jax_md.SimulationState[source]
Bases:
ProtocolThis is a protocol to help with typing.
Every state implements at least position and mass. More info about the specific states can be found here:
https://github.com/jax-md/jax-md/blob/main/jax_md/simulate.py
- position: jax_md.rigid_body.RigidBody
- mass: jax_md.rigid_body.RigidBody
- class mythos.simulators.jax_md.StaticSimulatorParams[source]
Static parameters for the simulator.
- seq: mythos.utils.types.Arr_Nucleotide
- mass: jax_md.rigid_body.RigidBody
- gamma: jax_md.rigid_body.RigidBody
- bonded_neighbors: jax.numpy.ndarray
- property sim_init_fn: collections.abc.Callable
Return the simulator init function.