mythos.observables.diameter =========================== .. py:module:: mythos.observables.diameter .. autoapi-nested-parse:: Diameter observable. Attributes ---------- .. autoapisummary:: mythos.observables.diameter.TARGETS mythos.observables.diameter.ERR_DISPLACEMENT_FN_REQUIRED mythos.observables.diameter.single_diameter_mapped Classes ------- .. autoapisummary:: mythos.observables.diameter.Diameter Functions --------- .. autoapisummary:: mythos.observables.diameter.single_diameter Module Contents --------------- .. py:data:: TARGETS .. py:data:: ERR_DISPLACEMENT_FN_REQUIRED :value: 'A displacement function is required for computing the helical diameter.' .. py:function:: 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 Computes the helical diameter of a base pair. :param bp: a 2-dimensional array containing the indices of the h-bonded nucleotides :type bp: jnp.ndarray :param back_sites: a 2-dimensional array containing the positions of the backbone sites :type back_sites: jnp.ndarray :param displacement_fn: a function for computing displacements between two positions :type displacement_fn: Callable :param sigma_backbone: the excluded volume distance between backbone sites :type sigma_backbone: float :returns: the helical diameter in Angstroms for each base pair :rtype: jd_types.ARR_OR_SCALAR .. py:data:: single_diameter_mapped .. py:class:: Diameter Bases: :py:obj:`mythos.observables.base.BaseObservable` Computes 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 .. py:attribute:: h_bonded_base_pairs :type: jax.numpy.ndarray .. py:attribute:: displacement_fn :type: collections.abc.Callable .. py:method:: __post_init__() -> None Validate the input. .. py:method:: __call__(trajectory: mythos.simulators.io.SimulatorTrajectory, sigma_backbone: float) -> mythos.utils.types.ARR_OR_SCALAR Calculate the average helical diameter in Angstroms. :param trajectory: the trajectory to calculate the helical diameter for :type trajectory: jd_traj.Trajectory :param sigma_backbone: the excluded volume distance between backbone sites :type sigma_backbone: float :returns: the average helical diameter in Angstroms for each state, so expect a size of (n_states,) :rtype: jd_types.ARR_OR_SCALAR