Changeset 355 for trunk/atomcons.tcl
- Timestamp:
- Dec 4, 2009 5:04:44 PM (14 years ago)
- 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 422 422 if {$num == "new"} { 423 423 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] 425 425 $expcons(varmenu$ic) insert 14 separator 426 426 } else { … … 449 449 # set the various variables to initial values 450 450 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 } 452 457 set expcons(var$ic) {} 453 458 set expcons(mult$ic) 1.0 … … 483 488 XYZU {set allowed XYZU} 484 489 UISO {set allowed UISO} 490 XYZU+-F {set allowed XYZU+-F} 485 491 U11 - 486 492 U22 - … … 583 589 } 584 590 585 # this is called to change an atomic cons raint591 # this is called to change an atomic constraint 586 592 proc SaveAtomConstraint {num top} { 587 593 global expcons expgui … … 589 595 # then add new constraints 590 596 set varlist {{}} 597 if {$expcons(var1) == "XYZU+-F"} {set varlist "X Y Z UISO FRAC"} 591 598 if {$expcons(var1) == "XYZU"} {set varlist "X Y Z UISO"} 592 599 if {$expcons(var1) == "Uxx"} {set varlist "U11 U22 U33 U12 U23 U13"} … … 602 609 set v $var 603 610 } 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 } 605 616 set atomlist {} 606 617 foreach indx [$expcons(atomlistbox$ic) curselection] { … … 626 637 } 627 638 foreach atom $atomlist { 639 if {$expcons(var1) == "XYZU+-F" && \ 640 $var == "FRAC"} { 641 set mult [expr -1*$mult] 642 } 628 643 lappend clist [list $phase $atom $v $mult] 629 644 } … … 640 655 return 641 656 } 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 } 642 665 if {$num == "new"} { 643 666 constrinfo atom add {} $clist
Note: See TracChangeset
for help on using the changeset viewer.