An ampersand ('&') at the end of a command sends it into the
background. This isn't really an Amber issue; you may want to review
some unix basics. See e.g.
https://www.codecademy.com/learn/learn-the-command-line
-Dan
On Tue, Mar 15, 2016 at 8:27 PM, yhzahsc <yhzahsc.163.com> wrote:
> Dear Amber List experts,
> In the TUTORIAL B1: Simulating a small fragment of DNA-Section 6: A Practical Example (A-DNA),the author use an example script to run all jobs.This makes me want to run all my jobs in a shell script too,however, I have some problems writing a shell script(Amber14). My script is as following:
>
>
> #!/bin/bash
> mpirun -np 16 sander.MPI -O -i x_min1.in -p x.prmtop -c x.inpcrd -o x_min1.out -r x_min1.rst -ref x.inpcrd &&
> mpirun -np 16 sander.MPI -O -i x_min2.in -p x.prmtop -c x_min1.rst -o x_min2.out -r x_min2.rst &&
> mpirun -np 16 sander.MPI -O -i x_md1.in -p x.prmtop -c x_min2.rst -o x_md1.out -r x_md1.rst -x x_md1.mdcrd -ref x_min2.rst &&
> mpirun -np 16 sander.MPI -O -i x_md2.in -p x.prmtop -c x_md1.rst -o x_md2.out -r x_md2.rst -x x_md2.mdcrd
>
>
> All the commands are executed,but because the first minmizing results,such as ~.rst and ~.out,don't exit,the second command and others produce nothing except for ~.out,which contains nothing.The second command is executed before finishing the first command.
> How to write the script to run all my jobs in a right way?
> Thanks.
> yhz
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
--
-------------------------
Daniel R. Roe, PhD
Department of Medicinal Chemistry
University of Utah
30 South 2000 East, Room 307
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-6208 (Fax)
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Mar 15 2016 - 20:00:03 PDT