To speed up calculations, we construct a rotation tree for the ligand. The vertices of the rotation tree are rigid fragments and the edges are rotational bonds. The rotation of a point r w.r.t. the h-th (rotatable) bond with an origin o h is a linear transformation (which we denote A h ) and is calculated as follows: