# Is that possible to update the hbond calculation without generating a new trajectory file?

**URL:** https://gromacs.bioexcel.eu/t/is-that-possible-to-update-the-hbond-calculation-without-generating-a-new-trajectory-file/4156
**Category:** User discussions
**Tags:** mdrun, analysis-tools
**Created:** [May 12, 2022, 4:52am UTC](https://gromacs.bioexcel.eu/t/is-that-possible-to-update-the-hbond-calculation-without-generating-a-new-trajectory-file/4156 "2022-05-12T04:52:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![liuwq](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@liuwq](https://gromacs.bioexcel.eu/u/liuwq)
#### Post date: [May 12, 2022, 4:52am UTC](https://gromacs.bioexcel.eu/t/is-that-possible-to-update-the-hbond-calculation-without-generating-a-new-trajectory-file/4156/1 "2022-05-12T04:52:54Z")

</div>

GROMACS version: 2018.8  
Hello,  
I have finished my simulations. I used a low frequency to output the `.xtc` trajectory file, otherwise the size of the trajectory files would be too large for me to store on the hard disk since the number of my simulations is a little large. But I found that in this case, when I use the `hbond` to get the hbond numbers, the output frequency is also too low since it is the same as the trajectory file.  
I want to increase the output frequency of the hbond information. I am wondering whether it is possible to do the hbond analysis without generating a new trajectory file? Or I must rerun the simulation and generate a new trajectory file with increased output frequency?  
Any help would be much appreciated!

---

<div class="post-metadata">

### Author: ![pjohansson](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pjohansson/32/316_2.png) [@pjohansson](https://gromacs.bioexcel.eu/u/pjohansson)
#### Post date: [May 12, 2022, 7:34am UTC](https://gromacs.bioexcel.eu/t/is-that-possible-to-update-the-hbond-calculation-without-generating-a-new-trajectory-file/4156/2 "2022-05-12T07:34:53Z")

</div>

Hi,

If the analysis requires more frames you will have to rerun with more frequent output.

If you know which groups you will perform the analysis on (and it’s not the entire system), you could save space by writing the `.xtc` information for them only at a high frequency. [Use the `compressed-x-grps` option in your `.mdp` file.](https://manual.gromacs.org/documentation/current/user-guide/mdp-options.html#mdp-compressed-x-grps) If needed, you can also get the full system trajectory at a lower frequency by setting `nstxout` to a lower frequency. This writes a `.trr` file.

Regards,  
Petter

---

<div class="post-metadata">

### Author: ![liuwq](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@liuwq](https://gromacs.bioexcel.eu/u/liuwq)
#### Post date: [May 12, 2022, 12:05pm UTC](https://gromacs.bioexcel.eu/t/is-that-possible-to-update-the-hbond-calculation-without-generating-a-new-trajectory-file/4156/3 "2022-05-12T12:05:51Z")

</div>

Hello,  
Thank you very much for the reply!  
Sorry, I do not understand the last part of your reply.

> > If needed, you can also get the full system trajectory at a lower frequency by setting `nstxout` to a lower frequency. This writes a `.trr` file.

Do you mean for the whole system I use a low frequency to output `.trr` trajectory? and for the groups that will do `hbond` analysis, I use a higher frequency to output `.xtc` trajectory?  
Thanks very much in advance!

---

<div class="post-metadata">

### Author: ![pjohansson](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pjohansson/32/316_2.png) [@pjohansson](https://gromacs.bioexcel.eu/u/pjohansson)
#### Post date: [May 13, 2022, 5:19am UTC](https://gromacs.bioexcel.eu/t/is-that-possible-to-update-the-hbond-calculation-without-generating-a-new-trajectory-file/4156/4 "2022-05-13T05:19:12Z")

</div>

Yes, precisely – if you also want the full system trajectories but don’t need that at the same output frequency. But if you don’t care about that, setting `nstxout-compressed` is sufficient. Example:

```nohighlight
nstxout = 1000000 ; 
nstxout-compressed = 5000 ; frequent output of protein only for analysis
compressed-x-grps = Protein ;

```

---

<div class="post-metadata">

### Author: ![liuwq](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@liuwq](https://gromacs.bioexcel.eu/u/liuwq)
#### Post date: [May 14, 2022, 3:25pm UTC](https://gromacs.bioexcel.eu/t/is-that-possible-to-update-the-hbond-calculation-without-generating-a-new-trajectory-file/4156/5 "2022-05-14T15:25:19Z")

</div>

Hello,  
Thank you very much for the explanation!  
The `.trr` file would be too large for me. I think I will not use the information of velocity, so I guess I only need `.xtc` files at this moment.  
Even the output `.xtc` file at a low frequency is too much for me since I have many paralleled simulations.
