Changeset 1136 for branches/sandbox
 Timestamp:
 Apr 20, 2011 4:46:47 PM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/sandbox/rb.tcl
r1134 r1136 5 5 #============================================================================ 6 6 # rigid body EXP editing routines (to move into readexp.tcl) 7 # RigidBodyList  returns a list of the defined rigid body types 7 # RigidBodyList  returns a list of the defined rigid body types 8 8 # ReadRigidBody  # of times a body is mapped, scaling factors, var #s & coordinates 9 9 # RigidBodyMappingList  return a list instances where a RB is mapped in phase … … 128 128 if {$var == ""} {set var 0} 129 129 validint var 5 130 setexp "${key}${i}PARM" var 11 15130 setexp "${key}${i}PARM" $var 11 15 131 131 set damp [lindex $damplist $j] 132 132 if {$damp != ""} { … … 135 135 validint damp 5 136 136 } 137 setexp "${key}${i}PARM" damp 16 20137 setexp "${key}${i}PARM" $damp 16 20 138 138 } 139 139 } … … 305 305 } 306 306 307 # Control the TLS values for Rigid body mapping for mapping with 307 # Control the TLS values for Rigid body mapping for mapping with 308 308 # phase ($phase), body type # ($bodytyp) and instance # ($num) 309 309 # set the 20 TLS values to the values in TLSvals … … 342 342 } 343 343 344 # set damping values for a Rigid body mapping 344 # set damping values for a Rigid body mapping 345 345 # for mapping with phase ($phase), body type # ($bodytyp) and instance # ($num) 346 346 # there must be 9 damping values in RBdamp for the 9 position variables (origin followed by rotations) … … 416 416 # simplest case this will be {1} 417 417 # coordlist: a nested list of coordinates such as { { {0 0 0} {.1 .1 .1} {.2 .2 .2} } } 418 # note that when the length of multlist > 1 then coordlist must have the same length. 418 # note that when the length of multlist > 1 then coordlist must have the same length. 419 419 # for input where 420 420 # multlist = {s1 s2} and … … 453 453 # DeleteRigidBody: remove a rigid body definition from the .EXP file 454 454 # The body may not be mapped. I am not sure if GSAS allows more than 9 bodies, 455 # but if it does, the simplifed approach used here will fail, so this 455 # but if it does, the simplifed approach used here will fail, so this 456 456 # is not allowed. 457 457 # Input: … … 702 702 # Rigid body utility routines 703 703 #============================================================================ 704 # RigidBodyGetVarNums: Returns a list of the variable numbers in use 705 # for rigid body variable parameters. 704 # RigidBodyGetVarNums: Returns a list of the variable numbers in use 705 # for rigid body variable parameters. 706 706 # RigidBodyAtomNums: returns a list of atom numbers that are mapped to 707 707 # rigid bodies in a selected phase 708 708 # RigidStartAtoms: returns a list of atoms that are allowed for creation of RB 709 # ExtractRigidBody: Use the GSAS geometry program to cartesian coordinates & 709 # ExtractRigidBody: Use the GSAS geometry program to cartesian coordinates & 710 710 # setting info for a RB from fractional coordinates for atoms in a phase 711 # RunRecalcRBCoords: updates the coordinates in all phases after changes have 711 # RunRecalcRBCoords: updates the coordinates in all phases after changes have 712 712 # been made to rigid parameters. 713 713 # CalcBody: Convert ortho to fractional coordinates using RB parameters 714 # FitBody: Optimize the origin and Euler angles to match a rigid body to a 714 # FitBody: Optimize the origin and Euler angles to match a rigid body to a 715 715 # set of fractional coordinates 716 716 # zmat2coord: convert a zmatrix to a set of cartesian coordinates … … 723 723 #============================================================================ 724 724 #============================================================================ 725 # RigidBodyGetVarNums: Returns a list of the variable numbers used already 725 # RigidBodyGetVarNums: Returns a list of the variable numbers used already 726 726 # for rigid body variable parameters 727 727 proc RigidBodyGetVarNums {} { … … 729 729 foreach type [RigidBodyList] { 730 730 set typelist [lindex [ReadRigidBody $type] 1] 731 for item in$typelist {731 foreach item $typelist { 732 732 lappend varlist [lindex $item 2] 733 733 }
Note: See TracChangeset
for help on using the changeset viewer.