- Timestamp:
- Mar 10, 2021 9:07:37 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIconstrGUI.py
r4838 r4849 649 649 rbIds = rigidbodyDict.get('RBIds',{'Vector':[],'Residue':[]}) 650 650 rbVary,rbDict = G2stIO.GetRigidBodyModels(rigidbodyDict,Print=False) 651 Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtables,BLtables,MFtables,maxSSwave = G2stIO.GetPhaseData( 652 Phases,RestraintDict=None,rbIds=rbIds,Print=False) # generates atom symmetry constraints 651 (Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtables, 652 BLtables,MFtables,maxSSwave) = G2stIO.GetPhaseData( 653 Phases,RestraintDict=None,rbIds=rbIds,Print=False) # generates atom symmetry constraints 653 654 return constDictList,phaseDict,fixedList 654 655 … … 1037 1038 if name == 'Sym-Generated': #show symmetry generated constraints 1038 1039 Sizer1 = wx.BoxSizer(wx.VERTICAL) 1040 if symHolds: 1041 Sizer1.Add(wx.StaticText(pageDisplay,wx.ID_ANY, 1042 'Position variables fixed by space group symmetry')) 1043 Sizer1.Add((-1,5)) 1044 Sizer = wx.FlexGridSizer(0,2,0,0) 1045 Sizer1.Add(Sizer) 1046 for var in symHolds: 1047 Sizer.Add(wx.StaticText(pageDisplay,wx.ID_ANY,' FIXED'), 1048 0,WACV|wx.ALIGN_CENTER|wx.RIGHT|wx.LEFT,3) 1049 Sizer.Add(wx.StaticText(pageDisplay,wx.ID_ANY,var)) 1050 Sizer.Add((-1,-1)) 1051 Sizer.Add((-1,2)) 1052 else: 1053 Sizer1.Add(wx.StaticText(pageDisplay,wx.ID_ANY, 1054 'No holds generated')) 1055 Sizer1.Add((-1,10)) 1056 symGen = G2mv.GetSymEquiv() 1057 if len(symGen) == 0: 1058 Sizer1.Add(wx.StaticText(pageDisplay,wx.ID_ANY, 1059 'No equvalences generated')) 1060 return Sizer1 1039 1061 Sizer1.Add(wx.StaticText(pageDisplay,wx.ID_ANY, 1040 1062 'Equivalences generated based on cell/space group input')) … … 1042 1064 Sizer = wx.FlexGridSizer(0,2,0,0) 1043 1065 Sizer1.Add(Sizer) 1044 for sym in G2mv.GetSymEquiv():1045 Sizer.Add(wx.StaticText(pageDisplay,wx.ID_ANY,' EQUIV'),1066 for sym in symGen: 1067 Sizer.Add(wx.StaticText(pageDisplay,wx.ID_ANY,' EQUIV'), 1046 1068 0,WACV|wx.ALIGN_CENTER|wx.RIGHT|wx.LEFT,3) 1047 1069 Sizer.Add(wx.StaticText(pageDisplay,wx.ID_ANY,sym)) … … 1402 1424 1403 1425 # create a list of the phase variables 1404 Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtable,BLtable,MFtable,maxSSwave = G2stIO.GetPhaseData(Phases,rbIds=rbIds,Print=False) 1426 symHolds = [] 1427 (Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtable,BLtable, 1428 MFtable,maxSSwave) = G2stIO.GetPhaseData( 1429 Phases,rbIds=rbIds,Print=False,symHold=symHolds) 1405 1430 phaseList = [] 1406 1431 for item in phaseDict: -
trunk/GSASIIphsGUI.py
r4847 r4849 10549 10549 rbType = data['testRBObj']['rbType'] 10550 10550 rbNames = [] 10551 for item in data['RBModels'] [rbType]:10551 for item in data['RBModels'].get(rbType,[]): 10552 10552 rbNames.append(item['RBname']) 10553 10553 rbObj['Ids'] = Ids #atomids -
trunk/GSASIIstrIO.py
r4840 r4849 1136 1136 ##### Phase data 1137 1137 ################################################################################ 1138 def GetPhaseData(PhaseData,RestraintDict={},rbIds={},Print=True,pFile=None,seqRef=False): 1138 def GetPhaseData(PhaseData,RestraintDict={},rbIds={},Print=True,pFile=None, 1139 seqRef=False,symHold=None): 1139 1140 '''Setup the phase information for a structural refinement, used for 1140 1141 regular and sequential refinements, optionally printing information … … 1371 1372 pstr = ['x','y','z'] 1372 1373 ostr = ['a','i','j','k'] 1374 Sytsym = G2spc.SytSym(RB['Orig'][0],SGData)[0] 1375 xId,xCoef = G2spc.GetCSxinel(Sytsym) # gen origin site sym 1376 equivs = [[],[],[]] 1373 1377 for i in range(3): 1374 1378 name = pfxRB+pstr[i]+':'+str(iRB)+':'+rbid 1375 1379 phaseDict[name] = RB['Orig'][0][i] 1376 1380 if RB['Orig'][1]: 1377 phaseVary += [name,] 1381 if xId[i] > 0: 1382 phaseVary += [name,] 1383 equivs[xId[i]-1].append([name,xCoef[i]]) 1384 elif symHold is not None: #variable is held due to symmetry 1385 symHold.append(name) 1386 for equiv in equivs: 1387 if len(equiv) > 1: 1388 name = equiv[0][0] 1389 coef = equiv[0][1] 1390 for eqv in equiv[1:]: 1391 eqv[1] /= coef 1392 G2mv.StoreEquivalence(name,(eqv,)) 1378 1393 pfxRB = pfx+'RB'+rbKey+'O' 1379 1394 A,V = G2mth.Q2AV(RB['Orig'][0]) … … 1532 1547 phaseVary.append(names[j]) 1533 1548 equivs[xId[j]-1].append([names[j],xCoef[j]]) 1549 elif symHold is not None: #variable is held due to symmetry 1550 symHold.append(names[j]) 1534 1551 for equiv in equivs: 1535 1552 if len(equiv) > 1: -
trunk/GSASIIstrMain.py
r4843 r4849 509 509 #phase['Histograms'][h] 510 510 if not phase['Histograms'][h]['Use']: continue 511 if phase['Histograms'][h] ['LeBail']:511 if phase['Histograms'][h].get('LeBail',False): 512 512 return True 513 513 return False
Note: See TracChangeset
for help on using the changeset viewer.