def test_mdtraj_equivalence(): traj, ref = _random_trajs() feat = LigandRMSDFeaturizer(reference_frame=ref, align_by='custom', calculate_for='custom', align_indices=range(ref.n_atoms), calculate_indices=range(ref.n_atoms)) multi_chain = feat.transform([traj]) md_traj = md.rmsd(traj,ref,frame=0) np.testing.assert_almost_equal(multi_chain[0][:, 0], md_traj, decimal=4)
def test_single_index_rmsd(): traj, ref = _random_trajs() feat = LigandRMSDFeaturizer(reference_frame=ref, calculate_indices=[ref.n_atoms-1]) single_cindex = feat.transform([traj]) assert np.unique(single_cindex).shape[0] > 1