code: def kabsch_rmsd(P, Q, translate=False):
      
      if translate:
          Q = Q - centroid(Q)
          P = P - centroid(P)
  
      P = kabsch_rotate(P, Q)
      return rmsd(P, Q)
docs: Rotate matrix P unto Q using Kabsch algorithm and calculate the RMSD.
  
      Parameters
      ----------
      P : array
          (N,D) matrix, where N is points and D is dimension.
      Q : array
          (N,D) matrix, where N is points and D is dimension.
      translate : bool
          Use centroids to translate vector P and Q unto each other.
  
      Returns
      -------
      rmsd : float
          root-mean squared deviation