Force fluctuation calculation using constraint simulation in pull code?

GROMACS version: 2020.1
GROMACS modification: Yes/No
Here post your question

I want to calculate average constraint force for each distance and these average forces were numerically integrated to calculate the potential of mean force.
I am using pull code mdp options:
; Pull code
pull = yes
pull_ncoords = 1 ; only one reaction coordinate
pull_ngroups = 2 ; two groups defining one reaction coordinate
pull_group1_name = PDMS
pull_group2_name = DMPC
pull-group1-pbcatom = 16865
pull-group2-pbcatom = 7955
pull-pbc-ref-prev-step-com = yes
pull_coord1_type = constraint ; harmonic potential
pull_coord1_geometry = distance ; simple distance increase
pull_coord1_dim = N N Y
pull_coord1_groups = 1 2
pull_coord1_start = no ; define initial COM distance > 0
pull_coord1_init = 3.242 ; 0.01 nm per ps = 10 nm per ns
pull_nstxout = 1
pull_nstfout = 1

But this is not giving correct results.

Can someone help me to do this calculation?

You have not provided any information on what goes wrong, so we can not provide any help.

Is one of the two groups a membrane? If yes, then you should use pull_coord1_geometry=cylinder and umbrella sampling instead of a constraint.

I want to calculate constraint force fluctuations at each distance to calculate the diffusion coefficient.
I am attaching a paper related to this.
https://doi.org/10.1021/acsomega.1c04684

You still don’t state what goes wrong.