analysis.compression_metrics.vectors

Methods for vector operations.

Functions

get_end_to_end_unit_vector(polymer_trace)

Calculate the unit vector of the end-to-end axis of a polymer trace.

get_unit_vector(vector)

Calculate the unit vector from a given vector.

get_unit_vector(vector: ndarray) ndarray[source]

Calculate the unit vector from a given vector.

Parameters:

vector – Array containing the x,y,z positions of the vector.

Returns:

Unit vector.

get_end_to_end_unit_vector(polymer_trace: ndarray) ndarray[source]

Calculate the unit vector of the end-to-end axis of a polymer trace.

Parameters:

polymer_trace – Array containing the x,y,z positions of the polymer trace.

Returns:

Unit vector of the end-to-end axis of the polymer trace.