[gmx-users] gmx gangle in a for loop

Christian Blau blau at kth.se
Wed Nov 6 09:38:46 CET 2019


Hello Alex,


What works for me is setting '$i' within singe quotation marks, e.g.,

'group '$i' and name C10 plus group '$i' and name C20'


Note that this is more of a bash escaping quotes issue and only a GROMACS issue insofar as the selection syntax requires 
the quotes.


Best,

Christian

On 11/6/19 3:32 AM, Alex wrote:
> Dear all,
> Could one kindly let me know how $i should come in gmx gangle used in a for
> loop to avoid syntax errors?
> I tested different flavors like "$i", "${i}", ..., and still the problem is
> here.
>
> #!/bin/bash/
> for i in {1..1000}
> do
>          gmx gangle -g1 vector -group1 'group $i and name C10 plus group $i
> and name C20' -g2 vector -group2 'cog of group 0 plus cog of group $i' -n
> ind.ndx -f ind.xtc -s ind.tpr -oav aver$i.xvg -oh hist$i.xvg
> done
>
> Thank you
> Alex


More information about the gromacs.org_gmx-users mailing list