Changeset 3789


Ignore:
Timestamp:
Jan 19, 2019 8:38:49 PM (5 years ago)
Author:
toby
Message:

fix transpose error for lattice constraints

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIconstrGUI.py

    r3788 r3789  
    13261326    UseList = newPhase['Histograms']
    13271327    detTrans = np.abs(nl.det(Trans))
    1328     nAcof = G2lat.cell2A(newPhase['General']['Cell'][1:7])
    1329    
    13301328    opId = oldPhase['pId']
    13311329    npId = newPhase['pId']
     
    13341332    oSGData = oldPhase['General']['SGData']
    13351333    nSGData = newPhase['General']['SGData']
    1336     oAcof = G2lat.cell2A(oldPhase['General']['Cell'][1:7])
    1337     nAcof = G2lat.cell2A(newPhase['General']['Cell'][1:7])
     1334    #oAcof = G2lat.cell2A(oldPhase['General']['Cell'][1:7])
     1335    #nAcof = G2lat.cell2A(newPhase['General']['Cell'][1:7])
    13381336    item = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Constraints')
    13391337    if not item:
     
    13411339        return
    13421340    constraints = G2frame.GPXtree.GetItemPyData(item)
    1343     parmDict = {}
    1344     varyList = []
    13451341    xnames = ['dAx','dAy','dAz']
    13461342    # constraints on matching atom params between phases
     
    14161412        #how do I do Uij's for most Trans?
    14171413       
    1418     T = nl.inv(Trans)
     1414    T = nl.inv(Trans).T
    14191415    conMat = [
    14201416        [T[0,0]**2,T[0,1]**2,T[0,2]**2,T[0,0]*T[0,1],T[0,0]*T[0,2],T[0,1]*T[0,2]],
     
    14231419        [2.*T[0,0]*T[1,0],2.*T[0,1]*T[1,1],2.*T[0,2]*T[1,2],T[0,0]*T[1,1]+T[0,1]*T[1,0],T[0,0]*T[1,2]+T[0,2]*T[1,0],T[0,1]*T[1,2]+T[0,2]*T[1,1]],
    14241420        [2.*T[0,0]*T[2,0],2.*T[0,1]*T[2,1],2.*T[0,2]*T[2,2],T[0,0]*T[2,1]+T[0,1]*T[2,0],T[0,0]*T[2,2]+T[0,2]*T[2,0],T[0,1]*T[2,2]+T[0,2]*T[2,1]],
    1425         [2.*T[1,0]*T[2,0],2.*T[1,1]*T[2,1],2.*T[1,2]*T[2,2],T[1,0]*T[2,1]+T[1,1]*T[2,0],T[1,0]*T[2,2]+T[1,2]*T[2,0],T[1,1]*T[2,2]+T[1,2]*T[2,1]]]
     1421        [2.*T[1,0]*T[2,0],2.*T[1,1]*T[2,1],2.*T[1,2]*T[2,2],T[1,0]*T[2,1]+T[1,1]*T[2,0],T[1,0]*T[2,2]+T[1,2]*T[2,0],T[1,1]*T[2,2]+T[1,2]*T[2,1]]
     1422        ]
    14261423    # Gnew = conMat * A:
    14271424#         T00**2*a0  T01**2*a1 T02**2*a2 T00*T01*a3    T00*T02*a4    T01*T02*a5
     
    14451442        multDict = {}
    14461443        for iAorg in range(6):
    1447             cA = conMat[iAorg][iAnew] # coeff for A[i] in constraint matrix
     1444            cA = conMat[iAnew][iAorg] # coeff for A[i] in constraint matrix
    14481445            if abs(cA) < 1.e-8: continue
    14491446            parm = SetUniqAj(opId,iAorg,oSGData) # translate to unique A[i] in original cell
  • trunk/GSASIIstrIO.py

    r3760 r3789  
    697697                   
    698698def cellVary(pfx,SGData):
    699     'needs a doc string'
     699    '''Creates equivalences for a phase based on the Laue class.
     700    Returns a list of A tensor terms that are non-zero.
     701    '''
    700702    if SGData['SGLaue'] in ['-1',]:
    701703        return [pfx+'A0',pfx+'A1',pfx+'A2',pfx+'A3',pfx+'A4',pfx+'A5']
Note: See TracChangeset for help on using the changeset viewer.