molecool_test.measure

This module is for functions that perform measurements.

Module Contents

Functions

calculate_distance(rA, rB)

Calculate the distance between two points.

calculate_angle(rA, rB, rC, degrees=False)

molecool_test.measure.calculate_distance(rA, rB)[source]

Calculate the distance between two points.

Parameters

rA, rB (np.ndarray) – The coordinates of each point.

Returns

distance – The distance between the two points.

Return type

float

Examples

>>> r1 = np.array([0, 0, 0])
>>> r2 = np.array([0, 0.1, 0])
>>> calculate_distance(r1, r2)
0.1
molecool_test.measure.calculate_angle(rA, rB, rC, degrees=False)[source]