parameters: (r)
return_statement: return rot
docstring: Get optimal rotation
      note: translation will be zero when the centroids of each molecule are the
      same
docstring_summary: Get optimal rotation
      note: translation will be zero when the centroids of each molecule are the
      same
docstring_tokens: Get optimal rotation note : translation will be zero when the centroids of each molecule are the same
function: def quaternion_transform(r):
      """
      Get optimal rotation
      note: translation will be zero when the centroids of each molecule are the
      same
      """
      Wt_r = makeW(*r).T
      Q_r = makeQ(*r)
      rot = Wt_r.dot(Q_r)[:3, :3]
      return rot
function_tokens: def quaternion_transform ( r ) : Wt_r = makeW ( * r ) . T Q_r = makeQ ( * r ) rot = Wt_r . dot ( Q_r ) [ : 3 , : 3 ] return rot