mythos.observables.pitch ======================== .. py:module:: mythos.observables.pitch .. autoapi-nested-parse:: Pitch observable. Attributes ---------- .. autoapisummary:: mythos.observables.pitch.TARGETS mythos.observables.pitch.single_pitch_angle_mapped Classes ------- .. autoapisummary:: mythos.observables.pitch.PitchAngle Functions --------- .. autoapisummary:: mythos.observables.pitch.compute_pitch mythos.observables.pitch.single_pitch_angle Module Contents --------------- .. py:data:: TARGETS .. py:function:: compute_pitch(avg_pitch_angle: float) -> float Computes the pitch given an average pitch angle in radians. :param avg_pitch_angle: a value in radians specifying the pitch value averaged over a trajectory :type avg_pitch_angle: float :returns: the pitch value in base pairs per turn :rtype: float .. py:function:: single_pitch_angle(quartet: jax.numpy.ndarray, base_sites: jax.numpy.ndarray, back_sites: jax.numpy.ndarray, displacement_fn: collections.abc.Callable) -> mythos.utils.types.ARR_OR_SCALAR Computes the pitch angle between adjacent base pairs. .. py:data:: single_pitch_angle_mapped .. py:class:: PitchAngle Bases: :py:obj:`mythos.observables.base.BaseObservable` Computes the average pitch angle in radians for each state. The pitch is defined by (2*pi) / where is the average angle between adjacent base pairs across states :param quartets: a (n_quartets, 2, 2) array containing the pairs of adjacent base pairs for which to compute pitch angles :param displacement_fn: a function for computing displacements between two positions .. py:attribute:: quartets :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) -> mythos.utils.types.ARR_OR_SCALAR Calculate the average pitch angle in radians. :param trajectory: the trajectory to calculate the pitch for :type trajectory: jd_traj.Trajectory :returns: the average pitch angle in radians for each state, so expect a size of (n_states,) :rtype: jd_types.ARR_OR_SCALAR