msmbuilder.metrics.Dihedral.prepare_trajectory

Dihedral.prepare_trajectory(trajectory)

Prepare the dihedral angle representation of a trajectory, suitable for distance calculations.

Parameters:

trajectory : msmbuilder.Trajectory

An MSMBuilder trajectory to prepare

Returns:

projected_angles : ndarray

A 2D array of dimension len(trajectory) x (2*number of dihedral angles per frame), such that in each row, the first half of the entries contain the cosine of the dihedral angles and the later dihedral angles contain the sine of the dihedral angles. This transform is necessary so that distance calculations preserve the periodic symmetry.