* Debug the gradient *Program to check the gradient* The program compares the result of the first and last code for the gradient. Provided: | mo_num | integer | number of MOs | Internal: | n | integer | number of orbitals pairs (p,q) p threshold) then print*,v_grad(i) nb_error = nb_error + 1 if (ABS(v_grad(i)) > max_error) then max_error = v_grad(i) endif endif enddo print*,'' print*,'Check the gradient' print*,'Threshold :', threshold print*,'Nb error :', nb_error print*,'Max error :', max_error ! Deallocation deallocate(v_grad,v_grad2) end program #+END_SRC