VMD-L Mailing List
From: Gianluca Interlandi (gianluca_at_u.washington.edu)
Date: Wed Nov 26 2014 - 18:06:03 CST
- Next message: Gianluca Interlandi: "Re: "measure bond" vs veclength"
- Previous message: Ashar Malik: "Re: Problem with merging structures!( psfgen) Warning: failed to set coordinate for atom AU0 AU:1 A)"
- Next in thread: John Stone: "Re: "measure bond" vs veclength"
- Reply: John Stone: "Re: "measure bond" vs veclength"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Dear vmd list,
I noticed that I get slightly different results when I measure the
distance between two atoms using "measure bond" vs by measuring the length
of the vector between the two atoms. The difference is usually after the
4th decimal after the period. I read in the frames from a NAMD DCD and I
use, e.g.,:
set index1 [[atomselect top "name CA and resid 1"] get index]
set index2 [[atomselect top "name CA and resid 2"] get index]
measure bond {$index1 $index2} frame 100
which returns "12.263489723205566"
But if I calculate the length of the vector between the two atoms with:
set sel1 [atomselect top "name CA and resid 1" frame 100]
set sel2 [atomselect top "name CA and resid 2" frame 100]
set res1 [lindex [$sel1 get {x y z}] 0]
set res2 [lindex [$sel2 get {x y z}] 0]
veclength [vecsub $res2 $res1]
I get "12.26349001762006"
Just wondering how come I get two slightly different results? The frames
are read from a DCD file that should be double precision. Which of the two
methods should be in theory more precise?
Thanks!
Gianluca
-----------------------------------------------------
Gianluca Interlandi, PhD gianluca_at_u.washington.edu
+1 (206) 685 4435
http://artemide.bioeng.washington.edu/
Research Assistant Professor at the Department of Bioengineering
at the University of Washington, Seattle WA U.S.A.
-----------------------------------------------------
- Next message: Gianluca Interlandi: "Re: "measure bond" vs veclength"
- Previous message: Ashar Malik: "Re: Problem with merging structures!( psfgen) Warning: failed to set coordinate for atom AU0 AU:1 A)"
- Next in thread: John Stone: "Re: "measure bond" vs veclength"
- Reply: John Stone: "Re: "measure bond" vs veclength"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]