Changeset 1103 for branches/sandbox


Ignore:
Timestamp:
Dec 22, 2010 2:33:59 PM (10 years ago)
Author:
toby
Message:

add note on possible origin 1 settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/addcmds.tcl

    r1036 r1103  
    197197    # validate the input
    198198    set err {}
     199    set warn {}
    199200    set title [$np.t1 get]
    200201    if {[string trim $title] == ""} {
     
    231232            append spg " R"
    232233            if {$err == ""} {
    233                 # no need to warn on error
    234                 MyMessageBox -parent $np -title "Space Group Fix" \
    235                 -message "Adding a final 'R' to the space group for rhombohedral space group set in rhombohedral cell, as required in GSAS" \
    236                 -icon warning
     234                append warn "Note that a rhombohedral setting was used, the space group symbol ($spg) as been flagged accordingly\n"
    237235            }
    238236        }
     
    315313    }
    316314    # now select the new phase
    317     SelectOnePhase [lindex $expmap(phaselist) end]   
     315    set phase [lindex $expmap(phaselist) end]
     316    SelectOnePhase $phase
     317    SpaceGroupWarnings $warn $phase $spg
    318318}
    319319
     
    25242524    set errmsg [runAddAtoms $phase $atomlist]
    25252525    RecordMacroEntry "runAddAtoms $phase [list $atomlist]" 0
     2526    SpaceGroupWarnings "" $phase $spg
    25262527    return $errmsg
     2528}
     2529
     2530proc SpaceGroupWarnings {warn phase spg} {
     2531    # warning on possible origin 1 setting
     2532    set shift [GetOrigin1Shift $phase]
     2533    if {$shift != ""} {
     2534        append warn "Note that this space group ($spg) has both Origin 1 and Origin 2 settings. Origin 2 must be used in GSAS. Please check atom multiplicities (or use the Results/composition command) to verify you have the correct origin setting. Note that the Xform Atoms/Xform Origin 1 to Origin 2 button can be used to correct this.\n"
     2535    }
     2536    if {$warn != ""} {
     2537        MyMessageBox -parent . -title "Space Group Note" \
     2538            -message $warn -icon warning
     2539    }
    25272540}
    25282541
Note: See TracChangeset for help on using the changeset viewer.