Changeset 1173
- Timestamp:
- Sep 27, 2011 11:35:12 AM (9 years ago)
- Location:
- branches/sandbox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sandbox/doc/expgui6A.html
r1172 r1173 355 355 These flags were set automatically when 356 356 the rigid body position parameter were set to be refined. If these flags are 357 turned off, it is likely that GENLES will crash. 358 357 turned off, it is likely that GENLES will crash. Note that atoms in a 358 rigid body are now tagged with the letter "r" in the atom listings. 359 359 </DL></DL> 360 360 <hr> -
branches/sandbox/expgui
r1172 r1173 1333 1333 } 1334 1334 1335 # format a coordinate from a non-mm phase as 10 chars; mark fixed coordinates differently 1335 # format a coordinate from a non-mm phase as 10 chars; mark fixed 1336 # and Rigid body coordinates differently 1336 1337 proc ShowFixAtom {phase atom var} { 1337 # is this fixed? 1338 set param [string toupper $var] 1339 if {[array name ::fix_param "$phase,$atom,$param"] != ""} { 1340 return [format "%9.5fF" [atominfo $phase $atom $var]] 1341 } else { 1338 # is this fixed? 1339 set param [string toupper $var] 1340 if {[array name ::fix_param "$phase,$atom,$param"] != ""} { 1341 return [format "%9.5fF" [atominfo $phase $atom $var]] 1342 } 1343 # is this atom in a rigid body? 1344 if {[lsearch $::expmap(rbatoms_$phase) $atom] != -1} { 1345 return [format "%9.5fr" [atominfo $phase $atom $var]] 1346 } 1342 1347 return [format "%10.6f" [atominfo $phase $atom $var]] 1343 }1344 1348 } 1345 1349 -
branches/sandbox/readexp.tcl
r1162 r1173 191 191 # load the constrained parameters 192 192 atom_constraint_load 193 # construct tables of mapped atoms in rigid bodies 194 foreach phase $::expmap(phaselist) { 195 set expmap(rbatoms_$phase) {} 196 foreach bodnum [RigidBodyList] { 197 set natoms [llength [lindex [lindex [lindex [ReadRigidBody $bodnum] 1] 0] 3]] 198 foreach mapnum [RigidBodyMappingList $phase $bodnum] { 199 set atomnum [lindex [ReadRigidBodyMapping $phase $bodnum $mapnum] 0] 200 set st [lsearch $::expmap(atomlist_$phase) $atomnum] 201 set en [expr {$st+$natoms-1}] 202 set atoms [lrange $::expmap(atomlist_$phase) $st $en] 203 set expmap(rbatoms_$phase) [concat $expmap(rbatoms_$phase) $atoms] 204 } 205 } 206 } 193 207 set expgui(mapstat) 1 194 208 } … … 4191 4205 makeexprec "${key} LSTF" 4192 4206 setexp "${key} LSTF" [format "%5d" 0] 1 5 4207 # turn off the X refinement flags for the new body 4208 set st [lsearch $::expmap(atomlist_$phase) $firstatom] 4209 set natoms [llength [lindex [lindex [lindex [ReadRigidBody $bodytyp] 1] 0] 3]] 4210 set en [expr {$st+$natoms-1}] 4211 set atomlist [lrange $::expmap(atomlist_$phase) $st $en] 4212 atominfo $phase $atomlist xref set 0 4213 # redo the mapping to capture the newly mapped atoms 4214 mapexp 4193 4215 return $rbnum 4194 4216 } -
branches/sandbox/rigid.tcl
r1172 r1173 507 507 set col 11 508 508 set atomnum $::rb_map_beginning($phase,$bodnum,$mapnum) 509 for {set coordnum 1} {$coordnum <=$::rb_coord_num($bodnum,1)} {incr coordnum} { 510 set atom [atominfo $phase $atomnum label] 511 grid [label $main.rb_site$phase$mapnum$coordnum -text "$atom"] -row $row -column $col -padx 5 512 incr atomnum 513 incr col 514 } 509 # get a list of the atoms in the RB 510 set st [lsearch $::expmap(atomlist_$phase) $atomnum] 511 set en [expr {$st+$::rb_coord_num($bodnum,1)-1}] 512 set atoms [lrange $::expmap(atomlist_$phase) $st $en] 513 foreach a $atoms { 514 set lbl [atominfo $phase $a label] 515 grid [label $main.rb_site$phase$mapnum$a -text $lbl] -row $row -column $col -padx 5 516 incr col 517 } 515 518 } 516 519 incr row … … 798 801 # puts "position = $origin" 799 802 # puts "Euler = $euler" 800 MapRigidBody $::rb_phase $::body_type $::rb_firstatom $origin $euler801 RecordMacroEntry "MapRigidBody $::rb_phase $::body_type $::rb_firstatom $origin $euler" 0803 MapRigidBody $::rb_phase $::body_type $::rb_firstatom $origin $euler 804 RecordMacroEntry "MapRigidBody $::rb_phase $::body_type $::rb_firstatom $origin $euler" 0 802 805 incr ::rb_map($::body_type) 803 incr ::expgui(changed)804 806 set curpage [$::rb_notebook raise] 805 807 $::rb_notebook raise [$::rb_notebook page end] … … 881 883 grid [label $main.ph -text "Phase"] -row 1 -column 2 -padx 5 882 884 set matrixnum $::rb_matrix_num($bodnum) 885 grid [label $main.rb_sitelbl -text "Site number"] -row 0 -column 3 -columnspan 5 -sticky w 883 886 for {set coordnum 1} {$coordnum <= $::rb_coord_num($bodnum,$matrixnum)} {incr coordnum} { 884 label $main.rb_site$coordnum -text " Site$coordnum"887 label $main.rb_site$coordnum -text "$coordnum" 885 888 grid $main.rb_site$coordnum -row 1 -column [expr 2 + $coordnum] 886 889 } … … 889 892 incr row 890 893 foreach coordnum [RigidBodyMappingList $phase $bodnum] { 891 set row [expr $row + $coordnum] 892 RB_Load_Mapdata $phase $bodnum $coordnum 893 checkbutton $main.unmap$phase$coordnum -variable ::rb_unmap($phase,$bodnum,$coordnum) 894 grid $main.unmap$phase$coordnum -row $row -column 0 895 grid [label $main.rb_map$phase$coordnum -text "$coordnum"] -row $row -column 1 896 grid [label $main.rb_cb$phase$coordnum -text $phase] -row $row -column 2 897 set atomnum $::rb_map_beginning($phase,$bodnum,$coordnum) 898 set col 3 899 for {set j 1} {$j <=$::rb_coord_num($bodnum,$matrixnum)} {incr j} { 900 set atom [atominfo $phase $atomnum label] 901 grid [label $main.rb_site$phase$coordnum$j -text "$atom"] -row $row -column $col 902 incr atomnum 903 incr col 904 } 905 } 906 incr row 907 } 908 ResizeScrollTable $um 894 set row [expr $row + $coordnum] 895 RB_Load_Mapdata $phase $bodnum $coordnum 896 checkbutton $main.unmap$phase$coordnum -variable ::rb_unmap($phase,$bodnum,$coordnum) 897 grid $main.unmap$phase$coordnum -row $row -column 0 898 grid [label $main.rb_map$phase$coordnum -text "$coordnum"] -row $row -column 1 899 grid [label $main.rb_cb$phase$coordnum -text $phase] -row $row -column 2 900 set atomnum $::rb_map_beginning($phase,$bodnum,$coordnum) 901 # get a list of the atoms in the RB 902 set st [lsearch $::expmap(atomlist_$phase) $atomnum] 903 set en [expr {$st+$::rb_coord_num($bodnum,0)-1}] 904 set atoms [lrange $::expmap(atomlist_$phase) $st $en] 905 set col 3 906 foreach a $atoms { 907 set lbl [atominfo $phase $a label] 908 grid [label $main.rb_site$phase$coordnum$col -text $lbl -padx 3] -row $row -column $col 909 incr col 910 } 911 } 912 incr row 913 } 914 ResizeScrollTable $um 909 915 910 916 grid [frame $um.update -bd 2 -relief groove] -row 0 -column 1 -pady 10 … … 1046 1052 1047 1053 } 1048 1049 1050 1054 1051 1055 proc RB_Edit_Matrix_Abort {bodnum location} { … … 1646 1650 set ::rb_coord_num($bodnum,1) $::gcon_atoms 1647 1651 1648 1649 1652 MapRigidBody $::rb_phase $bodnum $::gcon_start [lindex $temp1 0] [lindex $temp1 1] 1653 RecordMacroEntry "MapRigidBody $::rb_phase $bodnum $::gcon_start [lindex $temp1 0] [lindex $temp1 1]" 0 1650 1654 incr ::expgui(changed) 1651 1655 RecordMacroEntry "incr expgui(changed)" 0 … … 1785 1789 # puts "first atom = $atomnum" 1786 1790 # set atomlist "atoms in rigid body #$bodnum: " 1787 set atomlist "atoms in rigid body: " 1788 for {set j 1} {$j <=$::rb_coord_num($bodnum,1)} {incr j} { 1789 set atom [atominfo $phasenum $atomnum label] 1790 lappend atomlist $atom 1791 # grid [label $main.rb_site$phasenum$mapnum$j -text "$atom"] -row [expr $row +1] -column $col -padx 5 1792 incr atomnum 1793 # incr col 1791 set atomlist {} 1792 # get a list of the atoms in the RB 1793 set st [lsearch $::expmap(atomlist_$phase) $atomnum] 1794 set en [expr {$st+$::rb_coord_num($bodnum,1)-1}] 1795 set atoms [lrange $::expmap(atomlist_$phase) $st $en] 1796 foreach a $atoms { 1797 if {$atomlist != ""} {append atomlist ", "} 1798 set lbl [atominfo $phase $a label] 1799 append atomlist $lbl 1794 1800 } 1795 grid [label $main.rb_site$phasenum$bodnum$mapnum -text "$atomlist"] -row [expr $row + 1] -column 4 -padx 5 -columnspan 999 -sticky w 1801 grid [label $main.rb_site$phasenum$bodnum$mapnum \ 1802 -text "atoms in rigid body: $atomlist"] \ 1803 -row [expr $row + 1] -column 4 -padx 5 -columnspan 999 -sticky w 1796 1804 incr row 2 1797 1805 } … … 1923 1931 #procedure for enabling refinement flags 1924 1932 proc RB_Ref_FlagEnable {phasenum bodnum mapnum var val args} { 1925 set atomlist "" 1926 set atomnum $::rb_map_beginning($phasenum,$bodnum,$mapnum) 1927 for {set j 1} {$j <=$::rb_coord_num($bodnum,1)} {incr j} { 1928 lappend atomlist $atomnum 1929 incr atomnum 1930 } 1931 atominfo $phasenum $atomlist $var set $val 1932 1933 set atomnum $::rb_map_beginning($phasenum,$bodnum,$mapnum) 1934 # get a list of the atoms in the RB 1935 set st [lsearch $::expmap(atomlist_$phase) $atomnum] 1936 set en [expr {$st+$::rb_coord_num($bodnum,1)-1}] 1937 set atomlist [lrange $::expmap(atomlist_$phase) $st $en] 1938 atominfo $phasenum $atomlist $var set $val 1933 1939 } 1934 1940
Note: See TracChangeset
for help on using the changeset viewer.