msmbuilder.metrics.baseclasses.AbstractDistanceMetric.one_to_all¶
- AbstractDistanceMetric.one_to_all(prepared_traj1, prepared_traj2, index1)[source]¶
Calculate the vector of distances from the index1th frame of prepared_traj1 to all of the frames in prepared_traj2.
Parameters: prepared_traj1 : prepared_trajectory
First prepared trajectory
prepared_traj2 : prepared_trajectory
Second prepared trajectory
index1 : int
index in prepared_trajectory
Returns: distances : ndarray
vector of distances of length len(prepared_traj2)
Notes
Although this might seem to be a special case of one_to_many(), it can often be implemented in a much more optimized way because it doesn’t require construction of the indices2 array and array slicing in python is kindof slow.