Changeset 777 for trunk/atomcons.tcl


Ignore:
Timestamp:
Dec 4, 2009 5:11:51 PM (11 years ago)
Author:
toby
Message:

# on 2004/04/03 22:21:52, toby did:
fix sort undefined bug
report warning when nothing selected to constrain

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/atomcons.tcl

    • Property rcs:date changed from 2002/01/22 22:55:35 to 2004/04/03 22:21:52
    • Property rcs:lines changed from +203 -80 to +22 -4
    • Property rcs:rev changed from 1.12 to 1.13
    r543 r777  
    670670        set atmlst [lsort -real -index 1 $atmlst]
    671671    } else {
    672         error "Bad expgui(asorttype = $expgui(asorttype)"
     672        # error "Bad expgui(asorttype) = $expgui(asorttype)"
     673        # other -- ignore and sort on atom number
     674        foreach atom $expmap(atomlist_$phase) {
     675            lappend atmlst "$atom $atom $phase"
     676        }
     677        set atmlst [lsort -integer -index 1 $atmlst]
     678
    673679    }
    674680    # make a list of atoms in the box
     
    707713    # special variables XYZU & Uxx should only occur with num == "new"
    708714    # then add new constraints
    709     if {$expcons(var1) == ""} return
     715    if {$expcons(var1) == ""} {
     716        MyMessageBox -message \
     717            "No variables were selected to constrain" \
     718            -parent [winfo toplevel $expcons(atommaster)] \
     719            -type {Fix} -default fix -icon error
     720        return
     721    }
    710722    set varlist {{}}
    711723    if {$expcons(var1) == "XYZU+-F"} {set varlist "X Y Z UISO FRAC"}
     
    767779            }
    768780        }
    769         if {$atomlist == ""} return
     781        if {$atomlist == ""} {
     782            MyMessageBox -message \
     783                "No atoms were selected to constrain" \
     784                -parent [winfo toplevel $expcons(atommaster)] \
     785                -type {Fix} -default fix -icon error
     786            return
     787        }
    770788        # maximum number of parameters in a constraint is 500
    771789        if {[llength $clist] > 500} {
Note: See TracChangeset for help on using the changeset viewer.