How can i get the relation between free-energy and distance with gromacs?

how can I get the relation between the free energy with distance or which I command I need to use in gromacs , please

This is not some simple command. One has to do a series of calculations (e.g. umbrella sampling) and use WHAM to debias the data and produce the free energy profile.

i got a file FES_rgyr_rmsd.dat that contains the free energies for different values of Rgyr and RMSD from this command python -f rgyr_rmsd.dat -o rgyr_rmsd.png -t 298 -bx 100 -by 100 -lx "Rgyr [nm]" -ly "RMSD [nm]" but couldn’t figure the distance

I don’t know what is; it’s not a GROMACS utility. One can Boltzmann weight any quantity they like to generate a relative free energy but I do not think that is what you showed in the original image, which appears to be a PMF. If you need more guidance on this, please be more descriptive in what you’re trying to do and what the original image conveys.

I’m trying to find the most stable conformation structure for my cycle peptide so i want to get the free energy profile as a function of backbone rmsd after finishing REMD simulation like the following figure

This appears to just be Boltzmann weighting of RMSD relative to some arbitrary point. If it comes from a published paper, ask the authors how they did it.