TCL: divide by zero

From: supram_at_nankai.edu.cn
Date: Thu Feb 05 2009 - 10:08:11 CST

Dear namd users, Can some tell me what the matter with my programe? The output was as follows: FATAL ERROR: divide by zero while executing "expr {$term / $sum}" (procedure "vecnorm" line 5) invoked from within "vecnorm [veccross $vecd $u" ("cyl" arm line 10) invoked from within "switch $type { "dist" { # Apply a harmonic restraint to a distance foreach { a1 a2 } $atoms($r) {} set k [lindex $rArray($r) 3] set r..." ("foreach" body line 4) invoked from within "foreach r [ array names atoms ] { set type [ lindex $rArray($r) 0 ] switch $type { "dist" { # Apply a harmonic restraint to a distance ..." (in namespace eval "::ABF" script line 6) invoked from within "namespace eval ABF { loadcoords coords # Loop on requested restraints foreach r [ array names atoms ] { set type [ lindex $rArray($..." (procedure "restraints" line 2) invoked from within "restraints " (in namespace eval "::ABF" script line 14) invoked from within "namespace eval ::ABF { # First timestep : we don't have forces if { $timestep == 0 } { # must not be equal to $timestep - 1 set timeStored -2 ..." (procedure "calcforces" line 2) invoked from within "calcforces"

z{Sʗ{٥r
z{S}ĝxjǺDear namd users, Can some tell me what the matter with my programe? The output was as follows: FATAL ERROR: divide by zero while executing "expr {$term / $sum}" (procedure "vecnorm" line 5) invoked from within "vecnorm [veccross $vecd $u" ("cyl" arm line 10) invoked from within "switch $type { "dist" { # Apply a harmonic restraint to a distance foreach { a1 a2 } $atoms($r) {} set k [lindex $rArray($r) 3] set r..." ("foreach" body line 4) invoked from within "foreach r [ array names atoms ] { set type [ lindex $rArray($r) 0 ] switch $type { "dist" { # Apply a harmonic restraint to a distance ..." (in namespace eval "::ABF" script line 6) invoked from within "namespace eval ABF { loadcoords coords # Loop on requested restraints foreach r [ array names atoms ] { set type [ lindex $rArray($..." (procedure "restraints" line 2) invoked from within "restraints " (in namespace eval "::ABF" script line 14) invoked from within "namespace eval ::ABF { # First timestep : we don't have forces if { $timestep == 0 } { # must not be equal to $timestep - 1 set timeStored -2 ..." (procedure "calcforces" line 2) invoked from within "calcforces"

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:52:20 CST