PatchDock outputs a ligand transformation that transforms the ligand onto the receptor. The transformation is specified by 3 rotational and 3 translational parameters. The rotation in PatchDock is in XYZ notation. The rotation matrix from the 3 rotation angles (x,y,z) is:
real cx = cos(x) real cy = cos(y) real cz = cos(z)
real sx = sin(x) real sy = sin(y) real sz = sin(z)
(cz*cy, -sy*sx*cz - sz*cx, -sy*cx*cz + sz*sx)
M = (sz*cy, -sy*sx*sz + cx*cz, -sy*cx*sz - sx*cz)
(sy, cy*sx, cy*cx )
Now use the matrix M to apply the whole transformation (rotation and translation t) on a ligand coordinate v:
transformed_v = M*v + t