AMBER Archive (2007)

Subject: Re: AMBER: a question of ptraj

From: Chris Moth (chris.moth_at_vanderbilt.edu)
Date: Mon Dec 31 2007 - 14:38:21 CST


It is possible that $frame is not being expanded as you think
inside the stdin of ptraj.

You might want to capture and read the stdout of ptraj.
Perhaps something like this would work:

$ptraj prmtop << EOF | tee ptraj.$frame.output

Or, restruture you loop to create one long shell script with no loops, and
run that instead. If you can create a short script which produces the
required rst file, then you ought to be OK for a longer run which repeats
that code.

The third "offset" parameter to trajin might be useful. If you set this
to 10000 for a 1000 frame coordinate file, that should ensure that only
one frame is processed.

You start with frame=0, but I believe ptraj starts numbering of frames
from 1. That may be part of the problem.

> Hi, Dear all,
> I meet a problem when I use ptraj of amber 9. I only want to
> extract some frames from the mdcrd file, but the ptraj extract
> every frame out..
> Could anybody tell me why? Thanks very much!
> I paste my script as below:
>
> #!/bin/bash
>
> ptraj=/apps/amber/9/intel/ptraj
> for frame in 0 14 21 58 64 77 97 142 153 186 210 241 256 263 332
> 358 363 379 393 395 396 399 423 432 466 493 497 516 519 535 549
> 551 575 587 601 645 651 675 716 726 733 746 766 803 813 817 850
> 867 879 925 931 940 956 964 967 975 976 979 983 984;
> do
> echo $frame
> $ptraj prmtop <<EOF
> trajin 1b9p_equ.mdcrd $frame $frame
> trajout frame.rst restart
> EOF
>
> done
>
>
> -----------------------------------------------------------------------
> The AMBER Mail Reflector
> To post, send mail to amber_at_scripps.edu
> To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu
>

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu