The gradient vector is a set of M + 6 partial derivatives of the empirical energy scoring function: M for each of the rotatable bonds in the ligand molecule (derivative w.r.t. torsional angle), three derivatives w.r.t. the angles of global rotation and three derivatives w.r.t. the components of the position vector of the molecule. Automatic differentiation was chosen over numerical differentiation to calculate the gradient, for the sake of performance.