Molecular gradients for the second-order generalized Van Vleck variant of multireference perturbation theory