Re: [AMBER] how to calculate the mass center distance between adjacent repeat units of one polymer chain

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Tue, 5 Jun 2018 15:11:53 -0400

Hi,

You can use the new loop and script variable functionality in cpptraj
(you need an up-to-date version, either from GitHub or Amber18).

For example:

for i=1;i<10;i++
  for j=2;j<10;j++
    distance d_$i_$j out dist.dat
  done
done

Or something like:

for atoms A0 inmask :1-10 i=1;i++
  distance d$i :11 $A0 out dist.dat
done

See the manual for more details, in particular look at the new 'for'
and 'set' commands (section 29.3 Variables and Control Structures).

You can also use pytraj as Wesley suggested.

-Dan

On Tue, Jun 5, 2018 at 12:53 PM, 唐元晖 <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 - 12:30:03 PDT
Custom Search