Changeset 1102 for branches/sandbox
 Timestamp:
 Dec 21, 2010 11:19:01 AM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/sandbox/rb.tcl
r1101 r1102 1 # test code (package already loaded in expgui) 2 lappend auto_path [file dirname [info script]] 3 package require La 4 1 5 #============================================================================ 2 6 # rigid body EXP editing (to move into readexp.tcl) … … 323 327 #============================================================================ 324 328 325 package require La326 327 329 # Use the GSAS geometry program to compute a set of cartesian coordinates for a 328 330 # set of atoms in a .EXP file and provide the origin shift and Euler angles needed to … … 506 508 set CBSTAR [expr { ($CA*$CG$CB)/($SA*$SC) }] ;#! cos(Beta*) 507 509 set CCSTAR [expr { ($CA*$CB$CG)/($SA*$SB) }] ;#! cos(Gamma*) 508 set SASTAR [expr { sqrt( max(0.0,1.0$CASTAR**2)) }] ;#! sin(Alpha*)509 set SBSTAR [expr { sqrt( max(0.0,1.0$CBSTAR**2)) }] ;#! sin(Beta*)510 set SCSTAR [expr { sqrt( max(0.0,1.0$CCSTAR**2)) }] ;#! sin(Gamma*)510 set SASTAR [expr { sqrt(1.0($CASTAR*$CASTAR*2)) }] ;#! sin(Alpha*) 511 set SBSTAR [expr { sqrt(1.0($CBSTAR*$CBSTAR*2)) }] ;#! sin(Beta*) 512 set SCSTAR [expr { sqrt(1.0($CCSTAR*$CCSTAR*2)) }] ;#! sin(Gamma*) 511 513 512 514 set A "2 3 3 $a 0 0 0 $b 0 0 0 $c" … … 626 628 foreach var {x y z} v1 $frac v2 $coord abc [lrange $cell 0 2] { 627 629 set dv [expr {($v2  $v1)}] 628 set dvs [expr {$dvs + $dv* *2}]629 set sumdvs [expr {$sumdvs + $dv* *2}]630 set dvs [expr {$dvs + $dv*$dv}] 631 set sumdvs [expr {$sumdvs + $dv*$dv}] 630 632 if {$use} {set sum($var) [expr {$sum($var) + $dv}]} 631 633 }
Note: See TracChangeset
for help on using the changeset viewer.