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

From: Vijay Achari <glycoamber.gmail.com>
Date: Wed, 25 Mar 2015 19:42:16 +0800

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?
Or is that any other way to do the calculation by reading the TRAJECTORY
only once and do the repeated calculation iteratively?


Below I have given both the SCRIPT(I) and SCRIPT(II).


#####################################################################
# SCRIPT(I)



















*sys="bcmLyo25perR"path="../../../../only-nc-Format-$sys"top="$sys.prmtop"for
j in {1..128};docpptraj $path/$top << EOFtrajin
$path/md-all-bcmLyo25perR.nc 15000 60000unwrap *vector v1 :$j.C11 :$j.C14
timecorr vec1 v1 out head1-lipid$j-C11_C14.dat order 2 tstep 1 tcorr 25000
norm drct ptrajformatEOF*

*done*################################################


# SCRIPT(II)




















*sys="bcmLyo25perR"path="../../../../only-nc-Format-$sys"top="$sys.prmtop"cpptraj
$path/$top << EOFtrajin $path/md-all-bcmLyo25perR.nc 15000 60000unwrap *for
j in {1..128};dovector v1 :$j.C11 :$j.C14 timecorr vec1 v1 out
head1-lipid$j-C11_C14.dat order 2 tstep 1 tcorr 25000 norm drct
ptrajformatdoneEOF*

##############################################


Thanks in advance.
Vijay
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Mar 25 2015 - 05:00:02 PDT
Custom Search