I would use pytraj to this. You can accomplish the same thing using the "
pytraj.analysis.vector.center" command
see: http://amber-md.github.io/pytraj/latest/_api/pytraj.vector.html
That way you have access to python syntax and you can run your loop in
python.
You could even then use pytraj.compute or pytraj.pmap if you want to do the
loop for you. These commands can take a python style list of individual
commands as input and will automatically run each one. The pmap command
will even let you run them in parallel.
If you really want to do this in cpptraj, you would have to write each i j
combination explicitly. Before I learned pytraj, I would usually write a
bash script to generate the cpptraj input script to do that sort of
iteration.
Hope that helps!
On Tue, Jun 5, 2018 at 9:53 AM, 唐元晖 <tangyuanhui08.126.com> wrote:
> Hello all,
>
>
> This is Yuanhui. I want to calculate the distance between two residues as
> :i and :j, and i, j can be changed during a loop. However, the distance
> mask doesn't recognize the word :i. The input file is written like this:
>
>
> parm *.prmtop
> trajin md15.mdcrd 1 last 200
> i=2
> j=3
> distance dist :i :j out dist.dat
>
>
> Is there a way can make the cpptraj recognize the variable 'i' and 'j',
> because I want to change their values.
> Best wishes!
>
>
>
> --
>
> Dr. Yuanhui Tang
> Ralph E. Martin Department of Chemical Engineering
> University of Arkansas
> Cato Springs Research Center
> Fayetteville, AR 72701
> email: yt006.uark.edu
> voice: (479) 409-9989
>
>
>
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Jun 05 2018 - 10:30:02 PDT