AMBER Archive (2008)

Subject: RE: AMBER: 100 short MD runs within a single Sander script?

From: Ross Walker (ross_at_rosswalker.co.uk)
Date: Sat Jun 07 2008 - 00:22:36 CDT


Hi Sebastian,

> 1.) Given a trajectory file (with say 100 frames), the Sander script
> takes each of these 100 frames as initial structures for short MD
> runs, say 40fs.
> 2.) It determines some order parameter (e.g. a torsion angle), maybe
> also determines an average, and outputs the data into a separate
> external file.

You could do this with a simple shell script.

Start by creating a file called mdin to do the MD run that you want.

Then also write a ptraj.in file

trajin foo.mdcrd
trajout foo.rst restart

Then you run ptraj and it will generate a series of sequentially numbered
restart files for each structure in the mdin file. Also create a ptraj file
for doing the analysis you want in section 2 (e.g. expects a file called
xxx.mdcrd)

You then have something like:

foreach i ( *.rst.* )
  echo $i
   $AMBERHOME/exe/sander -O -i mdin -p prmtop -c $i -o $i.mdout -r &i.rst -x
&i.mdcrd
   mv $i.mdcrd xxx.mdcrd
   ptraj prmtop < analyze_mdcrd.trajin > xxx.trajout
   mv xxx.trajout $i.trajout
   mv xxx.mdcrd $i.mdcrd
   #also move any tables produced by ptraj. E.g.
   mv order_param.dat $i.order_param
end

and there you have it - quick and easy and with a significant amount of
flexibility since you are running within a standard shell environment. Hence
you could include other things like perhaps a grep to extract a specific
result and append it to a single summary file etc.

All the best
Ross

/\
\/
|\oss Walker

| Assistant Research Professor |
| San Diego Supercomputer Center |
| Tel: +1 858 822 0854 | EMail:- ross_at_rosswalker.co.uk |
| http://www.rosswalker.co.uk | PGP Key available on request |

Note: Electronic Mail is not secure, has no guarantee of delivery, may not
be read every day, and should not be used for urgent or sensitive issues.

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" (in the *body* of the email)
      to majordomo_at_scripps.edu