Re: [AMBER] rmsd calculations on multiple trajectories

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Fri, 29 Jul 2016 15:52:49 -0600

It's because cpptraj is treating this as one continuous run (400
frames total) so each data set is 400 frames. If you want them to be
separate you just need to slightly re-arrange your input into separate
runs like so:

# Load topologies/references
parm WT.prmtop
parm GFP.prmtop
parm MIC.prmtop
parm mCherry.prmtop
reference WT.mdcrd 1 parm WT.prmtop [wt]
reference GFP.mdcrd 1 parm GFP.prmtop [gfp]
reference MIC.mdcrd 1 parm MIC.prmtop [mic]
reference mCherry.mdcrd 1 parm mCherry.prmtop [mch]
# Process first trajectory
trajin WT.mdcrd 1 100 parm WT.prmtop
rms WT ref [wt] :1-88.C,CA,N,O
run
clear trajin
# Process second trajectory
trajin GFP.mdcrd 1 100 parm GFP.prmtop
rms GFP ref [gfp] :1-330.C,CA,N,O
run
clear trajin
# Process third
trajin MIC.mdcrd 1 100 parm MIC.prmtop
rms MIC ref [mic] :1-131.C,CA,N,O
run
clear trajin
# Process fourth
trajin mCherry.mdcrd 1 100 parm mCherry.prmtop
rms mCherry ref [mch] :1-345.C,CA,N,O out rmsd.dat
run
# Write data
writedata rmsd.dat WT GFP MIC mCherry

That should do it.

-Dan

PS - You could also do it via TRAJ data sets if you want
(loadtraj/crdaction) - results would be the same but it would save you
the 'clear trajin' commands.

On Fri, Jul 29, 2016 at 3:33 PM, Hirdesh Kumar <hirdesh.iitd.gmail.com> wrote:
> I expect 100 frames for each protein : 400 frames (in total)..
> But, I get 400 frames for each protein : 1600 ( in total)
>
> Here, I attach the output file
>
> **********************************************
> Hirdesh Kumar
> PhD (Molecular Parasitology), MS (Pharmacoinformatics), B. Pharm
> AG Frischknecht
> *Parasitology - Center for Infectious Diseases*
> *University of Heidelberg Medical School*
> *Im Neuenheimer Feld 324*
>
>
> *69120 HeidelbergGermany*
>
> Lab number
> :
> +49 (0)6221 567438
> Mobile number: +49(0) 176 83517413
> **********************************************
>
> On Fri, Jul 29, 2016 at 11:27 PM, Daniel Roe <daniel.r.roe.gmail.com> wrote:
>
>> According to the output in cpptraj.log (pasted below), you are reading
>> 100 frames as requested from 4 trajectories, so the total number of
>> frames processed is 400. So I'm not sure what the issue is.
>>
>> ```
>> INPUT TRAJECTORIES:
>> 0: 'WT.mdcrd' is an AMBER trajectory, Parm WT.prmtop (Trunc. Oct.
>> box) (reading 100 of 50100)
>> 1: 'GFP.mdcrd' is an AMBER trajectory, Parm GFP.prmtop (Trunc. Oct.
>> box) (reading 100 of 50100)
>> 2: 'MIC.mdcrd' is an AMBER trajectory, Parm MIC.prmtop (Trunc. Oct.
>> box) (reading 100 of 50008)
>> 3: 'mCherry.mdcrd' is an AMBER trajectory, Parm mCherry.prmtop
>> (Trunc. Oct. box) (reading 100 of 50100)
>> Coordinate processing will occur on 400 frames.
>> ```
>>
>> On Fri, Jul 29, 2016 at 3:25 PM, Hirdesh Kumar <hirdesh.iitd.gmail.com>
>> wrote:
>> > *Here I attach the input file and log file*
>> >
>> > On Fri, Jul 29, 2016 at 11:20 PM, Daniel Roe <daniel.r.roe.gmail.com>
>> wrote:
>> >
>> >> Based on the output you provided from CPPTRAJ previously, it seems
>> >> like only 100 frames from each trajectory were being read:
>> >>
>> >> > 0: 'WT.mdcrd' is an AMBER trajectory, Parm WT.prmtop (Trunc. Oct. box)
>> >> (reading 100 of 50100)
>> >>
>> >> etc.
>> >>
>> >> -Dan
>> >>
>> >> On Fri, Jul 29, 2016 at 3:09 PM, Hirdesh Kumar <hirdesh.iitd.gmail.com>
>> >> wrote:
>> >> > Thanks Daniel..
>> >> >
>> >> > I
>> >> > got
>> >> > one more problem:
>> >> >
>> >> >
>> >> > Although I selected just 100 frames of each trajectory. There are 400
>> >> > frames for each protein.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > **
>> >> >
>> >> > On Fri, Jul 29, 2016 at 10:45 PM, Daniel Roe <daniel.r.roe.gmail.com>
>> >> wrote:
>> >> >
>> >> >> You forgot the 'parm' keywords in your trajin commands (e.g. trajin
>> >> >> GFP.mdcrd parm GFP.prmtop etc).
>> >> >>
>> >> >> -Dan
>> >> >>
>> >> >> On Fri, Jul 29, 2016 at 1:52 PM, Hirdesh Kumar <
>> hirdesh.iitd.gmail.com>
>> >> >> wrote:
>> >> >> > Thanks Dan and others..
>> >> >> >
>> >> >> > I tried following script in cpptraj..
>> >> >> >
>> >> >> > parm WT.prmtop
>> >> >> > parm GFP.prmtop
>> >> >> > parm MIC.prmtop
>> >> >> > parm mCherry.prmtop
>> >> >> > trajin WT.mdcrd
>> >> >> > trajin GFP.mdcrd
>> >> >> > trajin MIC.mdcrd
>> >> >> > trajin mCherry.mdcrd
>> >> >> > reference WT.mdcrd 1 parm WT.prmtop [wt]
>> >> >> > reference GFP.mdcrd 1 parm GFP.prmtop [gfp]
>> >> >> > reference MIC.mdcrd 1 parm MIC.prmtop [mic]
>> >> >> > reference mCherry.mdcrd 1 parm mCherry.prmtop [mch]
>> >> >> > rms WT ref [wt] :1-88.C,CA,N,O out rmsd.dat
>> >> >> > rms GFP ref [gfp] :1-88.C,CA,N,O out rmsd.dat
>> >> >> > rms MIC ref [mic] :1-88.C,CA,N,O out rmsd.dat
>> >> >> > rms mCherry ref [mch] :258-345.C,CA,N,O out rmsd.dat
>> >> >> >
>> >> >> > But, I am sure something is wrong.. Because at step 1, rmsd value
>> is
>> >> not
>> >> >> > zero for each case:
>> >> >> >
>> >> >> > #Frame WT GFP MIC
>> >> >> > 1 0.0000 0.7683 0.6705
>> >> >> >
>> >> >> >
>> >> >> > In the log file, I found that all trajectories were read using
>> single
>> >> >> > "WT.prmtop" file:
>> >> >> >
>> >> >> > INPUT TRAJECTORIES:
>> >> >> > 0: 'WT.mdcrd' is an AMBER trajectory, Parm WT.prmtop (Trunc. Oct.
>> >> box)
>> >> >> > (reading 100 of 50100)
>> >> >> > 1: 'GFP.mdcrd' is an AMBER trajectory, Parm WT.prmtop (reading
>> 100 of
>> >> >> > 179366)
>> >> >> > 2: 'MIC.mdcrd' is an AMBER trajectory, Parm WT.prmtop (reading
>> 100 of
>> >> >> > 71554)
>> >> >> > 3: 'mCherry.mdcrd' is an AMBER trajectory, Parm WT.prmtop (reading
>> >> 100
>> >> >> of
>> >> >> > 185989)
>> >> >> > Coordinate processing will occur on 400 frames.
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > On Fri, Jul 29, 2016 at 9:02 PM, Hai Nguyen <nhai.qn.gmail.com>
>> >> wrote:
>> >> >> >
>> >> >> >> . Hirdesh:
>> >> >> >>
>> >> >> >> adding to Dan's comment about cpptraj's flexibility: use can
>> design
>> >> >> their
>> >> >> >> own protocol with pytraj ( :D )
>> >> >> >>
>> >> >> >> # Python stuff
>> >> >> >> import pytraj as pt
>> >> >> >>
>> >> >> >> all_rmsd = [ ]
>> >> >> >>
>> >> >> >> for (fn, parm_name) in [('A.mdcrd', 'A.parm'),
>> >> >> >> ('B.mdcrd', 'B.parm'),
>> >> >> >> ('C.mdcrd', 'C.parm')]:
>> >> >> >>
>> >> >> >> traj = pt.iterload(fn, top=parm_name)
>> >> >> >> # ref=0: first frame
>> >> >> >> # ref=-1: last frame
>> >> >> >> # and so on.
>> >> >> >> rmsd_data = pt.rmsd(traj, ref=0)
>> >> >> >> all_rmsd.append(rmsd_data)
>> >> >> >>
>> >> >> >> Hai
>> >> >> >>
>> >> >> >> On Fri, Jul 29, 2016 at 11:36 AM, Daniel Roe <
>> daniel.r.roe.gmail.com
>> >> >
>> >> >> >> wrote:
>> >> >> >>
>> >> >> >> > On Fri, Jul 29, 2016 at 9:30 AM, Carlos Simmerling
>> >> >> >> > <carlos.simmerling.gmail.com> wrote:
>> >> >> >> > > my guess is that cpptraj is not set up to load an arbitrary
>> >> number
>> >> >> of
>> >> >> >> > > prmtop files,
>> >> >> >> >
>> >> >> >> > Cpptraj can load as many topology files as memory will allow.
>> >> Loading
>> >> >> >> > multiple topology files was actually one of my primary
>> motivations
>> >> for
>> >> >> >> > writing cpptraj in the first place :-)
>> >> >> >> >
>> >> >> >> > -Dan
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > -------------------------
>> >> >> >> > Daniel R. Roe, PhD
>> >> >> >> > Department of Medicinal Chemistry
>> >> >> >> > University of Utah
>> >> >> >> > 30 South 2000 East, Room 307
>> >> >> >> > Salt Lake City, UT 84112-5820
>> >> >> >> > http://home.chpc.utah.edu/~cheatham/
>> >> >> >> > (801) 587-9652
>> >> >> >> > (801) 585-6208 (Fax)
>> >> >> >> >
>> >> >> >> > _______________________________________________
>> >> >> >> > 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
>> >> >> >>
>> >> >> > _______________________________________________
>> >> >> > AMBER mailing list
>> >> >> > AMBER.ambermd.org
>> >> >> > http://lists.ambermd.org/mailman/listinfo/amber
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> -------------------------
>> >> >> Daniel R. Roe, PhD
>> >> >> Department of Medicinal Chemistry
>> >> >> University of Utah
>> >> >> 30 South 2000 East, Room 307
>> >> >> Salt Lake City, UT 84112-5820
>> >> >> http://home.chpc.utah.edu/~cheatham/
>> >> >> (801) 587-9652
>> >> >> (801) 585-6208 (Fax)
>> >> >>
>> >> >> _______________________________________________
>> >> >> 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
>> >>
>> >>
>> >>
>> >> --
>> >> -------------------------
>> >> Daniel R. Roe, PhD
>> >> Department of Medicinal Chemistry
>> >> University of Utah
>> >> 30 South 2000 East, Room 307
>> >> Salt Lake City, UT 84112-5820
>> >> http://home.chpc.utah.edu/~cheatham/
>> >> (801) 587-9652
>> >> (801) 585-6208 (Fax)
>> >>
>> >> _______________________________________________
>> >> 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
>> >
>>
>>
>>
>> --
>> -------------------------
>> Daniel R. Roe, PhD
>> Department of Medicinal Chemistry
>> University of Utah
>> 30 South 2000 East, Room 307
>> Salt Lake City, UT 84112-5820
>> http://home.chpc.utah.edu/~cheatham/
>> (801) 587-9652
>> (801) 585-6208 (Fax)
>>
>> _______________________________________________
>> 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
>



-- 
-------------------------
Daniel R. Roe, PhD
Department of Medicinal Chemistry
University of Utah
30 South 2000 East, Room 307
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-6208 (Fax)
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Jul 29 2016 - 15:00:03 PDT
Custom Search