Changeset 865
- Timestamp:
- Dec 4, 2009 5:13:22 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/addcmds.tcl
- Property rcs:date changed from 2005/12/16 00:36:40 to 2006/02/22 00:18:37
- Property rcs:lines changed from +5 -5 to +68 -12
- Property rcs:rev changed from 1.38 to 1.39
r853 r865 1123 1123 -column 0 -row [incr row] -sticky w 1124 1124 set newhist(usebank$i) 1 1125 grid [entry $cfr.e$i -width 8 \ 1126 -textvariable newhist(tmin$i)] \ 1127 -column 1 -row $row -sticky w 1125 grid [entry $cfr.e$i -width 8] -column 1 -row $row -sticky w 1126 if {$newhist(insttype) == "TOF"} { 1127 $cfr.e$i config -textvariable newhist(tmin$i) 1128 } else { 1129 $cfr.e$i config -textvariable newhist(tmax$i) 1130 } 1128 1131 } 1129 1132 # resize the list … … 1604 1607 grid [button $w1.d1 -text "Xform Origin 1 to Origin 2" \ 1605 1608 -command "XformAtoms2Origin2 $phase [list $numberList] $w1 [list $shift]" \ 1606 ] -row [incr row] -column 0-columnspan 10 -sticky e1609 ] -row [incr row] -column 3 -columnspan 10 -sticky e 1607 1610 if {$shift == ""} {$w1.d1 config -state disabled} 1611 1612 grid [button $w1.d4 -text "Reset Multiplicities" \ 1613 -command "ResetMultiplicities $phase $w" \ 1614 ] -row $row -column 0 -columnspan 3 -sticky w 1608 1615 1609 1616 … … 1647 1654 } 1648 1655 1649 grid rowconfigure $w 5-minsize 51656 grid rowconfigure $w 7 -minsize 5 1650 1657 if {[lindex $expmap(phasetype) [expr {$p - 1}]] != 4} { 1651 1658 grid [TitleFrame $w.8 -bd 6 -relief groove \ … … 1658 1665 } 1659 1666 1660 grid rowconfigure $w 9-minsize 51661 grid [frame $w.b] -row 1 0-column 0 -columnspan 10 -sticky ew1667 grid rowconfigure $w 11 -minsize 5 1668 grid [frame $w.b] -row 12 -column 0 -columnspan 10 -sticky ew 1662 1669 pack [button $w.b.3 -text Close -command "destroy $w"] -side left \ 1663 1670 -padx 5 -pady 5 … … 1704 1711 incr expgui(changed) 1705 1712 } 1706 UpdateAtomLine $numberList $phase 1713 # update multiplicities for the phase 1714 set parent [winfo toplevel $w1] 1715 ResetMultiplicities $phase $parent 1716 SelectOnePhase $phase 1717 MyMessageBox -parent $parent -type OK -default ok -title "Transform applied" \ 1718 -message "The coordinates of atoms [CompressList $numberList] have been transformed" 1719 # UpdateAtomLine $numberList $phase 1720 destroy $parent 1707 1721 } 1708 1722 … … 2362 2376 } 2363 2377 2378 ResetMultiplicities $phase $parent 2379 SelectOnePhase $phase 2364 2380 MyMessageBox -parent $parent -type OK -default ok -title "Shift applied" \ 2365 -message "A shift of \"$shift\" has been a pplied toatoms [CompressList $numberList]"2366 UpdateAtomLine $numberList $phase2381 -message "A shift of \"$shift\" has been added to coordinates of atoms [CompressList $numberList]" 2382 # UpdateAtomLine $numberList $phase 2367 2383 destroy $parent 2368 2384 } 2369 # default 2385 2386 # reset the site multiplicities using the EXPEDT program 2387 proc ResetMultiplicities {phase parent} { 2388 global expgui tcl_platform 2389 set input [open resetmult.inp w] 2390 puts $input "Y" 2391 puts $input "l a p $phase" 2392 puts $input "l" 2393 puts $input "x x x" 2394 puts $input "x" 2395 close $input 2396 # Save the current exp file 2397 savearchiveexp 2398 # disable the file changed monitor 2399 set expgui(expModifiedLast) 0 2400 set expnam [file root [file tail $expgui(expfile)]] 2401 set err [catch { 2402 if {$tcl_platform(platform) == "windows"} { 2403 exec [file join $expgui(gsasexe) expedt.exe] $expnam < resetmult.inp >& resetmult.out 2404 } else { 2405 exec [file join $expgui(gsasexe) expedt] $expnam < resetmult.inp >& resetmult.out 2406 } 2407 } errmsg] 2408 loadexp $expgui(expfile) 2409 catch {file delete resetmult.inp} 2410 if {$expgui(showexptool) || $err} { 2411 set fp [open resetmult.out r] 2412 set out [read $fp] 2413 close $fp 2414 if {$errmsg != ""} { 2415 append errmsg "\n" $out 2416 } else { 2417 set errmsg $out 2418 } 2419 set msg "Please review the result from listing the phase." 2420 if {$err} {append msg "\nIt appears an error occurred!"} 2421 ShowBigMessage $parent.msg $msg $errmsg OK "" $err 2422 } 2423 } 2424 2425 # default values 2370 2426 set newhist(insttype) {} 2371 2427 set newhist(dummy) 0
Note: See TracChangeset
for help on using the changeset viewer.