mythos.observables.pitch

Pitch observable.

Attributes

TARGETS

single_pitch_angle_mapped

Classes

PitchAngle

Computes the average pitch angle in radians for each state.

Functions

compute_pitch(→ float)

Computes the pitch given an average pitch angle in radians.

single_pitch_angle(→ mythos.utils.types.ARR_OR_SCALAR)

Computes the pitch angle between adjacent base pairs.

Module Contents

mythos.observables.pitch.TARGETS
mythos.observables.pitch.compute_pitch(avg_pitch_angle: float) float[source]

Computes the pitch given an average pitch angle in radians.

Parameters:

avg_pitch_angle (float) – a value in radians specifying the pitch value averaged over a trajectory

Returns:

the pitch value in base pairs per turn

Return type:

float

mythos.observables.pitch.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[source]

Computes the pitch angle between adjacent base pairs.

mythos.observables.pitch.single_pitch_angle_mapped
class mythos.observables.pitch.PitchAngle[source]

Bases: mythos.observables.base.BaseObservable

Computes the average pitch angle in radians for each state.

The pitch is defined by (2*pi) / <angle> where <angle> is the average angle between adjacent base pairs across states

Parameters:
  • quartets – a (n_quartets, 2, 2) array containing the pairs of adjacent base pairs for which to compute pitch angles

  • displacement_fn – a function for computing displacements between two positions

quartets: jax.numpy.ndarray
displacement_fn: collections.abc.Callable
__post_init__() None[source]

Validate the input.

__call__(trajectory: mythos.simulators.io.SimulatorTrajectory) mythos.utils.types.ARR_OR_SCALAR[source]

Calculate the average pitch angle in radians.

Parameters:

trajectory (jd_traj.Trajectory) – the trajectory to calculate the pitch for

Returns:

the average pitch angle in radians for each state, so expect a size of (n_states,)

Return type:

jd_types.ARR_OR_SCALAR