Re: [AMBER] shell script

From: Marc van der Kamp <marcvanderkamp.gmail.com>
Date: Wed, 16 Mar 2016 09:18:34 +0000

Hi,

If you get rid of the && at the end of each line, the next job should only start when the job (bash command) before it has finished.

Marc

Sent from my iPhone

> On 16 Mar 2016, at 02:27 am, 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

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Mar 16 2016 - 02:30:03 PDT
Custom Search