Changeset 1136 for branches/sandbox


Ignore:
Timestamp:
Apr 20, 2011 4:46:47 PM (10 years ago)
Author:
lake
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/rb.tcl

    r1134 r1136  
    55#============================================================================
    66# 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
    88# ReadRigidBody  -- # of times a body is mapped, scaling factors, var #s & coordinates
    99# RigidBodyMappingList - return a list instances where a RB is mapped in phase
     
    128128        if {$var == ""} {set var 0}
    129129        validint var 5
    130         setexp "${key}${i}PARM" var 11 15
     130        setexp "${key}${i}PARM" $var 11 15
    131131        set damp [lindex $damplist $j]
    132132        if {$damp != ""} {
     
    135135            validint damp 5
    136136        }
    137         setexp "${key}${i}PARM" damp 16 20
     137        setexp "${key}${i}PARM" $damp 16 20
    138138    }
    139139}
     
    305305}
    306306
    307 # Control the TLS values for Rigid body mapping for mapping with 
     307# Control the TLS values for Rigid body mapping for mapping with
    308308#    phase ($phase), body type # ($bodytyp) and instance # ($num)
    309309# set the 20 TLS values to the values in TLSvals
     
    342342}
    343343
    344 # set damping values for a Rigid body mapping 
     344# set damping values for a Rigid body mapping
    345345#   for mapping with phase ($phase), body type # ($bodytyp) and instance # ($num)
    346346# there must be 9 damping values in RBdamp for the 9 position variables (origin followed by rotations)
     
    416416#             simplest case this will be {1}
    417417#   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.
    419419# for input where
    420420#     multlist = {s1 s2} and
     
    453453# DeleteRigidBody: remove a rigid body definition from the .EXP file
    454454# 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
    456456# is not allowed.
    457457# Input:
     
    702702# Rigid body utility routines
    703703#============================================================================
    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.
    706706# RigidBodyAtomNums: returns a list of atom numbers that are mapped to
    707707#       rigid bodies in a selected phase
    708708# 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 &
    710710#       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
    712712#       been made to rigid parameters.
    713713# 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
    715715#       set of fractional coordinates
    716716# zmat2coord: convert a z-matrix to a set of cartesian coordinates
     
    723723#============================================================================
    724724#============================================================================
    725 # RigidBodyGetVarNums: Returns a list of the variable numbers used already 
     725# RigidBodyGetVarNums: Returns a list of the variable numbers used already
    726726# for rigid body variable parameters
    727727proc RigidBodyGetVarNums {} {
     
    729729    foreach type [RigidBodyList] {
    730730        set typelist [lindex [ReadRigidBody $type] 1]
    731         for item in $typelist {
     731        foreach item $typelist {
    732732            lappend varlist [lindex $item 2]
    733733        }
Note: See TracChangeset for help on using the changeset viewer.