Hi, Looks like you edited on Windows last. Use dos2unix now, or a proper text editor next time ;-)
Mark On Tue, 28 Feb 2017 08:14 Subashini .K <subashi...@hotmail.com> wrote: > Hi gromacs users, > > > I use the following run.sh in the working directory of simulations > > > #!/bin/bash > set -e > > for ((i=0;i<27;i++)); do > > x=$(echo "0.05*$(($i+1))" | bc); > > sed 's/WINDOW/'$x'/g' mdp/min.mdp > grompp.mdp > gmx grompp -o min.$i -pp min.$i -po min.$i -n index.ndx > gmx mdrun -deffnm min.$i -pf pullf-min.$i -px pullx-min.$i > > sed 's/WINDOW/'$x'/g' mdp/min2.mdp > grompp.mdp > gmx grompp -o min2.$i -c min.$i -t min.$i -pp min2.$i -po min2.$i > -maxwarn 1 -n index.ndx > gmx mdrun -deffnm min2.$i -pf pullf-min2.$i -px pullx-min2.$i > > sed 's/WINDOW/'$x'/g' mdp/eql.mdp > grompp.mdp > gmx grompp -o eql.$i -c min2.$i -t min2.$i -pp eql.$i -po eql.$i -n > index.ndx > gmx mdrun -deffnm eql.$i -pf pullf-eql.$i -px pullx-eql.$i > > sed 's/WINDOW/'$x'/g' mdp/eql2.mdp > grompp.mdp > gmx grompp -o eql2.$i -c eql.$i -t eql.$i -pp eql2.$i -po eql2.$i -n > index.ndx > gmx mdrun -deffnm eql2.$i -pf pullf-eql2.$i -px pullx-eql2.$i > > sed 's/WINDOW/'$x'/g' mdp/prd.mdp > grompp.mdp > gmx grompp -o prd.$i -c eql2.$i -t eql2.$i -pp prd.$i -po prd.$i -n > index.ndx > gmx mdrun -deffnm prd.$i -pf pullf-prd.$i -px pullx-prd.$i > > done > > However, I get the following error > > > ./run.sh > : invalid option: set: - > set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] > ./run.sh: line 3: $'\r': command not found > ./run.sh: line 4: syntax error near unexpected token `$'do\r'' > '/run.sh: line 4: `for ((i=0;i<27;i++)); do > > > How to fix it? > > > Thanks, > > Subashini.K > > -- > Gromacs Users mailing list > > * Please search the archive at > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before > posting! > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists > > * For (un)subscribe requests visit > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or > send a mail to gmx-users-requ...@gromacs.org. > -- Gromacs Users mailing list * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting! * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists * For (un)subscribe requests visit https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-requ...@gromacs.org.