How to calculate potential energy of single molecule in a box?

GROMACS version: 2019.2
GROMACS modification: No
How to calculate potential energy (PE) of single water molecule in a box. Here I want to calculate how PE changes with respect to change in the angle (H-O-H) of water. I am using below minimization.mdp file. I am trying to keep the angle fixed and trying to get potential energy by energy minimization, however, in the first energy step itself, the angle is coming back to 109.47, and the gromacs reporting the PE associated with it. What I want is PE when water have angle of say 180, 150 120 and so on. I am using GROMOS force field.
mdp file:
define = -DPOSRES
*integrator = steep *
*emtol = 0.001 *
*emstep = 0.000001 *
*nsteps = 100 *
nstxout = 1
nstcalcenergy = 1
nstenergy = 1
*pbc = xyz *
*nstlist = 1 *
*ns_type = grid *
*rlist = 1.2 *
*rcoulomb = 1.2 *
*rvdw = 1.2 *
*coulombtype = PME *
*pme_order = 4 *
fourierspacing = 0.16

I am using position restrain at all three atoms of water, of value 1000 (sometimes 10000 etc) in a hope that it will keep them fixed and do not allow the angle to change.

Is there better way of doing above procedure?

Thanks
Yogesh

All water models in GROMACS are assumed to be rigid with an internal geometry maintained by SETTLE. Your use of position restraints is fighting the constraints, and the constraints are going to win that battle. If you want to do such scans, you need to define = -DFLEXIBLE to disable SETTLE.