[gmx-users] ERROR IN BASH SCRIPTING

Subashini .K subashinik at hotmail.com
Tue Feb 28 11:54:12 CET 2017


Hi,


Thank you for the reply.


WINDOW represents the distance between two identical molecules in  umbrella sampling method.


In order to avoid having 26 different mdp files, we use the bash script use  to loop through and run each state .


This was developed by WESBARNETT (displayed in the tutorial link)


But, I am unable to run the bash script.


My question is in which folder the bash script must be placed?



I use cgywin windows  and notepad ++.


Can anyone help?


Thanks,

Subashini.K



________________________________
From: gromacs.org_gmx-users-bounces at maillist.sys.kth.se <gromacs.org_gmx-users-bounces at maillist.sys.kth.se> on behalf of Mark Abraham <mark.j.abraham at gmail.com>
Sent: Tuesday, February 28, 2017 2:31 PM
To: gmx-users at gromacs.org
Subject: Re: [gmx-users] ERROR IN BASH SCRIPTING

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 <subashinik at 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
>



More information about the gromacs.org_gmx-users mailing list