- Timestamp:
- Sep 26, 2011 5:37:47 PM (12 years ago)
- Location:
- branches/sandbox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sandbox/doc/expgui6A.html
r1164 r1172 195 195 <BR><img src="rb004.jpg" alt="Z-matrix RB input window"> 196 196 </DL> 197 <H4>A.7.a4 Compute Cartesian coordinates from EXP file (fractional coordinates)</H4> 198 <DL> 199 Cartesian coordinates 200 can also be determined from atoms in the EXP file. 201 In order to generate Cartesian 202 coordinates, the number of sites in the rigid body framework must be specified 203 as well as the starting atom (remember rigid bodies are mapped consecutively). 197 <A name="fromEXP"> 198 <H4>A.7.a4 Compute Cartesian coordinates from EXP file (fractional coordinates)</H4> 199 </A> 200 <DL> 201 A rigid body can also be created directly by computing Cartesian coordinates 202 for atoms in the current EXP file. 203 In order to do this, the number of atom sites in the rigid body framework must be specified 204 as well as the starting atom number (remember rigid bodies are mapped 205 consecutively) using the window shown below. 204 206 Once the number of atoms in the body is 205 207 set, the "Choose Start Atom" button is pressed. This creates buttons for 206 all possible choices for the first atom to define the body. Once the starting 207 atom is selected by pressing one of these button(s), the atoms to be used to 208 define the rigid body framework have been determined. The user must than select 208 all possible choices for the first atom to define the body. The starting 209 atom is selected by pressing one of these button(s) and this defines 210 the atoms to be used in the rigid body framework. The user must then 211 select 209 212 which atoms will be used to define the origin (the origin will be at the 210 centroid of the atoms chosen) and must define the axes that will be used to 211 generate the x-axis and the xy plane. 212 The Cartesian coordinates can then be generated. 213 Either the defined body can be determined and mapped (with the "Save and Map 214 Rigid Body" button), or the Cartesian coordinates can exported to an 213 centroid of the atoms chosen) as well as define the axes that will be used to 214 generate the x-axis and the xy plane for the Cartesian coordinate system. 215 The Cartesian coordinates for the body that are generated can be exported to an 215 216 ASCII text file (with the "Export Cartesian Coordinates" 216 button). 217 <BR><img src="rb005.jpg" alt="Fraction Coords RB input window"> 217 button) for later use. More commonly, the "Save and Map 218 Rigid Body" button is used; this creates a new rigid body type and 219 maps that body (<A href="#MapBody">see A.7.b2</A>) to the selected atoms in the phase. 220 <BR><img src="rb005.jpg" alt="Fraction Coords RB input window"> 218 221 </DL> 219 222 … … 238 241 EXPGUI can invoke, if installed. It 239 242 allows for the viewing of the rigid body to ensure it is correct before mapping 240 and matches the ordering of the atoms in the EXP file. The plot below 241 was obtained from the "Plot Rigid Body" button. 243 and matches the ordering of the atoms in the EXP file. Note that plots 244 to not display atom types, since there is no type information 245 associated with position in a rigid body. Atom types are determined 246 by the atoms when the body is mapped. A sample plot 247 obtained from the "Plot Rigid Body" button is shown below. 242 248 <BR><img src="rb007.png" alt="DRAWxtl screen"> 243 249 </DL> 244 250 <A name="MapBody"> 245 251 <H4>A.7.b2 Map Rigid Body</H4> 246 < DL>252 </A><DL> 247 253 The rigid body must be mapped to the 248 254 crystal structure to define the constraint. This is done by pressing 249 255 the "Map Rigid Body" button, which raises the window below. 250 256 <BR><img src="rb008.png" alt="Map RB"><BR> 257 Note that when a rigid body is created from atoms already in the .EXP 258 file (<A href="#fromEXP">see A.7.a4</A>), the "Save and Map" command 259 performs this step automatically. 260 <P> 251 261 In order to map the rigid body the user 252 262 will need to specify the phase and the sequence number of the first atom in the -
branches/sandbox/expgui
r1165 r1172 3332 3332 "source [file join $expgui(scriptdir) rigid.tcl]; MakeRBPane" \ 3333 3333 DisplayRB \ 3334 1 expgui RB.html ""}3334 1 expgui6A.html ""} 3335 3335 {orientFrame "MD Pref Orient" \ 3336 3336 MakeOrientPane \ -
branches/sandbox/gsascmds.tcl
r1170 r1172 2865 2865 close $fp 2866 2866 update 2867 regexp {GNLS RUN on (.*) +Total.*run *([0-9]+) } \2867 regexp -linestop {GNLS RUN on (.*) +Total.*run *([0-9]+) } \ 2868 2868 $testline a last cycles 2869 2869 pack [label $expgui(FileInfoBox).2 -justify left \ -
branches/sandbox/rb.tcl
r1152 r1172 141 141 close $fp 142 142 #puts "[file join $expgui(gsasexe) geometry] $expgui(expfile) < geom.inp > geom.out" 143 # Save any change sin the current exp file 144 savearchiveexp 143 145 catch { 144 146 exec [file join $expgui(gsasexe) geometry] $expgui(expfile) < geom.inp > geom.out … … 182 184 if {[llength $origin] == 0 || [llength $Euler] == 0 || [llength $coordlist] == 0} { 183 185 puts "Error: run of GEOMETRY failed" 186 error "Run of Program GEOMETRY failed, cannot continue" 184 187 } 185 188 return [list $origin $Euler $coordlist] -
branches/sandbox/rigid.tcl
r1171 r1172 366 366 AddRigidBody $temp_mat $temp_car 367 367 RecordMacroEntry "AddRigidBody $temp_mat $temp_car" 0 368 368 RecordMacroEntry "incr expgui(changed)" 0 369 369 incr ::expgui(changed) 370 370 destroy .nbt … … 406 406 # increment expgui 407 407 incr ::expgui(changed) 408 RecordMacroEntry "incr expgui(changed)" 0 408 409 RB_Load_RBdata 409 410 RB_Control_Panel 0 … … 424 425 425 426 #Rigid body mapping control panel along with matrix multipliers and damping factor labels 426 grid [label $con.rb_num -text "Rigid Body Type $bodnum"] -row 0 -column 0 -padx 5 -pady 5 427 set n [lindex [ReadRigidBody $bodnum] 0] 428 if {$n == 0} { 429 set str "(not mapped)" 430 } elseif {$n == 1} { 431 set str "(mapped 1 time)" 432 } else { 433 set str "(mapped $n times)" 434 } 435 grid [label $con.rb_num -text "Rigid Body Type $bodnum\n$str"] -row 0 -column 0 -padx 5 -pady 5 427 436 grid [button $con.rb_newmap -text "Map Body $bodnum" -command "RB_Map_New $bodnum" -width 18] -row 0 -column 1 -padx 5 -pady 5 428 437 grid [button $con.rb_unmap -text "Unmap Body $bodnum" -command "RB_Unmap $bodnum" -width 18] -row 0 -column 2 -padx 5 -pady 5 … … 799 808 RunRecalcRBCoords 800 809 incr ::expgui(changed) 810 RecordMacroEntry "incr expgui(changed)" 0 801 811 RB_Populate $::rb_notebook $::body_type 802 812 $::rb_notebook raise rb_body$::body_type … … 917 927 } 918 928 incr ::expgui(changed) 929 RecordMacroEntry "incr expgui(changed)" 0 919 930 destroy $panel 920 931 set curpage [$::rb_notebook raise] … … 1270 1281 RecordMacroEntry "SetRigidBodyVar $bodnum $temp_var $temp_damp" 0 1271 1282 ReplaceRigidBody $bodnum $temp_mat $temp_car $temp_var $temp_damp 1272 RecordMacroEntry " SetRigidBodyVar $bodnum$temp_var $temp_damp" 01283 RecordMacroEntry "ReplaceRigidBody $bodnum $temp_mat $temp_car $temp_var $temp_damp" 0 1273 1284 #SetRigidBodyVar $bodnum $temp_var $temp_damp 1274 1285 incr ::expgui(changed) 1286 RecordMacroEntry "incr expgui(changed)" 0 1275 1287 RB_Load_RBdata 1276 1288 RB_Control_Panel $bodnum … … 1398 1410 set temp1 [ExtractRigidBody $::rb_phase $::gcon_atoms $::gcon_start $::gcon_origin_list $vector1list $vector2list] 1399 1411 if {[lindex $temp1 0] == {} || [lindex $temp1 1] == {} || [lindex $temp1 2] == {}} { 1400 } 1412 # an error occurred 1413 return 1414 } 1401 1415 1402 1416 set coordlist "" … … 1628 1642 1629 1643 set bodnum [AddRigidBody 1 $cartesian] 1644 RecordMacroEntry "AddRigidBody 1 [list $cartesian]" 0 1630 1645 # set ::rb_damp($bodnum,1) 0 1631 1646 set ::rb_coord_num($bodnum,1) $::gcon_atoms … … 1633 1648 MapRigidBody $::rb_phase $bodnum $::gcon_start [lindex $temp1 0] [lindex $temp1 1] 1634 1649 RecordMacroEntry "MapRigidBody $::rb_phase $bodnum $::gcon_start [lindex $temp1 0] [lindex $temp1 1]" 0 1635 destroy .geometry 1636 RB_Control_Panel 0 1650 incr ::expgui(changed) 1651 RecordMacroEntry "incr expgui(changed)" 0 1652 destroy .geometry 1653 RB_Control_Panel 0 1637 1654 } 1638 1655 … … 1965 1982 } 1966 1983 incr ::expgui(changed) 1967 #RecordMacroEntry "incr expgui(changed)" 01984 RecordMacroEntry "incr expgui(changed)" 0 1968 1985 1969 1986 }
Note: See TracChangeset
for help on using the changeset viewer.