Ignore:
Timestamp:
Apr 20, 2011 12:30:01 PM (10 years ago)
Author:
lake
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/rbimport_zmatrix.tcl

    r1133 r1135  
    11
    22     set ::rb_loader(zmatrix) RB_Zmat_Load
    3      set ::rb_descriptor(zmatrix) "Z-Matrix"
     3     set ::rb_descriptor(zmatrix) "Cartesian Coordinates generated by Z-Matrix"
    44
    55proc RB_Zmat_Load {args} {
     
    1111     pack [frame $zmat.con -bd 2 -relief groove] -side top
    1212     pack [frame $zmat.display -bd 2 -relief groove] -side top -expand 1 -fill both
     13     pack [frame $zmat.save -bd 2 -relief groove] -side bottom
    1314     wm title $zmat "Load rigid body information from Z-Matrix"
    1415     wm geometry $zmat 600x600+10+10
     
    2728
    2829     grid [button $zmat.con.but -text "Load Z-Matrix" -width 22 -command "RB_Zmat $zmat.display"] -row 2 -column 1
    29      grid [button $zmat.con.but2 -text "Convert to Cartesian" -width 22 -command "RB_Zmat_Convert"] -row 3 -column 1
    30      grid [button $zmat.con.but3 -text "Quit" -width 22 -command "destroy .zmatrix"] -row 4 -column 1
     30     grid [button $zmat.save.but2 -text "Convert to Cartesian \n Coordnates" -width 17 -command "RB_Zmat_Convert"] -row 2 -column 1 -padx 5
     31          $zmat.save.but2 config -state disable
     32     grid [button $zmat.save.but3 -text "Abort" -width 17 -command "destroy .zmatrix"] -row 2 -column 2 -padx 5 -sticky ns
     33
    3134}
    3235
     
    4548     }
    4649     RB_Zmat_Display $location
     50     .zmatrix.save.but2 config -state normal
    4751 }
    4852
     
    124128}
    125129proc RB_Zmat_Convert {args} {
    126      set bodytyp [expr [llength [RigidBodyList]] + 1]
     130     set bodytyp [RB_New_RBnum]
     131     puts "bodytyp = $bodytyp"
     132#     set bodytyp [expr [llength [RigidBodyList]] + 1]
    127133     set atomlist ""
    128134     for {set z 1} {$z <= [expr $::rb_linenum - 1]} {incr z} {
     
    148154     set coordnum 0
    149155
     156     catch {array unset ::rb_x $bodytyp,1,*}
     157     catch {array unset ::rb_y $bodytyp,1,*}
     158     catch {array unset ::rb_z $bodytyp,1,*}
     159
    150160     foreach coord $coordlist {
    151161             incr coordnum
Note: See TracChangeset for help on using the changeset viewer.