From: daniel aguayo (bioquimico_at_gmail.com)
Date: Wed Nov 15 2006 - 13:29:58 CST

Dear Jan and VMD users:
   I found a new bug on paratool,

###################################### ERROR
###############################################
can't read "base(-1)": no such element in array
can't read "base(-1)": no such element in array
    while executing
"puts "base(-1)=$base(-1); atom(-1)=$atom(-1)""
    (procedure "::Paratool::Energy::make_distortion" line 41)
    invoked from within
"::Paratool::Energy::make_distortion $molidbase $type [array get pos]
[array get atom] -dx $dx"
    (procedure
"::Paratool::Hessian::compute_force_constants_from_inthessian" line 67)
    invoked from within
"::Paratool::Hessian::compute_force_constants_from_inthessian"
    ("SIP" arm line 32)
    invoked from within
"switch $type {
      OPT {
     variable molidopt $newmolid
     variable molnameopt [molinfo $newmolid get name]

     if {[llength [::QMtool::get_scfenerg..."
    (procedure "load_molecule" line 72)
    invoked from within
"load_molecule SIP $file"
    (procedure "::Paratool::opendialog" line 131)
    invoked from within
"::Paratool::opendialog loadsip "[file rootname
${::Paratool::molnamebase}]_sp""
    (menu invoke)

######################################################################################################
######################################################################################################

I can trace it to the line 93 of the file paratool_energies.tcl
The problem happens when the variable base(-1) is called because its not
always define
as you can see here

########################## proc ::Paratool::Energy::make_distortion file
paratool_energies.tcl lines 58 - 99 ###########
# Construct selections left and right of the conformation
   if {[string match "*bond" $type]} {
      set inring [::Paratool::bond_in_ring $base(0) $base(1)]
      if {[llength $inring]} {
     puts "BOND $base(0)--$base(1) IN RING"
     variable ::Paratool::ringlist
     set vis {}; # will contain the two ring neighbors of atom(0)
     set sel [atomselect $molidbase "index $base(0)"]
     foreach nb [join [$sel getbonds]] {
        if {[lsearch [lindex $ringlist $inring] $nb]>=0} {
           # This neighbor of atom(0) is part of the ring
           lappend vis $atomtrans($nb)
           if {$nb!=$base(1)} { set base(-1) $nb }
        }
     }
     $sel delete
     set atom(-1) [::Paratool::ldiff $vis $atom(1)]
     puts "base(-1)=$base(-1); atom(-1)=$atom(-1)"
     set base(-2) [lindex [::Paratool::ring_order [lindex $ringlist $inring]
$base(0) $base(-1)] 2]

#############################################################################

I'm trying yo solve it, but if you can help me i'll be very thakful

Daniel Aguayo V.
Biochemistry Student
Andres Bello University
Santiago, Chile.

-- 
saludos desde el fin del mundo