mythos.observables.rmse

RMSE observable.

Attributes

ERR_SINGLE_TARGET_STATE_REQUIRED

ERR_TARGET_STATE_DIM

THREE_DIMENSIONS

N_DIMS_NUCLEOTIDES_POSITION

Classes

RMSE

Computes the RMSE with respect to a target configuration for each state.

Functions

svd_align(→ tuple[jax.numpy.ndarray, ...)

Aligns a set of 3D coordinates to a reference configuration via SVD.

single_rmse(→ mythos.utils.types.ARR_OR_SCALAR)

Computes the RMSE between a state and a target configuration.

Module Contents

mythos.observables.rmse.svd_align(ref_coords: jax.numpy.ndarray, coords: jax.numpy.ndarray) tuple[jax.numpy.ndarray, jax.numpy.ndarray, jax.numpy.ndarray][source]

Aligns a set of 3D coordinates to a reference configuration via SVD.

mythos.observables.rmse.single_rmse(target: jax_md.rigid_body.RigidBody, state_nts: mythos.energy.dna1.nucleotide.Nucleotide) mythos.utils.types.ARR_OR_SCALAR[source]

Computes the RMSE between a state and a target configuration.

mythos.observables.rmse.ERR_SINGLE_TARGET_STATE_REQUIRED = 'the target state must be a single conformation'
mythos.observables.rmse.ERR_TARGET_STATE_DIM = 'the target state must have center positions in (x, y, z) format'
mythos.observables.rmse.THREE_DIMENSIONS = 3
mythos.observables.rmse.N_DIMS_NUCLEOTIDES_POSITION = 2
class mythos.observables.rmse.RMSE[source]

Bases: mythos.observables.base.BaseObservable

Computes the RMSE with respect to a target configuration for each state.

Args: - target_state: a rigid body specifying the target configuration

target_state: jax_md.rigid_body.RigidBody
__post_init__() None[source]

Validate the input.

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

Calculate the RMSE in Angstroms.

Parameters:

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

Returns:

the RMSE in Angstroms for each state, so expect a size of (n_states,)

Return type:

jd_types.ARR_OR_SCALAR