Changeset 3789
- Timestamp:
- Jan 19, 2019 8:38:49 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIconstrGUI.py
r3788 r3789 1326 1326 UseList = newPhase['Histograms'] 1327 1327 detTrans = np.abs(nl.det(Trans)) 1328 nAcof = G2lat.cell2A(newPhase['General']['Cell'][1:7])1329 1330 1328 opId = oldPhase['pId'] 1331 1329 npId = newPhase['pId'] … … 1334 1332 oSGData = oldPhase['General']['SGData'] 1335 1333 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]) 1338 1336 item = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Constraints') 1339 1337 if not item: … … 1341 1339 return 1342 1340 constraints = G2frame.GPXtree.GetItemPyData(item) 1343 parmDict = {}1344 varyList = []1345 1341 xnames = ['dAx','dAy','dAz'] 1346 1342 # constraints on matching atom params between phases … … 1416 1412 #how do I do Uij's for most Trans? 1417 1413 1418 T = nl.inv(Trans) 1414 T = nl.inv(Trans).T 1419 1415 conMat = [ 1420 1416 [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]], … … 1423 1419 [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]], 1424 1420 [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 ] 1426 1423 # Gnew = conMat * A: 1427 1424 # T00**2*a0 T01**2*a1 T02**2*a2 T00*T01*a3 T00*T02*a4 T01*T02*a5 … … 1445 1442 multDict = {} 1446 1443 for iAorg in range(6): 1447 cA = conMat[iA org][iAnew] # coeff for A[i] in constraint matrix1444 cA = conMat[iAnew][iAorg] # coeff for A[i] in constraint matrix 1448 1445 if abs(cA) < 1.e-8: continue 1449 1446 parm = SetUniqAj(opId,iAorg,oSGData) # translate to unique A[i] in original cell -
trunk/GSASIIstrIO.py
r3760 r3789 697 697 698 698 def 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 ''' 700 702 if SGData['SGLaue'] in ['-1',]: 701 703 return [pfx+'A0',pfx+'A1',pfx+'A2',pfx+'A3',pfx+'A4',pfx+'A5']
Note: See TracChangeset
for help on using the changeset viewer.