Changeset 355 for trunk/atomcons.tcl


Ignore:
Timestamp:
Dec 4, 2009 5:04:44 PM (14 years ago)
Author:
toby
Message:

# on 2000/11/27 21:05:56, toby did:
define type of XYZU+-F
set phase if only 1 is present

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/atomcons.tcl

    • Property rcs:date changed from 2000/11/21 21:23:45 to 2000/11/27 21:05:56
    • Property rcs:lines changed from +5 -6 to +28 -5
    • Property rcs:rev changed from 1.8 to 1.9
    r349 r355  
    422422    if {$num == "new"} {
    423423        set expcons(varmenu$ic) [tk_optionMenu $cfr.var$ic expcons(var$ic) \
    424                 FRAC X Y Z UISO U11 U22 U33 U12 U23 U13 MX MY MZ XYZU Uxx]
     424                FRAC X Y Z UISO U11 U22 U33 U12 U23 U13 MX MY MZ XYZU Uxx XYZU+-F]
    425425        $expcons(varmenu$ic) insert 14 separator
    426426    } else {
     
    449449        # set the various variables to initial values
    450450        set expcons(atmlst$ic) {}
    451         set expcons(phase$ic) {}
     451        if {[llength $expmap(phaselist)] == 1} {
     452            set expcons(phase$ic) $expmap(phaselist)
     453            FillAtomsConstraintList $ic {}
     454        } else {
     455            set expcons(phase$ic) {}
     456        }
    452457        set expcons(var$ic) {}
    453458        set expcons(mult$ic) 1.0
     
    483488        XYZU {set allowed XYZU}
    484489        UISO {set allowed UISO}
     490        XYZU+-F {set allowed XYZU+-F}
    485491        U11 -
    486492        U22 -
     
    583589}
    584590
    585 # this is called to change an atomic consraint
     591# this is called to change an atomic constraint
    586592proc SaveAtomConstraint {num top} {
    587593    global expcons expgui
     
    589595    # then add new constraints
    590596    set varlist {{}}
     597    if {$expcons(var1) == "XYZU+-F"} {set varlist "X Y Z UISO FRAC"}
    591598    if {$expcons(var1) == "XYZU"} {set varlist "X Y Z UISO"}
    592599    if {$expcons(var1) == "Uxx"} {set varlist "U11 U22 U33 U12 U23 U13"}
     
    602609                    set v $var
    603610                }
    604                 set mult $expcons(mult$ic)
     611                if  {$expcons(var1) == "XYZU+-F"} {
     612                    set mult 1
     613                } else {
     614                    set mult $expcons(mult$ic)
     615                }
    605616                set atomlist {}
    606617                foreach indx [$expcons(atomlistbox$ic) curselection] {
     
    626637                    }
    627638                    foreach atom $atomlist {
     639                        if  {$expcons(var1) == "XYZU+-F" && \
     640                                $var == "FRAC"} {
     641                            set mult [expr -1*$mult]
     642                        }
    628643                        lappend clist [list $phase $atom $v $mult]
    629644                    }
     
    640655            return
    641656        }
     657        if {$expcons(var1) == "XYZU+-F" && [llength $atomlist] != 2} {
     658            MyMessageBox -message \
     659                    "Exactly 2 atoms must be linked with the XYZU+-F option" \
     660                    -parent [winfo toplevel $expcons(atommaster)] \
     661                    -helplink "expgui6.html XYZUF" \
     662                    -type {Fix} -default fix -icon error
     663            return
     664        }
    642665        if {$num == "new"} {
    643666            constrinfo atom add {} $clist
Note: See TracChangeset for help on using the changeset viewer.