Changeset 1010 for branches


Ignore:
Timestamp:
Sep 17, 2010 3:15:43 PM (13 years ago)
Author:
chlake
Message:

Fixed bug in SR_Write_Restraint Procedure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/distrest.tcl

    r1009 r1010  
    478478        set sr_write ""
    479479        set new_list ""
    480         set len [llength $::sr_bond_list]
     480#       set len [llength $::sr_bond_list]
    481481        set ::sr_key_list ""
    482         for {set i 0} {$i <= [expr $len-1]} {incr i} {
    483             set temp [lindex $::sr_bond_list $i]
    484             if {[string trim $::sr_restraintdist([lindex $temp 13])] != ""} {
     482        foreach temp $::sr_bond_list  {
     483puts $temp
     484#       for {set i 0} {$i <= [expr $len-1]} {incr i} {}
     485#           set temp [lindex $::sr_bond_list $i]
     486
     487           catch {
     488            if {[string trim $::sr_restraintdist([lindex $temp 13])] != ""} {
    485489                set softrest "[lindex $temp 0] [lindex $temp 1] \
    486490                                [lindex $temp 2] [lindex $temp 3] [lindex $temp 4] \
     
    489493                                $::sr_restraintesd([lindex $temp 13])"
    490494                lappend sr_write $softrest
     495puts $softrest
    491496                lappend new_list $temp
    492 
    493                 #                    } else {
    494                 #                           unset ::sr_restraintdist([lindex $temp 13])
    495                 #                           unset ::sr_restraintesd([lindex $temp 13])
    496497            }
    497         }
     498            }
     499        }
     500#
    498501        #puts $sr_write
    499502        # put the entire restraint list back into the .EXP file
Note: See TracChangeset for help on using the changeset viewer.