Changeset 1175 for trunk/readexp.tcl


Ignore:
Timestamp:
Oct 24, 2011 11:17:42 PM (9 years ago)
Author:
toby
Message:

update stable release to fix bugs & match sandbox: many RB updates; show RB atoms in phase

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/readexp.tcl

    r1166 r1175  
    191191    # load the constrained parameters
    192192    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    }
    193207    set expgui(mapstat) 1
    194208}
     
    41914205    makeexprec "${key} LSTF"
    41924206    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
    41934215    return $rbnum
    41944216}
Note: See TracChangeset for help on using the changeset viewer.