Changeset 255 for trunk/expgui
- Timestamp:
- Dec 4, 2009 5:03:00 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expgui
- Property rcs:date changed from 2000/07/28 20:29:34 to 2000/08/04 18:29:16
- Property rcs:lines changed from +117 -49 to +41 -35
- Property rcs:rev changed from 1.30 to 1.31
r250 r255 666 666 global expgui expmap 667 667 eval destroy [winfo children $expgui(phaseFrame).top.ps] 668 pack [label $expgui(phaseFrame).top.ps.0 -text Phase:] -side left 668 669 foreach num $expmap(phaselist) type $expmap(phasetype) { 669 670 pack [button $expgui(phaseFrame).top.ps.$num -text $num \ 670 -command "SelectOnePhase $num" ] -side left671 -command "SelectOnePhase $num" -padx 1.5m] -side left 671 672 if {$type > 3} { 672 673 $expgui(phaseFrame).top.ps.$num config -state disabled 673 674 } 675 } 676 if {[file executable $expgui(exptool)] && \ 677 [llength $expmap(phaselist)]} { 678 pack [button $expgui(phaseFrame).top.ps.10 -text "Add Phase" \ 679 -padx 1.5m -command MakeAddPhaseBox] -side left 674 680 } 675 681 } … … 680 686 global entryvar entrycmd expmap expgui 681 687 set crsPhase {} 688 $expgui(atomxform) config -text "Xform Atoms" -state disabled 682 689 foreach n $expmap(phaselist) type $expmap(phasetype) { 683 690 if {$n == $num && $type <= 3} { … … 776 783 set multhead "Mult" 777 784 set coordhead " " 785 set frachead "Occupancy" 778 786 if {$expgui(asorttype) == "type"} { 779 787 # sort on atom type … … 797 805 } 798 806 set expmap(atomlistboxcontents) [lsort -integer -decreasing -index 1 $atomlist] 807 } elseif {$expgui(asorttype) == "occupancy"} { 808 # sort on atom number 809 set frachead " Occup* " 810 foreach atom $expmap(atomlist_$phase) { 811 lappend atomlist "$atom [atominfo $phase $atom frac] $phase" 812 } 813 set expmap(atomlistboxcontents) [lsort -real -decreasing -index 1 $atomlist] 799 814 } elseif {$expgui(asorttype) == "x"} { 800 815 # sort on x … … 868 883 $namehead $typehead "ref/damp " \ 869 884 "fractional coordinates$coordhead" \ 870 "$multhead Occupancy" \871 " Uiso/Uij "]885 "$multhead $frachead" \ 886 " Uiso/Uij "] 872 887 } else { 873 888 $expgui(atomtitle) insert end [format "%10s %6s %8s%29s %9s %s" \ 874 889 $namehead $typehead "ref/damp " \ 875 890 "fractional coordinates$coordhead" \ 876 "$multhead Occupancy" \877 " Uiso"]891 "$multhead $frachead" \ 892 " Uiso"] 878 893 } 879 894 if {$mode != "reset"} { … … 904 919 905 920 if {[llength $expgui(selectedatomlist)] == 0} { 906 puts "How did this happen: [$expgui(atomlistbox) curselection]"921 if $expgui(debug) {error "Attempt display non-existent atoms"} 907 922 } elseif {[llength $expgui(selectedatomlist)] == 1} { 908 923 editOneRecord $expgui(selectedatomlist) … … 926 941 DisplayRefFlags $atomnum $p 927 942 $expgui(EditingAtoms) config -text "Editing atom #$atomnum -- [atominfo $p $atomnum label]" 943 $expgui(atomxform) config -text "Xform Atom" -state normal 928 944 } 929 945 … … 947 963 # this needs to track by phase 948 964 DisplayRefFlags $numberList $p 965 $expgui(atomxform) config -text "Xform Atoms" -state normal 949 966 } 950 967 … … 1303 1320 } 1304 1321 # Top box 1305 if $expgui(haveBW) {1306 catch {destroy $expgui(histFrame).pflag}1307 }1308 1322 if {$expgui(globalmode) != 0} { 1323 if $expgui(haveBW) { 1324 catch {destroy $expgui(histFrame).pflag} 1325 } 1309 1326 $expgui(histFrame).top.txt config \ 1310 1327 -text "Selected Histograms: [CompressList $histlist]" … … 1314 1331 grid forget $expgui(histFrame).top 1315 1332 set expgui(bkglbl) "Edit Background" 1316 if {$expgui(haveBW) && [llength $expmap(phaselist)] > 1} { 1333 if $expgui(haveBW) { 1334 catch {destroy $expgui(histFrame).pflag} 1317 1335 TitleFrame $expgui(histFrame).pflag \ 1318 1336 -borderwidth 4 -side left -relief groove \ … … 1638 1656 } 1639 1657 1658 # this gets the phase flags as set in the expgui(pflag*) elements 1659 # (linked to phase flag checkbuttons) and the sets the "HST xx NPHAS" flags 1660 # accordingly using SetPhaseFlag 1640 1661 proc GetPhaseFlags {hist} { 1641 1662 global expmap expgui … … 1647 1668 incr expgui(changed) 1648 1669 mapexp 1649 }1650 1651 proc SetPhaseFlag {hist plist} {1652 # make a 2 digit key -- hh1653 if {$hist < 10} {1654 set hh " $hist"1655 } else {1656 set hh $hist1657 }1658 set key "HST $hh NPHAS"1659 set str {}1660 foreach iph {1 2 3 4 5 6 7 8 9} {1661 if {[lsearch $plist $iph] != -1} {1662 append str { 1}1663 } else {1664 append str { 0}1665 }1666 }1667 setexp $key $str 1 681668 1670 } 1669 1671 … … 2644 2646 pack [label $expgui(phaseFrame).top.ps.0 -text "No Phases"] -side left 2645 2647 2646 grid [label $expgui(phaseFrame).top.lA -text " Phase name:"\2648 grid [label $expgui(phaseFrame).top.lA -text title: \ 2647 2649 -fg blue ] -column 1 -row 0 -sticky e 2648 2650 grid [entry $expgui(phaseFrame).top.lB -textvariable entryvar(phasename) \ … … 2676 2678 -column 1 -row 0 -rowspan 2 2677 2679 if [file executable $expgui(exptool)] { 2678 button $frameLatt.newp -text Add\nPhase -command MakeAddPhaseBox 2680 button $frameLatt.newp -text Replace\nPhase \ 2681 -command MakeReplacePhaseBox -state disabled 2679 2682 grid $frameLatt.newp -column 0 -row 0 -rowspan 2 -sticky w 2680 2683 } … … 2688 2691 set expgui(atomtitle) $fbig.title 2689 2692 bind $expgui(atomtitle) <Button-1> { 2690 set i [lsearch {number type mult x y z } $expgui(asorttype)]2693 set i [lsearch {number type mult x y z occupancy} $expgui(asorttype)] 2691 2694 incr i 2692 set expgui(asorttype) [lindex {number type mult x y z number} $i]2695 set expgui(asorttype) [lindex {number type mult x y z occupancy number} $i] 2693 2696 DisplayAllAtoms 2694 2697 } … … 2726 2729 grid $frame3.newa -column 11 -row 0 2727 2730 } 2728 2731 button [set expgui(atomxform) $frame3.xa] \ 2732 -command {MakeXformAtomsBox $expgui(curPhase)} 2733 grid $expgui(atomxform) -column 11 -row 1 -sticky ew 2734 2729 2735 set f3l1 [label $frame3.l1 -text "Refinement Flags " -bg beige] 2730 2736 grid $f3l1 -column 0 -row 1 -padx 2 -sticky nsw -pady 3 … … 3169 3175 set expgui(asorttype) number 3170 3176 menu $expgui(fm).option.menu.asort 3171 foreach opt {number type mult x y z } {3177 foreach opt {number type mult x y z occupancy} { 3172 3178 $expgui(fm).option.menu.asort add radiobutton -command DisplayAllAtoms \ 3173 3179 -label $opt -value $opt -variable expgui(asorttype)
Note: See TracChangeset
for help on using the changeset viewer.