[AMBER] bash scripting for MD tasks

From: James Starlight <jmsstarlight.gmail.com>
Date: Mon, 16 Jun 2014 23:59:08 +0400

Dear Amber users!


I'd like to look at some basic examples of the usage of some bash scripts
for typical md jobs like running of many jobs simultaneously or in parallel
using bash's loops and conditions statements. I have not found some
tutorial showing advantages of the usage of shell scripting for typical md
jobs so It will be very useful for people not well familiar with scripting.


For instance I found simple examples for the usage of while and for
statements in case of annealing jobs where output of the i run should be
the input for the i+1.

"#!/bin/bash

i=1
j=2

for ((i=1, j=2; i<200; i++, j++))
do
mpirun -np 4 sander.MPI -O -i anneal.in -o anneal$j.out -p prmtop -c
anneal$i.rst -r anneal$j.rst -x siman$j.mdcrd > /dev/null
done"



#!/bin/bash

i=1
MAX=200

mpirun -np 4 sander.MPI -O -i anneal.in -o anneal_1.out -p prmtop -c inpcrd
-r anneal_1.rst -x siman_1.mdcrd > /dev/null

while [ $i -lt $MAX ];
do
i1=`expr $i + 1`

Does someone know how would be possible to improve such scripts? Also I'll
be thankful for any other useful examples.


James
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Jun 16 2014 - 13:30:02 PDT
Custom Search