mythos.observables.diameter
Diameter observable.
Attributes
Classes
Computes the helical diameter for each state. |
Functions
|
Computes the helical diameter of a base pair. |
Module Contents
- mythos.observables.diameter.TARGETS
- mythos.observables.diameter.ERR_DISPLACEMENT_FN_REQUIRED = 'A displacement function is required for computing the helical diameter.'
- mythos.observables.diameter.single_diameter(bp: jax.numpy.ndarray, back_sites: jax.numpy.ndarray, displacement_fn: collections.abc.Callable, sigma_backbone: float) mythos.utils.types.ARR_OR_SCALAR[source]
Computes the helical diameter of a base pair.
- Parameters:
bp (jnp.ndarray) – a 2-dimensional array containing the indices of the h-bonded nucleotides
back_sites (jnp.ndarray) – a 2-dimensional array containing the positions of the backbone sites
displacement_fn (Callable) – a function for computing displacements between two positions
sigma_backbone (float) – the excluded volume distance between backbone sites
- Returns:
the helical diameter in Angstroms for each base pair
- Return type:
jd_types.ARR_OR_SCALAR
- mythos.observables.diameter.single_diameter_mapped
- class mythos.observables.diameter.Diameter[source]
Bases:
mythos.observables.base.BaseObservableComputes the helical diameter for each state.
The helical diameter for a given base pair is defined as the furthest extent of the excluded volume. The diameter per state is the average over all (specified) base pairs.
Args: - bp: a 2-dimensional array containing the indices of the h-bonded nucleotides - displacement_fn: a function for computing displacements between two positions
- h_bonded_base_pairs: jax.numpy.ndarray
- displacement_fn: collections.abc.Callable
- __call__(trajectory: mythos.simulators.io.SimulatorTrajectory, sigma_backbone: float) mythos.utils.types.ARR_OR_SCALAR[source]
Calculate the average helical diameter in Angstroms.
- Parameters:
trajectory (jd_traj.Trajectory) – the trajectory to calculate the helical diameter for
sigma_backbone (float) – the excluded volume distance between backbone sites
- Returns:
the average helical diameter in Angstroms for each state, so expect a size of (n_states,)
- Return type:
jd_types.ARR_OR_SCALAR