Re: [AMBER] iterative calculation in CPPTRAJ using "for... do... done"

From: Jason Swails <jason.swails.gmail.com>
Date: Wed, 25 Mar 2015 09:52:06 -0400

On Wed, Mar 25, 2015 at 7:42 AM, Vijay Achari <glycoamber.gmail.com> wrote:

> Dear Sir,
>
>
> I am trying to calculate autocorrelation function.
>
> Normally I use a to run the calculation (shown below: SCRITP(I)). This
> script run in loop. Each time it load the trajectory file using trajin and
> does the calculation.
>
> Instead I would like to load the trajectory only once and do the
> calculation loop-wise as shown in SCRIPT(II). When I tried to run the
> SCRIPT(II), I get error message as below:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *CPPTRAJ: Trajectory Analysis. V14.25 ___ ___ ___ ___ | \/ | \/ |
> \/ | _|_/\_|_/\_|_/\_|_ Reading
> '../../../../only-nc-Format-bcmLyo25perR/bcmLyo25perR.prmtop' as Amber
> TopologyINPUT: Reading Input from STDIN [trajin
> ../../../../only-nc-Format-bcmLyo25perR/md-all-bcmLyo25perR.nc 15000
> 60000] Reading
> '../../../../only-nc-Format-bcmLyo25perR/md-all-bcmLyo25perR.nc' as Amber
> NetCDF [unwrap *] UNWRAP: By atom using mask '*' Reference is first
> frame. [for j in {1..128};do]'for': Command not found. 1 errors
> encountered reading input.TIME: Total execution time: 0.0695 seconds.*
>
> Is that possible to run the for command from cpptraj command?
>

​No. It is not (currently) supported. Also, I'm not sure how you are
pasting the output into your email client, but it is coming out mangled,
making it very hard to decipher and easy to miss important details.



> Or is that any other way to do the calculation by reading the TRAJECTORY
> only once and do the repeated calculation iteratively?
>

​There are two options that I can think of. The first is to use your loops
in shell scripting to write a cpptraj script, then run that serialized
script directly. Another way, if you are familiar with Python, is to use
pytraj (http://github.com/pytraj/pytraj), which will give you access to all
of cpptraj's functionality combined with the Python interpreter and numpy
library.

HTH,
Jason​

-- 
Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Mar 25 2015 - 07:00:04 PDT
Custom Search