pdb2sql.transform.rotate

pdb2sql.transform.rotate(xyz, rot_mat, center=None)[source]

Rotate xyz from a rotation matrix.

Parameters
  • xyz (np.ndarray) – x,y,z coordinates

  • rot_mat (np.ndarray) – rotation matrix

  • center (list or np.ndarray, optional) – rotation center. Defaults to None, i.e. using molecule center as rotation center.

Raises

TypeError – Rotation center must be list or 1D np.ndarray.

Returns

np.ndarray – x,y,z coordinates after rotation