Let α h be the torsional angle of the h-th rotatable bond of the ligand molecule, and T = T k (a i , a j , r ij ) be the k-the term of the Vinardo scoring function for i-th atom of ligand and jth atom of protein. Then the partial derivative of the term w.r.t the angle, expressed via r ij = r i -r j (where r i and r j are positions of the corresponding atoms), is: