From: Andres Morales N (andresmoralesn2_at_hotmail.com)
Date: Wed May 13 2009 - 08:42:45 CDT

Hi!
 
I am trying to create a new coordinates system and align strcutures from a dcd file to it.
I used the following:
 

#get three orthogonal vector : D F G

set O [atomselect top "protein and resid 1 and alpha" frame 0]

set P [atomselect top "protein and resid 20 and alpha" frame 0]

set Q [atomselect top "protein and resid 40 and alpha" frame 0]

set A [lindex [$O get {x y z}] 0]

set B [lindex [$P get {x y z}] 0]

set C [lindex [$Q get {x y z}] 0]

set D [vecsub $B $A]

set E [vecsub $C $A]

set F [veccross $D $E]

set G [veccross $D $F]

 

#set matrix transformation

 

set M1 [transvec $D]

 

# move structures of each frame to this axes

 

set nf [molinfo top get numframes]

set protein [atomselect top "protein"]

for {set i 0 } {$i < $nf } { incr i } {

$protein frame $i

$protein move $M1

}

 

With command transvec returns the transformation matrix needed to bring the x axis along the vector, so I need to do it with another axis (y may be). Does somebody know how I can do that?

 

Thanks a lot

 

Andres

_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us