VMD-L Mailing List
From: Andres Morales N (andresmoralesn2_at_hotmail.com)
Date: Wed May 13 2009 - 22:25:22 CDT
- Next message: Peter Freddolino: "Re: Translate"
- Previous message: Axel Kohlmeyer: "Re: Color problem."
- Next in thread: Peter Freddolino: "Re: Translate"
- Reply: Peter Freddolino: "Re: Translate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi all VMD users!
I want to move protein atoms of each strcuture from a dcd file to a position where alpha carbon of first residue will be located at point {0 0 0}. I tried the script:
set O [atomselect top "protein and resid 1 and alpha"]
set nf [molinfo top get numframes]
set protein [atomselect top "protein"]
set indices 0;
set newcoords 0;
lvarpop newcoords
set indices [$protein get index]
for {set i 0 } {$i < $nf } { incr i } {
$O frame $i
$protein frame $i
set A [lindex [$O get {x y z}] 0]
for {set j 0 } {$j < 882 } { incr j } {
set sel [atomselect top "index $j" frame $i]
set coor [lindex [$sel get {x y z}] 0]
set r [vecsub $coor $A]
lappend newcoords $r
}
$protein set {x y z} $newcoords
}
So it apperas the following mistake: vecsub: two vectors don't have the same size
I wait somebody can help me.
Thanks a lot
Andres
_________________________________________________________________
Connect to the next generation of MSN Messenger
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
- Next message: Peter Freddolino: "Re: Translate"
- Previous message: Axel Kohlmeyer: "Re: Color problem."
- Next in thread: Peter Freddolino: "Re: Translate"
- Reply: Peter Freddolino: "Re: Translate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]