From: kirtana S (skirtana4_at_gmail.com)
Date: Thu Sep 08 2011 - 17:38:04 CDT

I want to know where I am going wrong here
 using the script as below

set sum 0
foreach mass [$selection get mass] {
set sum [expr $sum + $mass]
}
puts "mass is sum $sum"
set com 0
foreach coord [$sel get {x}] {
set com [vecadd $com [$vecscale $sum $coord]]
}
puts "x is $com"

though this runs my value for center of mass coordinate for x is a bit weird
as my output says
x is -17586.98

where am i going wrong here

Thanks
kirtana