# Rename output file of gmx hbond

**URL:** <https://gromacs.bioexcel.eu/t/rename-output-file-of-gmx-hbond/3164>\
**Category:** User discussions\
**Created:** [November 18, 2021, 2:57pm UTC](https://gromacs.bioexcel.eu/t/rename-output-file-of-gmx-hbond/3164 "2021-11-18T14:57:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neena](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@Neena](https://gromacs.bioexcel.eu/u/Neena)\
**Post date:** [November 18, 2021, 2:57pm UTC](https://gromacs.bioexcel.eu/t/rename-output-file-of-gmx-hbond/3164/1 "2021-11-18T14:57:21Z")

</div>

Hello gromacs users,

The default output file of gmx hbond is summary\_HBmap.dat.  
I do different types of gmx hbond analysis, for which I need output .dat files with different names.  
I tried -o summary\_HBmap04.dat in the gmx hbond command, but this did not work.  
Is there a way for this?

Many thanks,  
Neena

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [November 18, 2021, 3:23pm UTC](https://gromacs.bioexcel.eu/t/rename-output-file-of-gmx-hbond/3164/2 "2021-11-18T15:23:31Z")

</div>

> [@Neena](#):
>
> The default output file of gmx hbond is summary\_HBmap.dat.

`gmx hbond` produces no such file; that looks more like the output of my post-processing script.

> [@Neena](#):
>
> I tried -o summary\_HBmap04.dat in the gmx hbond command, but this did not work.

Please be more specific than “this did not work” as that’s not information we can use to troubleshoot. What happened? I suspect you got a fatal error because `-o` is not a valid option for `gmx hbond`. Consult the help information for appropriate command-line arguments.

---

<div class="post-metadata">

**Author:** ![Neena](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@Neena](https://gromacs.bioexcel.eu/u/Neena)\
**Post date:** [November 20, 2021, 5:06pm UTC](https://gromacs.bioexcel.eu/t/rename-output-file-of-gmx-hbond/3164/3 "2021-11-20T17:06:35Z")

</div>

@jalemkul

Thanks for pointing that out, yes summary\_HBmap.dat is an output file of the perl script you wrote for H-bond occupancy

My goal here was to do gmx hbond using 0.4 nm as the X-H…Acceptor distance as cut off (in addition to default 0.35 nm) and then I tried perl plot\_hbmap\_generic.pl -s em1.pdb -map hbmap\_04.xpm -index hbond\_04.ndx -o summary\_HBmap\_04.dat

Although the output file is still saved as summary\_HBmap.dat, it does contain both old and new H-bond occupancy values listed in order.

So I think my problem is solved, thank you!

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [November 21, 2021, 4:06am UTC](https://gromacs.bioexcel.eu/t/rename-output-file-of-gmx-hbond/3164/4 "2021-11-21T04:06:56Z")

</div>

Just as an FYI on this, there is no `-o` option to my script; the output is always written to `summary_HBmap.dat`, though it is trivial to modify this on your own if greater flexibility is needed.
