Re: [AMBER] sander command

From: Jason Swails <jason.swails.gmail.com>
Date: Wed, 11 Dec 2013 07:22:10 -0500

On Tue, Dec 10, 2013 at 3:07 AM, Saeed Nasiri <s.t.nasiri.gmail.com> wrote:

> Dear All
>
> I have a problem with energy minimization for ionic liquid simulation box
> (amber tutorial). I run the tutorial script, I have an error. I create
> input file for minimization the run sander in terminal and I have another
> error. In addition I run this minimization in a directory that contains all
> files from previous steps (mol2 pdb and ...).
> Also thanks very much for quick and useful replying from Mr. Jason Swails
> for my last problem.
>
>
> Your Sincerely
>
> Nasiri
>
>
> =========================================================
>
>
>
> *runmin.sh-----------------------------------------------------------------------------------------*
>
> #!/bin/bash
> # CREATE the mdin file
> cat > mdin << EOF
> minimization
> &cntrl
> imin=1, ntpr=100, ntwx=100, maxcyc=10000,
> ntb=1,
> &end
> EOF
>
> sander -O \
> -i mdin.in \ # input file
>

I think you mean "mdin", right? You create mdin above, but then try to use
mdin.in here.


> -o min1.o \ # output file
> -p ionicbox.prmtop \ # topology file
> -c ionicbox.inpcrd \ # input coordinate file
> -r min1.x \ # restart file
> -x min1.nc \ # output coordinate sets saved in
> trajectory
> -e min1.dat # energy data
>

You cannot do this. The \ character must be the _last_ character on the
line, since it has to "cancel" the newline (which is typically identified
as the command-terminating character). Furthermore, it cannot come after a
comment (since then it is commented and does nothing).

As a result, you cannot have intra-line comments in shell scripts like you
can in other languages like C and Python.


>
> ---------------------------------------------------------------------------------------
>
> *$ ./runmin.sh ./runmin.sh: line 17: warning: here-document at line 3
> delimited by end-of-file (wanted `EOF')*
>

This is not a typical class of Amber error, and instead indicates that
there is some problem with your script. It almost seems like the EOF tag
you used to create your mdin file was not properly read. There cannot be
any preceding whitespace in front of EOF. Syntax highlighting in your
favorite editor can often help you determine if there is an obvious flaw in
your script (like an unterminated block, for instance).

Good luck,
Jason

-- 
Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Dec 11 2013 - 04:30:03 PST
Custom Search