code: def partial_transform(self, traj):
          
          traj.superpose(self.reference_traj,
                         atom_indices=self.superpose_atom_indices)
          diff2 = (traj.xyz[:, self.atom_indices] -
                   self.reference_traj.xyz[0, self.atom_indices]) ** 2
          x = np.sqrt(np.sum(diff2, axis=2))
          return x
docs: Featurize an MD trajectory into a vector space via distance
          after superposition
  
          Parameters
          ----------
          traj : mdtraj.Trajectory
              A molecular dynamics trajectory to featurize.
  
          Returns
          -------
          features : np.ndarray, dtype=float, shape=(n_samples, n_features)
              A featurized trajectory is a 2D array of shape
              `(length_of_trajectory x n_features)` where each `features[i]`
              vector is computed by applying the featurization function
              to the `i`th snapshot of the input trajectory.
  
          See Also
          --------
          transform : simultaneously featurize a collection of MD trajectories