Changeset 1100 for branches/sandbox


Ignore:
Timestamp:
Dec 15, 2010 2:53:16 PM (10 years ago)
Author:
toby
Message:

fix RB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/rb.tcl

    r1098 r1100  
    560560        rmsout } [FitBodyOrigin $Euler $cell $ortholist $useflag $fraclist $origin] {}
    561561    puts "start rms = $startrms"
     562    set rmsprev $startrms
    562563    puts "new origin = $origin"
    563564    for {set i 0} {$i < $ncycle} {incr i} {
     
    571572            fracout
    572573            rmsout } [FitBodyOrigin $Euler $cell $ortholist $useflag $fraclist $origin] {}
    573         if {$rms > (1.1 * $rmsprev) + 0.01
    574         puts "rms = $rms, new origin = $origin"
     574        if {$rms > (1.1 * $rmsprev) + 0.01} {
     575            puts "rms = $rms, new origin = $origin"
     576            set rmsprev $rms
     577        }
    575578    }   
    576579    #proc FitBodyOrigin {Euler cell ortholist useflag fraclist origin}
    577580    #return "$neworig $rms $fracout $rmsout"
    578581    set fmt  {"%8.5f %8.5f %8.5f     %8.5f %8.5f %8.5f   %6.3f"}
    579     foreach fracin $fraclist fraccalc $fracout rms $rmsout {
    580         puts "[eval format $fmt $fracin $fraccalc $rms]"
    581     }
     582    foreach fracin $fraclist fraccalc $fracout rmsi $rmsout {
     583        puts "[eval format $fmt $fracin $fraccalc $rmsi]"
     584    }
     585    return [list $origin $Euler $rms $fracout $rmsout]
    582586}
    583587
     
    731735#RunRecalcRBCoords
    732736
     737puts "Test FitBody"
    733738set fraclist {
    734739    { 0.5483305238484277 0.4887545024531055 0.6167996784631056 }
     
    757762set origin ".0 .0 .0"
    758763#set Euler  {{1 13} {2 17} {3 19}}
    759 set Euler  {{1 0} {2 180} {3 0}}
     764#set Euler  {{1 0} {2 180} {3 0}}
     765set Euler  {{1 0} {2 0} {3 0}}
    760766
    761767#puts [La::show $xform]
    762 FitBody $Euler $cell $ortholist $useflag $fraclist $origin 30
     768puts "out: [FitBody $Euler $cell $ortholist $useflag $fraclist $origin 30]"
    763769
    764770
     
    782788set coordlist [zmat2coord $atmlist]
    783789set i 0
     790puts "\nZmatrix in"
    784791foreach line $atmlist {
    785792    incr i
    786793    puts "$i) $line"
    787794}
     795puts "Cartesian out"
    788796foreach line $coordlist {
    789797    puts [eval format "%-4s%10.5f%10.5f%10.5f" $line]
Note: See TracChangeset for help on using the changeset viewer.