VMD-L Mailing List
From: Myunggi Yi (myunggi_at_gmail.com)
Date: Tue Dec 12 2006 - 19:12:35 CST
- Next message: Myunggi Yi: "Re: Diffusion constant"
- Previous message: Myunggi Yi: "Diffusion constant"
- In reply to: Myunggi Yi: "Diffusion constant"
- Next in thread: Myunggi Yi: "Re: Diffusion constant"
- Reply: Myunggi Yi: "Re: Diffusion constant"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi vmd users,
Now I writing my own script to calculate two dimensional diffusion constant.
I've got an error message, "vecsub: non-numeric in first argument".
I have no idea about this error message.
The following is my code.
+++++++++++++++++++++++++++++++++++++++++
proc diffusion2 { sel f1 } {
set fout [open $f1 w]
set nf [molinfo [$sel molid] get numframes]
for { set i 0 } { $i < $nf } { incr i } {
$sel frame $i
lappend cxy [$sel get {x y}]
}
set ds 0.0
set lds 0.0
puts $fout "0 0.0"
for { set i 1 } { $i < [expr $nf + 1] } { incr i } {
for { set j 0 } { $j < [expr $nf - $i] } { incr j } {
set k [expr $j + $i]
set ds [expr $ds + [veclength [vecsub [lindex $cxy $k] \
[lindex $cxy $j] ]]]
}
puts $fout "$i [expr $ds/($nf-$i)]"
set ds 0.0
}
close $fout
}
+++++++++++++++++++++++++++++++++++++++++++
Does anyone have any idea?
What is wrong with my script?
- Next message: Myunggi Yi: "Re: Diffusion constant"
- Previous message: Myunggi Yi: "Diffusion constant"
- In reply to: Myunggi Yi: "Diffusion constant"
- Next in thread: Myunggi Yi: "Re: Diffusion constant"
- Reply: Myunggi Yi: "Re: Diffusion constant"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]