VMD-L Mailing List
From: Justin Gullingsrud (justinrocks_at_gmail.com)
Date: Fri Oct 08 2004 - 14:26:10 CDT
- Next message: Justin Gullingsrud: "Re: CMAP and psfgen"
- Previous message: Luis Gracia: "Re: problem"
- In reply to: bora erdemli: "Re: measure fit error??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
A much better way to do this is to create the atom selection once,
outside the loop, and update just the frame. Here are three scripts,
one to align all frames using a particular selection, one to compute
the rmsd for all frames in a selection, and another to write the data
to a file. Use them like so:
# align using CA atoms
align top "name CA"
# write backbone RMSD to rms-bb.dat
write_vector [rmsd top backbone] rms-bb.dat
Cheers,
Justin
On Fri, 8 Oct 2004 10:29:22 -0700 (PDT), bora erdemli
<boraerdemli_at_yahoo.com> wrote:
>
> Hi ;
>
> I do not know exactly where your problem occured.
> However, I can recommend you to use the following
> script for rmsd calculation by using snapshots of your
> simulation. I hope it will work for you....
>
> best regards
>
> Bora
>
> set outfile [open rmsd.dat w]
>
> set nf [molinfo top get numframes]
>
> set frame0 [atomselect top "selection " frame 0]
>
> # rmsd calculation loop
>
> for { set i 1 } { $i <= $nf } { incr i } {
>
> set sel [atomselect top "selection " frame $i]
>
> #$sel move [measure fit $sel $frame0]
>
> puts $outfile "[measure rmsd $sel $frame0]"
>
> }
> close $outfile
>
>
> --- mashaojie163 <mashao_jie_at_163.com> wrote:
>
> >
> > ----- Original Message -----
> > From: mashaojie163
> > To: vmd-l
> > Sent: Tuesday, September 28, 2004 12:12 PM
> > Subject: vmd-l: measure fit error??
> >
> >
> > Hello:
> > I want to calculate the rmsd of protein by use of
> > snopshots during MD simulation. when I regard the
> > frame 0 as base strusture.
> > for example:
> >
> >
> > set sel0 [atomselect top "protein and backbone
> > and noh" frame 0]
> > set sel1 [atomselect top "protein and backbone
> > and noh" frame 1]
> > set sel2 [atomselect top "protein and backbone
> > and noh" frame 2]
> > measure fit $sel0 $sel1
> > the return value is {1.0 0.0 0.0 1.#QNAN} {0.0
> > 1.0 0.0 1.#QNAN} {0.0 0.0 1.0 1.#QNAN} {0.0 0.0 0.0
> > 1.#QNAN}
> > measure fit $sel1 $sel0
> > the return value is -1.#IND -1.#IND -1.#IND
> > -1.#IND} {-1.#IND -1.#IND -1.#IND -1.#IND} {-1.#IND
> > -1.#IND -1.#IND -1.#IND} {-1.#IND -1.#IND -1.#IND
> > -1.#IND}
> > measure fit $sel2 $sel1
> > the return value is right {0.999995708466
> > 0.000757500936743 0.00282854191028 0.0485077947378}
> > {-0.000757581554353 0.999999701977 2.7410878829e-005
> > -0.0505107417703} {-0.00282852025703
> > -2.95536119665e-005 0.999996006489 0.00872712116688}
> > {0.0 0.0 0.0 1.0}
> >
> > I don not know what do "-1.#QNNA" and "-1.#IND"
> > mean? why these appear when selection including
> > frame 0?
> >
> > Best Regards
> > Ma shaojie
> >
>
>
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
>
-- The spirit of Plato dies hard. We have been unable to escape the philosophical tradition that what we can see and measure in the world is merely the superficial and imperfect representation of an underlying reality. -- S.J. Gould, "The Mismeasure of Man"
- text/x-tcl attachment: rmsd.tcl
- Next message: Justin Gullingsrud: "Re: CMAP and psfgen"
- Previous message: Luis Gracia: "Re: problem"
- In reply to: bora erdemli: "Re: measure fit error??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]