Changeset 1125 for branches/sandbox


Ignore:
Timestamp:
Mar 23, 2011 5:37:14 PM (10 years ago)
Author:
toby
Message:

resolve conflict by returning to CHL last

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/rigid.tcl

    r1118 r1125  
    55 #proc RB_Populate
    66
    7 <<<<<<< .mine
    87# debug code to load test files when run as an independent script
    98if {[array name expgui shell] == ""} {
     
    2625################################################################
    2726# Procedure to determine possible RB file formats available
    28 =======
    29 # debug code to load test files when run as an independent script
    30 if {[array name expgui shell] == ""} {
    31     lappend auto_path c:/gsas/expgui
    32     package require Tk
    33     package require BWidget
    34     #package require La
    35     #namespace import La::*
    36     source c:/gsas/sandboxexpgui/readexp.tcl
    37     source c:/gsas/sandboxexpgui/gsascmds.tcl
    38     source c:/gsas/sandboxexpgui/rb.tcl
    39     expload rb6.exp
    40     mapexp
    41 } else {
    42     source [file join $expgui(scriptdir) rb.tcl]
    43 }
    44 >>>>>>> .r1117
    45 
    46 <<<<<<< .mine
     27
    4728proc RB_Import_Data_Type {args} {
    4829    global expgui tcl_platform
     
    6142    return $::rbtypelist
    6243}
    63 =======
    64 >>>>>>> .r1117
    6544############################################################
    66 <<<<<<< .mine
    6745#global variables generated by RB_Load         (x = rigid body number
    6846#                                              y = matrix number
     
    7957#          ::rb_z(bodytyp,matrixnum,coordnum   z coordinate
    8058#          ::rb_lbl(bodytyp,matrixnum,coordnum label for coordinate triplet
    81 =======
    82 #global variables generated by RB_Load (x = rigid body number
    83 #                                       y = matrix number
    84 #                                       z = coordinate number
    85 #          ::rb_map(x)          number of times rigid body is mapped.
    86 #          ::rb_matrix_num(x)   number of matrices in rigid body.
    87 #          ::rb_mult(x,y)       multiplier for matrix.
    88 #          ::rb_damp(x,y)       damping factor for matrix.
    89 #          ::rb_var(x,y)        variable for matrix.
    90 #          ::rb_coord_num(x,y)  number of coordinates associated with matrix.
    91 #          ::rb_coord(x,y,z)    coordinates
    92 #          ::rb_phase_list      list of phases
    93 >>>>>>> .r1117
    9459
    9560proc RB_Load_RBdata {args} {
    96 <<<<<<< .mine
    9761    catch {unset ::rb}
    9862    #Loop over the rigid body types in EXP file
    9963    foreach bodytyp [RigidBodyList] {
    10064             set rb($bodytyp) [ReadRigidBody $bodytyp]
    101 
    102 =======
    103      catch {unset ::rb}
    104 #Loop over the rigid body types in EXP file
    105     foreach i [RigidBodyList] {
    106              set rb($i) [ReadRigidBody $i]
    107 >>>>>>> .r1117
    10865             #Set the number of times rigid body is mapped.
    10966             set ::rb_map($bodytyp) [lindex $rb($bodytyp) 0]
     
    332289# Procedures to delete rigid bodies
    333290
    334 <<<<<<< .mine
    335291proc RB_Delete_Body {bodytyp location args} {
    336292     destroy $location.delete
     
    355311                     UnMapRigidBody $p $bodytyp $map
    356312             }
    357 =======
    358      set rb_body_list [NoteBook $rb_nb -side top]
    359     # loop over rigid body types
    360     set pagelist {}
    361     foreach x [RigidBodyList] {
    362          $rb_body_list insert $x rb_body$x -text "Rigid Body Type $x"  \
    363          -raisecmd "RB_Populate $rb_body_list $x"
    364 >>>>>>> .r1117
    365313        lappend pagelist rb_body$x
    366314     }
    367 <<<<<<< .mine
    368315#    delete the rigid body
    369316     puts "delete rigid body number $bodytyp"
     
    375322     RB_Load_RBdata
    376323     RB_Control_Panel 0
    377 =======
    378      $rb_body_list insert 16 rb_body16 -text "Create Rigid Body"
    379     lappend pagelist rb_body16
    380      grid $rb_body_list -sticky news -column 0 -row 1 -columnspan 2
    381      grid columnconfig $rcb 1 -weight 1
    382      grid rowconfig    $rcb 1 -weight 1
    383     $rb_body_list raise [lindex $pagelist 0]
    384 >>>>>>> .r1117
    385324}
    386325
     
    397336
    398337     #Rigid body mapping control panel along with matrix multipliers and damping factor labels
    399 <<<<<<< .mine
    400338     grid [label  $con.rb_num -text "Rigid Body Type $bodytyp"] -row 0 -column 0 -padx 5 -pady 5
    401339     grid [button $con.rb_newmap -text "Map Body $bodytyp" -command "RB_Map_New $bodytyp"] -row 0 -column 1 -padx 5 -pady 5
     
    403341     button $con.rb_delete -text "Delete Body $bodytyp" -command "RB_Delete_Body $bodytyp $con.rb_delete"
    404342     grid   $con.rb_delete -row 4 -column 2 -padx 5 -pady 5
    405 =======
    406      grid [label  $con.rb_num -text "Rigid Body Type $x"] -row 0 -column 0 -padx 5 -pady 5
    407      grid [button $con.rb_newmap -text "Map Body $x" -command "RB_Map_New $x"] -row 0 -column 1 -padx 5 -pady 5
    408 >>>>>>> .r1117
    409343
    410344
     
    430364     grid [label $main.rb_origin -text "Origin"] -row 0 -column 3 -columnspan 3
    431365     grid [label $main.rb_euler -text "Euler Angles"] -row 0 -column 6 -columnspan 3
    432 <<<<<<< .mine
    433366     grid [label $main.rb_site -text "Sites"] -row 0 -column 10 -columnspan 3
    434367     grid [label $main.rb_ref -text "Phase"] -row 1 -column 2
    435 =======
    436      grid [label $main.rb_ref -text "Phase"] -row 1 -column 2
    437      #grid [label $main.rb_ref -text "Refinement"] -row 1 -column 2
    438 >>>>>>> .r1117
    439368     grid [label $main.rb_map -text "Map"] -row 1 -column 1
    440369     grid [label $main.rb_x   -text "x"] -row 1 -column 3
     
    456385     foreach phase $phaselist {
    457386             incr row
    458 <<<<<<< .mine
    459387             foreach mapnum [RigidBodyMappingList $phase $bodytyp] {
    460388                      set row [expr $row + $mapnum]
     
    468396                      grid [label $main.rb_z$phase$mapnum   -text "[format %1.3f [lindex $origin 2]]"] -row $row -column 5 -padx 5
    469397                      set euler $::rb_map_euler($phase,$bodytyp,$mapnum)
    470 =======
    471              foreach z [RigidBodyMappingList $p $x] {
    472                       set row [expr $row + $z]
    473                       RB_Load_Mapdata $p $x $z
    474                       grid [label $main.rb_map$p$z -text "$z"] -row $row -column 1
    475                       grid [label $main.rb_cb$p$z -text $p] -row $row -column 2
    476 
    477                       #grid [button $main.rb_cb$p$z -text "off" -command "RB_View_Parameters $p $x $z"] -row $row -column 2
    478                       set origin $::rb_map_origin($p,$x,$z)
    479                       puts $origin
    480                       grid [label $main.rb_x$p$z   -text [lindex $origin 0]] -row $row -column 3
    481                       grid [label $main.rb_y$p$z   -text [lindex $origin 1]] -row $row -column 4
    482                       grid [label $main.rb_z$p$z   -text [lindex $origin 2]] -row $row -column 5
    483                       set euler $::rb_map_euler($p,$x,$z)
    484 >>>>>>> .r1117
    485398                      for {set j 0} {$j < 3} {incr j} {
    486399                                  set euler1 [lindex $euler $j]
     
    497410                      grid $main.rb_euler_$phase$mapnum$q -row $row -column 8 -padx 5
    498411                      set col 11
    499 <<<<<<< .mine
    500412                      set atomnum $::rb_map_beginning($phase,$bodytyp,$mapnum)
    501413                      for {set j 1} {$j <=$::rb_coord_num($bodytyp,1)} {incr j} {
    502414                          set atom [atominfo $phase $atomnum label]
    503415                          grid [label $main.rb_site$phase$mapnum$j -text "$atom"] -row $row -column $col -padx 5
    504 =======
    505                       set atomnum $::rb_map_beginning($p,$x,$z)
    506                       for {set j 1} {$j <=$::rb_coord_num($x,$y)} {incr j} {
    507                           set atom [atominfo $p $atomnum label]
    508                           grid [label $main.rb_site$p$z$j -text "$atom"] -row $row -column $col
    509 >>>>>>> .r1117
    510416                          incr atomnum
    511417                          incr col
     
    517423}
    518424
    519 <<<<<<< .mine
    520 =======
    521 proc RB_Choose_Atom {rbnum args} {
     425
     426#######################################################################
     427# New Mapping Event
     428# not updated
     429
     430proc RB_Map_New {bodytyp args} {
     431    catch {unset ::rb_finput}
     432    set ::rb_finput ""
     433    set ::body_type $bodytyp
     434    catch {destroy .newmap}
     435    set nm .newmap
     436    toplevel $nm
     437    wm title $nm "Map Rigid Body #$bodytyp"
     438
     439    foreach item [trace vinfo ::rb_phase] {
     440            eval trace vdelete ::rb_phase $item
     441    }
     442
     443    set ::rb_phase [lindex $::expmap(phaselist) 0]
     444    set nmap [expr $::rb_map($bodytyp) + 1]
     445    eval tk_optionMenu $nm.pinput ::rb_phase $::expmap(phaselist)
     446    grid [label $nm.phase -text "Phase: "] -row 3 -column 1
     447    grid [label $nm.f_atom -text "Choose first atom Number"] -row 4 -column 1
     448    grid [label $nm.origin -text "input origin in fractional coordinates: "] -row 6 -column 1
     449    grid [label $nm.euler -text "input Euler angles: "] -row 7 -column 1
     450    grid [entry $nm.finputm -textvariable ::rb_finput -width 8 -takefocus 1] -row 4 -column 2
     451
     452    foreach item [trace vinfo ::rb_finput] {
     453            eval trace vdelete ::rb_finput $item
     454    }
     455    trace variable ::rb_finput w "RB_Atom_List \$::rb_phase \$::rb_finput $nm $bodytyp 1"
     456
     457    grid [button $nm.finput -text "list allowed" -command "RB_Choose_Atom $bodytyp"] -row 4 -column 3
     458    grid [label $nm.o1l -text "x"] -row 5 -column 2
     459    grid [label $nm.o2l -text "y"] -row 5 -column 3
     460    grid [label $nm.o3l -text "z"] -row 5 -column 4
     461    grid [entry $nm.o1 -width 8 -textvariable ::origin1 -takefocus 1] -row 6 -column 2
     462    grid [entry $nm.o2 -width 8 -textvariable ::origin2 -takefocus 1] -row 6 -column 3
     463    grid [entry $nm.o3 -width 8 -textvariable ::origin3 -takefocus 1] -row 6 -column 4
     464    grid [entry $nm.e1 -width 8 -textvariable ::euler1 -takefocus 1] -row 7 -column 2
     465    grid [entry $nm.e2 -width 8 -textvariable ::euler2 -takefocus 1] -row 7 -column 3
     466    grid [entry $nm.e3 -width 8 -textvariable ::euler3 -takefocus 1] -row 7 -column 4
     467
     468    grid $nm.pinput -row 3 -column 3
     469
     470    grid [frame $nm.p] -row 8 -column 1 -columnspan 4 -sticky e
     471    grid [button $nm.p.fit -text "Fit rigid body to phase" -command "FitBody2coords $bodytyp $nm"] -row 0 -column 1
     472    grid [button $nm.p.plot -text "Plot rigid body & phase" -command "PlotStrBody $bodytyp $nm"] -row 1 -column 1
     473    grid [label $nm.p.l -text "Bonds: "] -row 1 -column 2
     474    grid [entry $nm.p.e] -row 1 -column 3
     475    $nm.p.e delete 0 end
     476    $nm.p.e insert 0 "0.9-1.1, 1.3-1.6"
     477
     478    grid [frame $nm.l] -row 9 -column 2 -columnspan 3
     479    grid [button $nm.l.s -text "map update" -width 12 -command {RB_Write_Map}] -column 1 -row 1
     480    grid [button $nm.l.q -text "Quit" -width 6 -command "destroy $nm"] -column 2  -row 1
     481
     482    foreach item [trace vinfo ::rb_phase] {
     483            eval trace vdelete ::rb_phase $item
     484    }
     485    trace variable ::rb_phase w "RB_ProcessPhase $bodytyp"
     486    RB_Control_Panel $bodytyp
     487}
     488
     489###########################################################
     490# Procedure for choosing first atom during mapping event.
     491# not updated
     492
     493proc RB_Choose_Atom {bodytyp args} {
    522494#     set ::rb_finput ""
    523495    set phase $::rb_phase
    524496    # get the number of atoms in this type of body
    525     set natoms [llength [lindex [lindex [lindex [ReadRigidBody $rbnum] 1] 0] 3]]
     497    set natoms [llength [lindex [lindex [lindex [ReadRigidBody $bodytyp] 1] 0] 3]]
    526498    set atomlist [RigidStartAtoms $::rb_phase $natoms]
    527499    if {[llength $atomlist] == 0} {
    528         RB_ProcessPhase $rbnum
     500        RB_ProcessPhase $bodytyp
    529501        return
    530502    }
     
    554526      afterputontop
    555527}
    556 >>>>>>> .r1117
    557 
    558 #######################################################################
    559 # New Mapping Event
    560 # not updated
    561 
    562 proc RB_Map_New {bodytyp args} {
    563     catch {unset ::rb_finput}
    564     set ::rb_finput ""
    565     set ::body_type $bodytyp
    566     catch {destroy .newmap}
    567     set nm .newmap
    568     toplevel $nm
    569 <<<<<<< .mine
    570     wm title $nm "Map Rigid Body #$bodytyp"
    571 
    572     foreach item [trace vinfo ::rb_phase] {
    573             eval trace vdelete ::rb_phase $item
    574     }
    575 
    576     set ::rb_phase [lindex $::expmap(phaselist) 0]
    577     set nmap [expr $::rb_map($bodytyp) + 1]
    578 =======
    579     wm title $nm "Map Rigid Body #$x"
    580     set ::phase 1
    581     set nmap [expr $::rb_map($x) + 1]
    582 >>>>>>> .r1117
    583     eval tk_optionMenu $nm.pinput ::rb_phase $::expmap(phaselist)
    584     grid [label $nm.phase -text "Phase: "] -row 3 -column 1
    585     grid [label $nm.f_atom -text "Choose first atom Number"] -row 4 -column 1
    586     grid [label $nm.origin -text "input origin in fractional coordinates: "] -row 6 -column 1
    587     grid [label $nm.euler -text "input Euler angles: "] -row 7 -column 1
    588     grid [entry $nm.finputm -textvariable ::rb_finput -width 8 -takefocus 1] -row 4 -column 2
    589 
    590     foreach item [trace vinfo ::rb_finput] {
    591             eval trace vdelete ::rb_finput $item
    592     }
    593     trace variable ::rb_finput w "RB_Atom_List \$::rb_phase \$::rb_finput $nm $bodytyp 1"
    594 
    595 <<<<<<< .mine
    596     grid [button $nm.finput -text "list allowed" -command "RB_Choose_Atom $bodytyp"] -row 4 -column 3
    597 =======
    598     grid [button $nm.finput -text "list allowed" -command "RB_Choose_Atom $x"] -row 4 -column 3
    599 >>>>>>> .r1117
    600     grid [label $nm.o1l -text "x"] -row 5 -column 2
    601     grid [label $nm.o2l -text "y"] -row 5 -column 3
    602     grid [label $nm.o3l -text "z"] -row 5 -column 4
    603     grid [entry $nm.o1 -width 8 -textvariable ::origin1 -takefocus 1] -row 6 -column 2
    604     grid [entry $nm.o2 -width 8 -textvariable ::origin2 -takefocus 1] -row 6 -column 3
    605     grid [entry $nm.o3 -width 8 -textvariable ::origin3 -takefocus 1] -row 6 -column 4
    606     grid [entry $nm.e1 -width 8 -textvariable ::euler1 -takefocus 1] -row 7 -column 2
    607     grid [entry $nm.e2 -width 8 -textvariable ::euler2 -takefocus 1] -row 7 -column 3
    608     grid [entry $nm.e3 -width 8 -textvariable ::euler3 -takefocus 1] -row 7 -column 4
    609 
    610     grid $nm.pinput -row 3 -column 3
    611 
    612     grid [frame $nm.p] -row 8 -column 1 -columnspan 4 -sticky e
    613     grid [button $nm.p.fit -text "Fit rigid body to phase" -command "FitBody2coords $bodytyp $nm"] -row 0 -column 1
    614     grid [button $nm.p.plot -text "Plot rigid body & phase" -command "PlotStrBody $bodytyp $nm"] -row 1 -column 1
    615     grid [label $nm.p.l -text "Bonds: "] -row 1 -column 2
    616     grid [entry $nm.p.e] -row 1 -column 3
    617     $nm.p.e delete 0 end
    618     $nm.p.e insert 0 "0.9-1.1, 1.3-1.6"
    619 
    620     grid [frame $nm.l] -row 9 -column 2 -columnspan 3
    621     grid [button $nm.l.s -text "map update" -width 12 -command {RB_Write_Map}] -column 1 -row 1
    622     grid [button $nm.l.q -text "Quit" -width 6 -command "destroy $nm"] -column 2  -row 1
    623 
    624 <<<<<<< .mine
    625     foreach item [trace vinfo ::rb_phase] {
    626             eval trace vdelete ::rb_phase $item
    627     }
    628     trace variable ::rb_phase w "RB_ProcessPhase $bodytyp"
    629     RB_Control_Panel $bodytyp
    630 }
    631 =======
    632     grid [frame $nm.p] -row 8 -column 1 -columnspan 4 -sticky e
    633     grid [button $nm.p.fit -text "Fit rigid body to phase" -command "FitBody2coords $x $nm"] -row 0 -column 1
    634     grid [button $nm.p.plot -text "Plot rigid body & phase" -command "PlotStrBody $x $nm"] -row 1 -column 1
    635     grid [label $nm.p.l -text "Bonds: "] -row 1 -column 2
    636     grid [entry $nm.p.e] -row 1 -column 3
    637     $nm.p.e delete 0 end
    638     $nm.p.e insert 0 "0.9-1.1, 1.3-1.6"
    639 >>>>>>> .r1117
    640 
    641 <<<<<<< .mine
    642 ###########################################################
    643 # Procedure for choosing first atom during mapping event.
    644 # not updated
    645 =======
    646     grid [frame $nm.l] -row 9 -column 2 -columnspan 3
    647     grid [button $nm.l.s -text "Save" -width 6 -command {RB_Write_Map}] -column 1 -row 1
    648     grid [button $nm.l.q -text "Quit" -width 6 -command "destroy $nm"] -column 2  -row 1
    649 >>>>>>> .r1117
    650 
    651 <<<<<<< .mine
    652 proc RB_Choose_Atom {bodytyp args} {
    653 #     set ::rb_finput ""
    654     set phase $::rb_phase
    655     # get the number of atoms in this type of body
    656     set natoms [llength [lindex [lindex [lindex [ReadRigidBody $bodytyp] 1] 0] 3]]
    657     set atomlist [RigidStartAtoms $::rb_phase $natoms]
    658     if {[llength $atomlist] == 0} {
    659         RB_ProcessPhase $bodytyp
    660         return
    661     }
    662      catch {destroy .chooseatom}
    663      set ca .chooseatom
    664      toplevel $ca
    665      wm title $ca "Choose Atom"
    666 #     puts $atomlist
    667      foreach {top main side lbl} [MakeScrollTable $ca] {}
    668      set row 0
    669      set column 0
    670      foreach atom $atomlist {
    671         set label "[atominfo $phase $atom label] \($atom\)"
    672 # fix next line need global variable to send.
    673 #        button $main.$atom -text "$label" -command "set ::rb_finput [list $label]; destroy $ca"
    674         button $main.$atom -text $label -command "set ::rb_finput $atom; destroy $ca"
    675         incr row
    676         if {$row > 5} {
    677            set row 1
    678            incr column
    679         }
    680       grid $main.$atom -row $row -column $column -padx 5 -pady 5
    681       }
    682       ResizeScrollTable $ca
    683       putontop $ca
    684       tkwait window $ca
    685       afterputontop
    686 =======
    687     foreach item [trace vinfo ::rb_phase] {
    688             eval trace vdelete ::rb_phase $item
    689     }
    690     trace variable ::rb_phase w "RB_ProcessPhase $x"
    691     set ::rb_phase ""
    692 >>>>>>> .r1117
    693 }
    694 
    695 <<<<<<< .mine
     528
    696529
    697530
     
    802635                -message "Invalid bond input" -icon warning
    803636    }
    804 =======
    805 proc FitBody2coords {rbtype menu} {
    806     set warn ""
    807     foreach i {1 2 3} lbl {x y z} {
    808         if {[string trim [set ::euler$i]] == ""} {
    809             set ::euler$i 0.0
    810         }
    811         if {[string trim [set ::origin$i]] == ""} {
    812             set ::origin$i .0
    813         }
    814         if {[catch {expr [set ::euler$i]}]} {
    815             append warn "\tError in Euler angle around $lbl\n"
    816         }
    817         if {[catch {expr [set ::origin$i]}]} {
    818             append warn "\tError in origin $lbl\n"
    819         }
    820     }
    821     if {[catch {expr $::rb_finput}]} {
    822         append warn "\tError in 1st atom number\n"
    823     }
    824     if {$warn != ""} {
    825         MyMessageBox -parent $menu -title "Input error" \
    826                 -message "Invalid input:\n$warn" -icon warning
    827         return
    828     }
    829     set Euler [list "1 $::euler1" "2 $::euler2" "3 $::euler3"]
    830     set origin "$::origin1 $::origin2 $::origin3"
    831     set phase $::rb_phase
    832     set cell {}
    833     foreach p {a b c alpha beta gamma} {
    834         lappend cell [phaseinfo $phase $p]
    835     }
    836     set coords [RB2cart [lindex [ReadRigidBody $rbtype] 1]]
    837     set natom [llength $coords]
    838     set firstind [lsearch $::expmap(atomlist_$phase) $::rb_finput]
    839     set atoms [lrange \
    840                    [lrange $::expmap(atomlist_$phase) $firstind end] \
    841                    0 [expr {$natom-1}]]
    842     # now loop over atoms
    843     set frcoords {}
    844     foreach atom $atoms {
    845         set xyz {}
    846         foreach v {x y z} {
    847             lappend xyz [atominfo $phase $atom $v]
    848         }
    849         lappend frcoords $xyz
    850     }
    851     # it would be nice to have checkboxes for each atom, but for now use em all
    852     set useflags {}
    853     foreach i $coords {lappend useflags 1}
    854     # do the fit
    855     foreach {neworigin newEuler rmsdev newfrac rmsbyatom} \
    856         [FitBody $Euler $cell $coords $useflags $frcoords $origin] {}
    857     foreach i {1 2 3} val $neworigin pair $newEuler {
    858         set ::origin$i $val
    859         set ::euler$i [lindex $pair 1]
    860     }
    861     # show deviations
    862     foreach atom $atoms rms $rmsbyatom {
    863         puts "[atominfo $phase $atom label]\t$rms"
    864     }
    865     #puts "CalcBody $Euler $cell $coords $origin"
    866     #puts $coords
    867     #puts $frcoords
    868     #DRAWxtlPlotRBFit $frcoords $phase $::rb_finput 0 $bondlist $bondlist
    869  }
    870 
    871 
    872 proc PlotStrBody {rbtype menu} {
    873     set warn ""
    874     foreach i {1 2 3} lbl {x y z} {
    875         if {[catch {expr [set ::euler$i]}]} {
    876             append warn "\tError in Euler angle around $lbl\n"
    877         }
    878         if {[catch {expr [set ::origin$i]}]} {
    879             append warn "\tError in origin $lbl\n"
    880         }
    881     }
    882     if {[catch {expr $::rb_finput}]} {
    883         append warn "\tError in 1st atom number\n"
    884     }
    885     if {$warn != ""} {
    886         MyMessageBox -parent $menu -title "Input error" \
    887                 -message "Invalid input:\n$warn" -icon warning
    888         return
    889     }
    890     # translate bond list
    891     set bl [$menu.p.e get]
    892     regsub -all "," $bl " " bl
    893     set bondlist {}
    894     set warn ""
    895     foreach b $bl {
    896         if {[llength [split $b "-"]] == 2} {
    897             lappend bondlist [split $b "-"]
    898         } else {
    899             set warn "error parsing bond list"
    900         }
    901     }
    902     if {$warn != ""} {
    903         MyMessageBox -parent . -title "Input warning" \
    904                 -message "Invalid bond input" -icon warning
    905     }
    906 >>>>>>> .r1117
    907637     set Euler [list "1 $::euler1" "2 $::euler2" "3 $::euler3"]
    908638     set origin "$::origin1 $::origin2 $::origin3"
     
    931661   MapRigidBody $::rb_phase $::body_type $::rb_finput $origin $euler
    932662   incr ::rb_map($::body_type)
    933 <<<<<<< .mine
    934663   incr ::expgui(changed)
    935664   set curpage [$::rb_notebook raise]
     
    937666   $::rb_notebook raise $curpage
    938667#   RB_Control_Panel $::body_type
    939 =======
    940     incr ::expgui(changed)
    941    RB_Control_Panel $::body_type
    942 >>>>>>> .r1117
    943668   destroy .newmap
    944669}
     
    949674     }
    950675     set col 8
    951 <<<<<<< .mine
    952676    if {$atomnum == ""} return
    953677     grid [label $address.atomlbl -text "Atoms Mapped to Rigid Body"] -row 3 -column 8 -columnspan 99
     
    965689        grid [label $address.atom$phase$x$j -text $atom] -row 4 -column $col
    966690        incr col
    967 =======
    968     if {$atomnum == ""} return
    969      grid [label $address.atomlbl -text "Atoms Mapped to Rigid Body"] -row 3 -column 8 -columnspan 99
    970     # get the number of atoms in this type of body
    971     set natoms [llength [lindex [lindex [lindex [ReadRigidBody $x] 1] 0] 3]]   
    972     set atoms [RigidStartAtoms $phase $natoms]
    973     if {[lsearch $atoms $atomnum] == -1} {
    974          grid [label $address.atomerr -text "(invalid 1st atom)"] -row 4 -column $col
    975         return
    976     }
    977     set atoms [lrange $::expmap(atomlist_$phase) \
    978                    [lsearch $::expmap(atomlist_$phase) $atomnum] end]
    979     foreach j [lrange $atoms 0 [expr {$natoms - 1}]] {
    980         set atom [atominfo $phase $j label]
    981         grid [label $address.atom$phase$x$j -text $atom] -row 4 -column $col
    982         incr col
    983 >>>>>>> .r1117
    984691     }
    985692}
     
    992699        set natoms [llength [lindex [lindex [lindex [ReadRigidBody $rbnum] 1] 0] 3]]
    993700
    994 <<<<<<< .mine
    995701        set atoms [RigidStartAtoms $::rb_phase $natoms]
    996702    }
     
    17951501     puts "list = $varlist"
    17961502     }
    1797 
    1798 
    1799 }
    1800 =======
    1801         set atoms [RigidStartAtoms $::rb_phase $natoms]
    1802     }
    1803     set nm .newmap
    1804     if {[llength $atoms] == 0} {
    1805         foreach w "$nm.finputm $nm.p.plot $nm.p.fit $nm.p.e $nm.l.s" {
    1806             $w config -state disabled
    1807         }
    1808         $nm.finput config -text "None allowed" -state disabled
    1809     } else {
    1810         foreach w "$nm.finputm $nm.p.plot $nm.p.fit $nm.p.e $nm.l.s" {
    1811             $w config -state normal
    1812         }
    1813         $nm.finput config -text "Show allowed" -state normal
    1814     }
    1815 }
    1816 
    1817 RB_Load_RBdata
    1818 RB_Control_Panel 1
    1819 >>>>>>> .r1117
     1503}
Note: See TracChangeset for help on using the changeset viewer.