Get the dihedral angles in proper format for gromacs?

GROMACS version: 2019.3
GROMACS modification: No
Here post your question
I have the chemical shift assignment of a protein and I can calculate the dihedral angles. Now I want to use these calculated dihedral angles as a restraint to refine protein structure and run some simulation under these constraint.
Does anyone know what is the quickest way get the dihedral angles in proper format for gromacs?

Set up dihedral restraints. See http://manual.gromacs.org/current/reference-manual/functions/restraints.html?highlight=dihedral%20restraints#dihedral-restraints for the functional form and http://manual.gromacs.org/current/reference-manual/topologies/topology-file-formats.html for implementation in your topology.