From: Leonardo Sepulveda Durán (leonardosepulveda_at_gmail.com)
Date: Thu Aug 31 2006 - 12:25:29 CDT

Hello!!
I am making a tcl script to calculate CA-CA distances between two
protein conformers after a all-residue fit and a fragment-based-fit. I
am having troubles with vecsub when I am calculating distances. This
is an extract from the script

# Untill now, there has been defined the following variables
# $transformation_mat_all = tranformation matrix for all residue fit
# $transformation_mat_fragment = transformation matrix for fragment-fragment fit
# $mol1 = molecule number (0)
# $mol2 = molecule number (1)

# select atoms to be transformed
set atom1 [atomselect $mol1 "protein and resid $res and name CA"]
set atom2_all [atomselect $mol2 "protein and resid $res and name CA"]
set atom2_fragment [atomselect $mol2 "protein and resid $res and name CA"]

# Apply the transformation matrix to each atom and then get coordinates
set coords_atom1 [$atom1 get {x y z}]

$atom2_all move $transformation_mat_all
set coords_atom2_all [$atom2_all get {x y z}]

$atom2_fragment move $transformation_mat_fragment
set coords_atom2_fragment [$atom2_fragment get {x y z}]

puts "ref $coords_atom1\n all $coords_atom2_all\n frag $coords_atom2_fragment"

# calculate distances
set all_fit_dist [veclength [vecsub $coords_atom2_all $coords_atom1]]
set fragment_fit_dist [veclength [vecsub $coords_atom2_fragment $coords_atom1]]

The script gives the following output:

ref {38.5200004578 33.1399993896 70.9199981689}
 all {52.9906997681 41.315071106 96.4374847412}
 frag {57.7048492432 28.8902702332 81.9101409912}
vecsub: non-numeric in first argument

Someone Know where is the problem?

Thanks

Leonardo Sepulveda
Universidad de Chile