VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Jun 24 2009 - 15:34:05 CDT
- Next message: John Stone: "Re: residue index problem"
- Previous message: John Stone: "Re: joystick, win32 simple interface"
- In reply to: Naiyin Yu: "trace the distance between center of mass of one certain residue and the other"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
I would suggest creating two atom selections (one each for the two
residues), and then use 'measure center' to get the centers of mass,
and so on, here's a hastily written prototype:
set sel1 [atomselect top "residue 20"]
set sel2 [atomselect top "residue 30"]
set numframes [molinfo top get numframes]
for {set frame 0} {$frame < $numframes} {incr frame} {
$sel1 frame $frame
$sel2 frame $frame
set com1 [measure center $sel1 weight mass]
set com2 [measure center $sel2 weight mass]
set comdist [vecdist $com1 $com2]
puts "COM distance for frame $frame: $comdist"
}
$sel1 delete
$sel2 delete
Cheers,
John Stone
vmd_at_ks.uiuc.edu
On Wed, Jun 24, 2009 at 03:59:14PM -0400, Naiyin Yu wrote:
> Hello,
>
> I would like to trace the distance between the center of mass of one residue on one chain and some element on the other chain. I have tried to use the "atomselect" but it failed. It seems we have to label residue instead of center of mass. Is there anyway to solve it?
>
> thanks,
> Evelyn
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 Email: johns_at_ks.uiuc.edu Phone: 217-244-3349 WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
- Next message: John Stone: "Re: residue index problem"
- Previous message: John Stone: "Re: joystick, win32 simple interface"
- In reply to: Naiyin Yu: "trace the distance between center of mass of one certain residue and the other"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]