# GMX Polystat MSID

**URL:** <https://gromacs.bioexcel.eu/t/gmx-polystat-msid/13322>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [March 24, 2026, 12:16pm UTC](https://gromacs.bioexcel.eu/t/gmx-polystat-msid/13322 "2026-03-24T12:16:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SamE2001](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@SamE2001](https://gromacs.bioexcel.eu/u/SamE2001)\
**Post date:** [March 24, 2026, 12:16pm UTC](https://gromacs.bioexcel.eu/t/gmx-polystat-msid/13322/1 "2026-03-24T12:16:01Z")

</div>

GROMACS version: 2024.3  
GROMACS modification: No

Hi all,

I’ve recently been working with polymer systems of a reasonably small size (~50,000 atoms) and computing various statistics to determine if they reach some equilibrium state. One metric that I’ve been trying to use is the MSID, I found that gmx polystat has this option and allows for an index file.

The goal is to get the MSID for the polymer backbone averaged over all the chains in the system.

I’ve found that even when supplying an index file that I don’t get the MSID of just the carbon-carbon backbone but also of all the distances for the carbon-hydrogens as well.

My example system used to verify this was an OPLS-AA polyethylene system with 40 Carbons, 80 Hydrogens

If I provide an index file that contains just the first and last carbon of a chain, or all the carbons on the chain I get identical msid files with 116 separations (which includes the hydrogens). If I perform the same analysis using an index file that also includes all the hydrogens I get 121 separations and a very similar curve.

Is there a way for me to get the MSID of just the polymer backbone within GROMACS currently?

Thanks!

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [March 25, 2026, 9:59am UTC](https://gromacs.bioexcel.eu/t/gmx-polystat-msid/13322/2 "2026-03-25T09:59:00Z")

</div>

I wasn’t aware of this issue. I think I am the one who wrote this functionality, long ago. I wrote a fix. You can download the corrected source file here:

> **[Make gmx polystat -i use only indexed particles (!5871) · Merge requests ·...](https://gitlab.com/gromacs/gromacs/-/merge_requests/5871)**
>
> Fixes

---

<div class="post-metadata">

**Author:** ![SamE2001](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@SamE2001](https://gromacs.bioexcel.eu/u/SamE2001)\
**Post date:** [March 25, 2026, 10:22am UTC](https://gromacs.bioexcel.eu/t/gmx-polystat-msid/13322/3 "2026-03-25T10:22:31Z")

</div>

Hi,

Thank you so much, I’ll try this out now. This likely will fix the small issues that we having with our plots.

Sam

---

<div class="post-metadata">

**Author:** ![SamE2001](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@SamE2001](https://gromacs.bioexcel.eu/u/SamE2001)\
**Post date:** [March 25, 2026, 6:19pm UTC](https://gromacs.bioexcel.eu/t/gmx-polystat-msid/13322/4 "2026-03-25T18:19:16Z")

</div>

This worked beautifully, only final thing to note is that when the xvg file is printed out, all the other pairs are still listed but with distance 0, this obviously is a non-issue depending on the way you plot. However, I’m unsure if that’s the desired output for this tool.

For example I’ve attached the MSID curve for a toy system.

Thank you again

[msid\_new.xvg](https://gromacs.bioexcel.eu/uploads/short-url/eI60BygHWxKMDqLXOiMDwOUVI61.xvg) (5.4 KB)

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [March 25, 2026, 7:58pm UTC](https://gromacs.bioexcel.eu/t/gmx-polystat-msid/13322/5 "2026-03-25T19:58:56Z")

</div>

Thanks for the feedback. I missed that. Should be fixed now.
