GROMACS functions for dihedral angles

I need the exact function using the atomic coordinates that GROMACS uses to compute the dihedral angles (and possibly, also its derivatives with respect to the coordinates). However I cannot find it in the documentation, can someone help?