From: debra ragland (ragland.debra_at_REMOVE_yahoo.com)
Date: Mon Feb 15 2016 - 08:23:38 CST

Hello VMD-ers!

I am trying to edit the basic distance.tcl-and I'm no good with scripting in the tcl language. I want to impose certain constraints so that the output from distance calculations are binned exactly the same. I believe to do this I would have to change this portion of the original script

set r_min $simdata(0.r)
set r_max $simdata(0.r)
for {set i 0} {$i < $nf} {incr i} {
set r_tmp $simdata($i.r)
if {$r_tmp < $r_min} {set r_min $r_tmp}
if {$r_tmp > $r_max} {set r_max $r_tmp}
}

set dr [expr ($r_max - $r_min) /($N_d - 1)]
for {set k 0} {$k < $N_d} {incr k} {
set distribution($k) 0
}

As I would also like to change dr to 0.25.

If I want to say, change r_min to 4 and r_max to 30, how do I do this? I've tried replacing 0.r with some number.r and set dr .. to set dr [0.25], but from the command line, I get the error
invalid command name "distance"
for any change I make.

I should state that the normal distance.tcl script works fine with my input scripts when left undisturbed.

Any help is appreciated.