# Understanding the cut in gmx clustsize

**URL:** <https://gromacs.bioexcel.eu/t/understanding-the-cut-in-gmx-clustsize/89>\
**Category:** User discussions\
**Created:** [May 8, 2020, 10:07am UTC](https://gromacs.bioexcel.eu/t/understanding-the-cut-in-gmx-clustsize/89 "2020-05-08T10:07:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Teslim](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Teslim](https://gromacs.bioexcel.eu/u/Teslim)\
**Post date:** [May 8, 2020, 10:07am UTC](https://gromacs.bioexcel.eu/t/understanding-the-cut-in-gmx-clustsize/89/1 "2020-05-08T10:07:12Z")

</div>

GROMACS version: 2018  
GROMACS modification: No  
Welcome to a new world!

I am trying to use the gmx clustsize tool but can’t get around the basis for selecting the best largest distance (nm) to be considered in a cluster. I have command that looks as follows:

gmx\_mpi clustsize -f …/polymer.nojump.mol.xtc -n polymer.ndx -s polymer.tpr -mol yes -cut 0.35 -pbc yes

I read on a page ([https://www.researchgate.net/post/how\_can\_I\_measure\_the\_cluster\_size\_between\_center\_of\_mass](https://www.researchgate.net/post/how_can_I_measure_the_cluster_size_between_center_of_mass)) that one must measure the average size of your molecules before putting “-cut” value in your computation. Kindly advise on the procedure to select the best -cut value. Thank you!

---

<div class="post-metadata">

**Author:** ![cblau](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/cblau/32/5_2.png) [@cblau](https://gromacs.bioexcel.eu/u/cblau)\
**Post date:** [May 8, 2020, 12:01pm UTC](https://gromacs.bioexcel.eu/t/understanding-the-cut-in-gmx-clustsize/89/2 "2020-05-08T12:01:15Z")

</div>

Hi Teslim,  
Welcome as well!

Maybe it by looking into how the clustering works in this case:

First, all atoms or molecules (depending on `-mol`) are assigned their own cluster, then all clusters are compared against all other clusters and if any two atoms in the two different clusters are closer than the `-cut` distance, they will be merged.

In this way, the input you should choose for this option depends on what you want to define as a cluster. It is reasonable to choose `-cut` to be roughly your molecule size, because an analysis with this setting will most closely reflect your intuitive understanding of what a cluster should be.

If `-cut` is very small, you will see as many clusters as molecules, because they will never get merged.

If `-cut` is much larger than the molecule size, you will see molecules that are more than a molecule size apart in the same cluster; which most of us intuitively will translate as them being too far apart.

---

<div class="post-metadata">

**Author:** ![Teslim](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Teslim](https://gromacs.bioexcel.eu/u/Teslim)\
**Post date:** [May 8, 2020, 2:14pm UTC](https://gromacs.bioexcel.eu/t/understanding-the-cut-in-gmx-clustsize/89/3 "2020-05-08T14:14:40Z")

</div>

Thank you very much for the detailed response. Based on your reply, it is better to set the -cut to be roughly same as the molecule size. I am short of approach on how to determine the size of the molecule. Kindly help accordingly.

PS: In the preliminary phase of my analysis, I have calculated the end-to-end distance between the polymer backbone. Will that suffice as the molecule size?

---

<div class="post-metadata">

**Author:** ![cblau](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/cblau/32/5_2.png) [@cblau](https://gromacs.bioexcel.eu/u/cblau)\
**Post date:** [May 8, 2020, 4:50pm UTC](https://gromacs.bioexcel.eu/t/understanding-the-cut-in-gmx-clustsize/89/4 "2020-05-08T16:50:34Z")

</div>

Hi Teslim,

The end-to-end distance should be just fine.

Another strategy would be to run the algorithm a couple of times with different `-cut` settings to see how they affect your results.

---

<div class="post-metadata">

**Author:** ![Teslim](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Teslim](https://gromacs.bioexcel.eu/u/Teslim)\
**Post date:** [May 8, 2020, 5:00pm UTC](https://gromacs.bioexcel.eu/t/understanding-the-cut-in-gmx-clustsize/89/5 "2020-05-08T17:00:07Z")

</div>

Big thanks. The available end-to-end value was calculated using only one polymer chain (Nmol - 1). But the system that i wish to implement clustsize on has more than one polymer chain (Nmol ranges between 7 and 20). Will the end-to-end distance (avg values) calculated from the one polymer chain be okay to use as the cut?

---

<div class="post-metadata">

**Author:** ![cblau](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/cblau/32/5_2.png) [@cblau](https://gromacs.bioexcel.eu/u/cblau)\
**Post date:** [May 11, 2020, 8:11am UTC](https://gromacs.bioexcel.eu/t/understanding-the-cut-in-gmx-clustsize/89/6 "2020-05-11T08:11:51Z")

</div>

Yes, that should be a good value. I suggest, if you can, visualize the clusters - you will literally see if the value you set makes sense.

---

<div class="post-metadata">

**Author:** ![Teslim](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Teslim](https://gromacs.bioexcel.eu/u/Teslim)\
**Post date:** [May 12, 2020, 4:34pm UTC](https://gromacs.bioexcel.eu/t/understanding-the-cut-in-gmx-clustsize/89/7 "2020-05-12T16:34:45Z")

</div>

Thank you very much
