# Error on gmx com distances

**URL:** <https://gromacs.bioexcel.eu/t/error-on-gmx-com-distances/7122>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [September 1, 2023, 7:09pm UTC](https://gromacs.bioexcel.eu/t/error-on-gmx-com-distances/7122 "2023-09-01T19:09:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![julia](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@julia](https://gromacs.bioexcel.eu/u/julia)\
**Post date:** [September 1, 2023, 7:09pm UTC](https://gromacs.bioexcel.eu/t/error-on-gmx-com-distances/7122/1 "2023-09-01T19:09:33Z")

</div>

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

Hi!

I’m doing a pulling simulation. I need to select the configurations for umbrella sampling, but the values of the com distance between my two proteins doesn’t make sense. First, I separated the frames of the trajectory using:

_gmx trjconv -s pull.tpr -f pull.xtc -o conf.gro -sep_

And I used the script on Umbrella sampling tutorial to obtain the COM distance between the two proteins in the simulation:

echo 0 | gmx trjconv -s pull.tpr -f pull.xtc -o conf.gro -sep

# compute distances

for (( i=0; i\<501; i++ ))  
do  
gmx distance -s pull.tpr -f conf${i}.gro -n index.ndx -select ‘com of group “Chain\_A” plus com of group “Chain\_B”’ -oall dist${i}.xvg  
done

# compile summary

touch summary\_distances.dat  
for (( i=0; i\<501; i++ ))  
do  
d=`tail -n 1 dist${i}.xvg | awk '{print $2}'`  
echo “{i} {d}” \>\> summary\_distances.dat  
rm dist${i}.xvg  
done

exit;

The values that I got in summary\_distances. dat were decreasing, like this:

0 3.815  
1 3.798  
2 3.889  
3 3.916  
4 3.915  
(…)  
353 3.450  
354 3.398  
355 3.372  
356 3.294  
357 3.189  
358 3.184  
359 3.210  
360 3.085  
361 3.030  
362 2.964  
363 2.878  
364 2.858  
365 2.825  
366 2.738  
367 2.702  
368 2.670  
369 2.624  
(…)  
395 1.411  
396 1.349  
397 1.287  
398 1.219  
399 1.232  
400 1.214  
401 1.145  
402 1.082  
403 1.083  
404 1.034  
405 1.006  
406 0.957  
407 0.952  
408 0.822  
409 0.829  
410 0.830  
411 0.855  
412 0.808

And this doesn’t make sense, because the proteins clearly separate around 600ps (~ frame 440). I expected the distances to increase. Does anyone know what could be going on?
