Help automating gmx pairwise on a bash script using ctrl + D

GROMACS version: 2020.3
GROMACS modification: Yes/No No
Here post your question:

I am trying to use a bash script to automate gmx pairdist. My input goes like:

gmx pairdist -f RaLPS_DPPC_6us_GIIKS_noPBC.xtc -n RaLPS_DPPC_6us_GIIKS.ndx -o pep1.xvg -sel -ref << EOF

17

18

19

etc. (there are 24 index groups and 1 reference)

For the next part I need to input control + D followed by my reference index and then all the pairwise distances will be completed, I have currently

# ctrl + d

17 (my reference)

EOF

But it’s not working at all and I’m super stuck on how to automate this!

Thanks!

Hi!

I think you can use -ref 17 instead of supplying it via input redirection. That way, you only need to provide “selection” via the standard input.

Thank you so much this worked! So much time has been saved thank you!