Ignore:
Timestamp:
Oct 15, 2020 5:43:24 PM (15 months ago)
Author:
toby
Message:

add RB sym axis; implement in RB add; minor RB GUI reorg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r4557 r4595  
    151151                   
    152152def ApplyRBModelDervs(dFdvDict,parmDict,rigidbodyDict,Phase):
    153     'Needs a doc string'
     153    'Computes rigid body derivatives'
    154154    atxIds = ['dAx:','dAy:','dAz:']
    155155    atuIds = ['AU11:','AU22:','AU33:','AU12:','AU13:','AU23:']
     
    177177    RBModels =  Phase['RBModels']
    178178    for irb,RBObj in enumerate(RBModels.get('Vector',[])):
     179        symAxis = RBObj.get('symAxis')
    179180        VModel = RBData['Vector'][RBObj['RBId']]
    180181        Q = RBObj['Orient'][0]
     
    198199            for iv in range(4):
    199200                Q[iv] -= dx
    200                 XYZ1 = G2mth.RotateRBXYZ(Bmat,Cart,G2mth.normQ(Q))
     201                XYZ1 = G2mth.RotateRBXYZ(Bmat,Cart,G2mth.normQ(Q),symAxis)
    201202                Q[iv] += 2.*dx
    202                 XYZ2 = G2mth.RotateRBXYZ(Bmat,Cart,G2mth.normQ(Q))
     203                XYZ2 = G2mth.RotateRBXYZ(Bmat,Cart,G2mth.normQ(Q),symAxis)
    203204                Q[iv] -= dx
    204205                dXdO = (XYZ2[ia]-XYZ1[ia])/(2.*dx)
     
    238239
    239240    for irb,RBObj in enumerate(RBModels.get('Residue',[])):
     241        symAxis = RBObj.get('symAxis')
    240242        Q = RBObj['Orient'][0]
    241243        jrb = RRBIds.index(RBObj['RBId'])
     
    263265            for iv in range(4):
    264266                Q[iv] -= dx
    265                 XYZ1 = G2mth.RotateRBXYZ(Bmat,Cart,G2mth.normQ(Q))
     267                XYZ1 = G2mth.RotateRBXYZ(Bmat,Cart,G2mth.normQ(Q),symAxis)
    266268                Q[iv] += 2.*dx
    267                 XYZ2 = G2mth.RotateRBXYZ(Bmat,Cart,G2mth.normQ(Q))
     269                XYZ2 = G2mth.RotateRBXYZ(Bmat,Cart,G2mth.normQ(Q),symAxis)
    268270                Q[iv] -= dx
    269271                dXdO = (XYZ2[ia]-XYZ1[ia])/(2.*dx)
Note: See TracChangeset for help on using the changeset viewer.