code: def partial_transform(self, traj):
          
          x = []
          for a in self.types:
              func = getattr(md, 'compute_%s' % a)
              _, y = func(traj)
              res = vm.pdf(y[..., np.newaxis],
                           loc=self.loc, kappa=self.kappa)
              #we reshape the results using a  Fortran-like index order,
              #so that it goes over the columns first. This should put the results
              #phi dihedrals(all bin0 then all bin1), psi dihedrals(all_bin1)
              x.extend(np.reshape(res, (1, -1, self.n_bins*y.shape[1]), order='F'))
          return np.hstack(x)
docs: Featurize an MD trajectory into a vector space via calculation
          of soft-bins over dihdral angle space.
  
          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