mythos.observables.bond_distances
Observable for computing bond distances from a Martini trajectory.
Classes
Observable for computing bond distances for a single bond name. |
|
Observable for computing bond distances for multiple bond names. |
Functions
|
Compute the distance between a bonded pair of atoms. |
Module Contents
- mythos.observables.bond_distances._bond_distance(centers: jax.numpy.ndarray, pair: jax.numpy.ndarray, displacement_fn: collections.abc.Callable) float[source]
Compute the distance between a bonded pair of atoms.
- class mythos.observables.bond_distances.BondDistances[source]
Observable for computing bond distances for a single bond name.
Given a
MartiniTopologyand a bond name, this observable computes pairwise distances for all matching bonds across the trajectory.- topology
The Martini topology containing bond information.
- bond_name
Bond name string to compute distances for. Has the form
RESIDUE_BEAD1_BEAD2(e.g."DMPC_GL1_GL2"). All bonds in the topology matching this name will be included in the output.
- displacement_fn
Factory that, given a box size vector, returns a displacement function respecting periodic boundary conditions.
- displacement_fn: collections.abc.Callable
- __call__(trajectory: mythos.simulators.io.SimulatorTrajectory) jax.numpy.ndarray[source]
Compute bond distances for the requested bond name.
- Parameters:
trajectory – A
SimulatorTrajectorywhosecenterhas shape(n_states, n_atoms, 3)andbox_sizehas shape(n_states, 3).- Returns:
Distance array of shape
(n_states, n_matching_bonds).
- class mythos.observables.bond_distances.BondDistancesMapped[source]
Observable for computing bond distances for multiple bond names.
Given a
MartiniTopologyand a set of bond names, this observable computes pairwise distances for all matching bonds across the trajectory, returning a dictionary keyed by bond name.- topology
The Martini topology containing bond information.
- bond_names
Tuple of bond name strings to compute distances for. Each name has the form
RESIDUE_BEAD1_BEAD2(e.g."DMPC_GL1_GL2"). All bonds in the topology matching a given name will be included in the output.
- displacement_fn
Factory that, given a box size vector, returns a displacement function respecting periodic boundary conditions.
- displacement_fn: collections.abc.Callable
- __call__(trajectory: mythos.simulators.io.SimulatorTrajectory) dict[str, jax.numpy.ndarray][source]
Compute bond distances for each requested bond name.
- Parameters:
trajectory – A
SimulatorTrajectorywhosecenterhas shape(n_states, n_atoms, 3)andbox_sizehas shape(n_states, 3).- Returns:
Dictionary mapping each bond name to a distance array of shape
(n_states, n_matching_bonds).