# MSD for center of mass

**URL:** <https://gromacs.bioexcel.eu/t/msd-for-center-of-mass/2676>\
**Category:** User discussions\
**Created:** [August 12, 2021, 3:09pm UTC](https://gromacs.bioexcel.eu/t/msd-for-center-of-mass/2676 "2021-08-12T15:09:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckosgal](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@ckosgal](https://gromacs.bioexcel.eu/u/ckosgal)\
**Post date:** [August 12, 2021, 3:09pm UTC](https://gromacs.bioexcel.eu/t/msd-for-center-of-mass/2676/1 "2021-08-12T15:09:01Z")

</div>

GROMACS version:  
GROMACS modification: No  
Hi all,

I am new to GROMACS. I am currently doing analysis for my system and trying to run MSD analysis. I want to do MSD for COM of my molecules (150 molecules in my system with varying number of atoms in each molecule). It states I need to run  
gmx msd [**-o** _[\<.xvg\>]_ ] [**-mol** _[\<.xvg\>]_ ] [**-pdb** _[\<.pdb\>]_ ] [**-b**]

I am a little confused about how to run this and how to get the file (i think it’s diff\_mol.xvg) which has the index for start and end atoms for each molecule (or how it should be).  
I haven’t specified the molecules at the beginning (Should it come when building the system? if so how do you do it?).

Thank you  
Best  
ckosgal

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [August 17, 2021, 8:18am UTC](https://gromacs.bioexcel.eu/t/msd-for-center-of-mass/2676/2 "2021-08-17T08:18:04Z")

</div>

Hi,  
the option -o -mol -pdb -b are just output options, to run you need to provide input files.  
To provide input file you can use -f for trajectory file from your simulation  
-s tpr file for structure and mass information  
-n index file where you define specific group for the analysis.  
Best regards  
Alessandra
