Extract Temperature of a group

gmx traj -ot gives the system temperature (not corrected for constraints). Then you can apply the correction:

T_real = T_calc * [natoms / (natoms - nconstraints)]