Changeset 881
- Timestamp:
- Apr 4, 2013 5:04:24 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASII.py ¶
r879 r881 2166 2166 rigidbodyDict = self.PatternTree.GetItemPyData( 2167 2167 G2gd.GetPatternTreeItemId(self,self.root,'Rigid bodies')) 2168 rbVary,rbDict,rbIds = G2str.GetRigidBodyModels(rigidbodyDict,Print=False) 2168 rbVary,rbDict = G2str.GetRigidBodyModels(rigidbodyDict,Print=False) 2169 rbIds = rigidbodyDict.get('RBIds',{'Vector':[],'Residue':[]}) 2169 2170 Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtable,BLtable = G2str.GetPhaseData(Phases,RestraintDict=None,rbIds=rbIds,Print=False) 2170 2171 hapVary,hapDict,controlDict = G2str.GetHistogramPhaseData(Phases,Histograms,Print=False) -
TabularUnified trunk/GSASIIElem.py ¶
r850 r881 87 87 num = El[-2] 88 88 El = El.split(num)[0]+'+'+num 89 if '+0' in El: 90 El = El.split('+0')[0] 89 91 if '-' in El[-1]: 90 92 num = El[-2] 91 93 El = El.split(num)[0]+'-'+num 94 if '-0' in El: 95 El = El.split('-0')[0] 92 96 return El 93 97 -
TabularUnified trunk/GSASIIconstrGUI.py ¶
r879 r881 628 628 Displays the rigid bodies in the data window 629 629 ''' 630 if not data.get('RBId ') or not data:630 if not data.get('RBIds') or not data: 631 631 data.update({'Vector':{'AtInfo':{}},'Residue':{'AtInfo':{}}, 632 'RBIds':{'Vector':[],'Residue':[]}}) #empty dict - fill it 633 632 'RBIds':{'Vector':[],'Residue':[]}}) #empty/bad dict - fill it 634 633 635 634 global resList -
TabularUnified trunk/GSASIIgrid.py ¶
r880 r881 1856 1856 Rwps = GetRwps() 1857 1857 SetDataMenuBar(G2frame,G2frame.dataFrame.SequentialMenu) 1858 G2frame.dataFrame.SetLabel('Sequent al refinement results')1858 G2frame.dataFrame.SetLabel('Sequential refinement results') 1859 1859 G2frame.dataFrame.CreateStatusBar() 1860 1860 G2frame.dataFrame.Bind(wx.EVT_MENU, OnSaveSelSeq, id=wxID_SAVESEQSEL) … … 2096 2096 for i in G2frame.SeqRefine: i.Enable(True) 2097 2097 UpdateControls(G2frame,data) 2098 elif G2frame.PatternTree.GetItemText(item) == 'Sequent al results':2098 elif G2frame.PatternTree.GetItemText(item) == 'Sequential results': 2099 2099 data = G2frame.PatternTree.GetItemPyData(item) 2100 2100 UpdateSeqResults(G2frame,data) -
TabularUnified trunk/GSASIImath.py ¶
r860 r881 198 198 return XYZ 199 199 200 def AtomUij2TLS(atomData,atPtrs,Amat,Bmat,rbObj): 200 def AtomUij2TLS(atomData,atPtrs,Amat,Bmat,rbObj): #unfinished & not used 201 201 for atom in atomData: 202 202 XYZ = np.inner(Amat,atom[cx:cx+3]) … … 228 228 Umat = Tmat+np.inner(Axyz,Smat)+np.inner(Smat.T,Axyz.T)+np.inner(np.inner(Axyz,Lmat),Axyz.T) 229 229 beta = np.inner(np.inner(g,Umat),g) 230 atom[cia+2:cia+8] = beta/gvec230 atom[cia+2:cia+8] = G2spc.U2Uij(beta/gvec) 231 231 232 232 def GetXYZDist(xyz,XYZ,Amat): … … 242 242 return np.array(XYZ) 243 243 244 def UpdateResRBAtoms(Bmat,RBObj,RBData): 245 RBIds = GetResRBIds(RBData) 246 RBname = RBObj['RBname'].split(':')[0] 247 RBRes = RBData[RBIds[RBname]] 248 XYZ = np.array(RBRes['rbXYZ']) 249 for tor,seq in zip(RBObj['Torsions'],RBRes['rbSeq']): 250 QuatA = AVdeg2Q(tor[0],XYZ[seq[0]]-XYZ[seq[1]]) 251 for ride in seq[3]: 252 XYZ[ride] = prodQVQ(QuatA,XYZ[ride]-XYZ[seq[1]])+XYZ[seq[1]] 253 for i,xyz in enumerate(XYZ): 254 xyz = prodQVQ(RBObj['Orient'][0],xyz) 255 xyz = np.inner(Bmat,xyz) 256 xyz += RBObj['Orig'][0] 257 XYZ[i] = xyz 258 return XYZ 259 260 def UpdateRBAtoms(Bmat,RBObj,RBData,RBType): 261 RBIds = GetResRBIds(RBData[RBType]) 262 RBname = RBObj['RBname'].split(':')[0] 263 RBRes = RBData[RBType][RBIds[RBname]] 244 def UpdateRBXYZ(Bmat,RBObj,RBData,RBType): 245 ''' Returns crystal coordinates for atoms described by RBObj 246 ''' 247 RBRes = RBData[RBType][RBObj['RBId']] 264 248 if RBType == 'Vector': 265 249 vecs = RBRes['rbVect'] 266 250 mags = RBRes['VectMag'] 267 XYZ= np.zeros_like(vecs[0])251 Cart = np.zeros_like(vecs[0]) 268 252 for vec,mag in zip(vecs,mags): 269 XYZ+= vec*mag253 Cart += vec*mag 270 254 elif RBType == 'Residue': 271 XYZ= np.array(RBRes['rbXYZ'])255 Cart = np.array(RBRes['rbXYZ']) 272 256 for tor,seq in zip(RBObj['Torsions'],RBRes['rbSeq']): 273 QuatA = AVdeg2Q(tor[0], XYZ[seq[0]]-XYZ[seq[1]])257 QuatA = AVdeg2Q(tor[0],Cart[seq[0]]-Cart[seq[1]]) 274 258 for ride in seq[3]: 275 XYZ[ride] = prodQVQ(QuatA,XYZ[ride]-XYZ[seq[1]])+XYZ[seq[1]] 276 for i,xyz in enumerate(XYZ): 259 XYZ[ride] = prodQVQ(QuatA,Cart[ride]-Cart[seq[1]])+Cart[seq[1]] 260 XYZ = np.zeros_like(Cart) 261 for i,xyz in enumerate(Cart): 277 262 xyz = prodQVQ(RBObj['Orient'][0],xyz) 278 xyz = np.inner(Bmat,xyz) 279 xyz += RBObj['Orig'][0] 280 XYZ[i] = xyz 281 return XYZ 282 283 def GetResRBIds(RBData): 284 rbKeys = RBData.keys() 285 rbKeys.remove('AtInfo') 286 if not len(rbKeys): 287 return {} 288 RBNames = [RBData[k]['RBname'] for k in rbKeys] 289 return dict(zip(RBNames,rbKeys)) 263 XYZ[i] = np.inner(Bmat,xyz)+RBObj['Orig'][0] 264 return XYZ,Cart 265 266 def UpdateRBUIJ(Bmat,Cart,RBObj): 267 ''' Returns atom I/A, Uiso or UIJ for atoms at XYZ as described by RBObj 268 ''' 269 TLStype,TLS = RBObj['ThermalMotion'][:2] 270 # T = TLS[:6] 271 # L = TLS[6:12] 272 # S = TLS[12:] 273 # Uout = [] 274 # for X in Cart: 275 # U = [0,0,0,0,0,0] 276 # U[0] = T[0]+L[1]*X[2]**2+L[2]*X[1]**2-2.0*L[5]*X[1]*X[2]+2.0*(S[2]*X[2]-S[4]*X[1]) 277 # U[1] = T[1]+L[0]*X[2]**2+L[2]*X[0]**2-2.0*L[4]*X[0]*X[2]+2.0*(S[5]*X[0]-S[0]*X[2]) 278 # U[2] = T[2]+L[1]*X[0]**2+L[0]*X[1]**2-2.0*L[3]*X[1]*X[0]+2.0*(S[1]*X[1]-S[3]*X[0]) 279 # U[3] = T[3]+L[4]*X[1]*X[2]+L[5]*X[0]*X[2]-L[3]*X[2]**2-L[2]*X[0]*X[1]+ 280 # S[4]*X[0]-S[5]*X[1]-(S[6]+S[7])*X[2] 281 # U[4] = T[4]+L[3]*X[1]*X[2]+L[5]*X[0]*X[1]-L[4]*X[1]**2-L[1]*X[0]*X[2]+ 282 # S[3]*X[2]-S[2]*X[0]+S[6]*X[1] 283 # U[5] = T[5]+L[3]*X[0]*X[2]+L[4]*X[0]*X[1]-L[5]*X[0]**2-L[0]*X[2]*X[1]+ 284 # S[0]*X[1]-S[1]*X[2]+S[7]*X[0] 285 # UIJ = G2lat.U6toUij(U) 286 # Uout.append( 287 288 Tmat = np.zeros((3,3)) 289 Lmat = np.zeros((3,3)) 290 Smat = np.zeros((3,3)) 291 if 'T' in TLStype: 292 Tmat = G2lat.U6toUij(TLS[:6]) 293 if 'L' in TLStype: 294 Lmat = np.array(G2lat.U6toUij(TLS[6:12]))*(np.pi/180.)**2 295 if 'S' in TLStype: 296 Smat = np.array([[TLS[18],TLS[12],TLS[13]],[TLS[14],TLS[19],TLS[15]],[TLS[16],TLS[17],0]])*(np.pi/180.) 297 g = np.inner(Bmat,Bmat.T) 298 gvec = 1./np.sqrt(np.array([g[0][0]**2,g[1][1]**2,g[2][2]**2, 299 g[0][0]*g[1][1],g[0][0]*g[2][2],g[1][1]*g[2][2]])) 300 Uout = [] 301 for X in Cart: 302 print 'X: ',X 303 Axyz = np.array([[0,X[2],-X[1]], [-X[2],0,X[0]], [X[1],-X[0],0]]) 304 if 'U' in TLStype: 305 Uout.append(['I',TLS[0],0,0,0,0,0,0]) 306 else: 307 Umat = Tmat+np.inner(Axyz,Smat)+np.inner(Smat.T,Axyz.T)+np.inner(np.inner(Axyz,Lmat),Axyz.T) 308 print 'Umat: ',Umat 309 beta = np.inner(np.inner(g,Umat),g) 310 Uout.append(['A',0.0,]+list(G2lat.UijtoU6(beta)*gvec)) 311 return Uout 290 312 291 313 def GetSHCoeff(pId,parmDict,SHkeys): … … 852 874 Hmax[1] = ((Hmax[1]+2)/4)*4 853 875 Hmax[2] = ((Hmax[2]+1)/4)*4 876 877 def OmitMap(data,reflData): 878 generalData = data['General'] 879 if not generalData['Map']['MapType']: 880 print '**** ERROR - Fourier map not defined' 881 return 882 mapData = generalData['Map'] 883 dmin = mapData['Resolution'] 884 SGData = generalData['SGData'] 885 cell = generalData['Cell'][1:8] 886 A = G2lat.cell2A(cell[:6]) 887 Hmax = np.asarray(G2lat.getHKLmax(dmin,SGData,A),dtype='i')+1 888 adjHKLmax(SGData,Hmax) 889 Fhkl = np.zeros(shape=2*Hmax,dtype='c16') 890 time0 = time.time() 891 for ref in reflData: 892 if ref[4] >= dmin: 893 Fosq,Fcsq,ph = ref[8:11] 894 for i,hkl in enumerate(ref[11]): 895 hkl = np.asarray(hkl,dtype='i') 896 dp = 360.*ref[12][i] 897 a = cosd(ph+dp) 898 b = sind(ph+dp) 899 phasep = complex(a,b) 900 phasem = complex(a,-b) 901 F = np.sqrt(Fosq) 902 h,k,l = hkl+Hmax 903 Fhkl[h,k,l] = F*phasep 904 h,k,l = -hkl+Hmax 905 Fhkl[h,k,l] = F*phasem 906 rho = fft.fftn(fft.fftshift(Fhkl))/cell[6] 907 print 'NB: this is just an Fobs map for now - under development' 908 print 'Omit map time: %.4f'%(time.time()-time0),'no. elements: %d'%(Fhkl.size) 909 print rho.shape 910 mapData['rho'] = np.real(rho) 911 mapData['rhoMax'] = max(np.max(mapData['rho']),-np.min(mapData['rho'])) 912 return mapData 854 913 855 914 def FourierMap(data,reflData): -
TabularUnified trunk/GSASIIphsGUI.py ¶
r880 r881 498 498 if 'cutOff' not in Map: 499 499 Map['cutOff'] = 100.0 500 mapTypes = ['Fobs','Fcalc','delt-F','2*Fo-Fc',' Patterson']500 mapTypes = ['Fobs','Fcalc','delt-F','2*Fo-Fc','Omit','Patterson'] 501 501 refList = data['Histograms'].keys() 502 502 if not generalData['AtomTypes']: … … 3159 3159 RBObj['Orig'][0][item] = val 3160 3160 Obj.SetValue('%8.5f'%(val)) 3161 newXYZ = G2mth.UpdateRB Atoms(Bmat,RBObj,RBData,rbType)3161 newXYZ = G2mth.UpdateRBXYZ(Bmat,RBObj,RBData,rbType)[0] 3162 3162 for i,id in enumerate(RBObj['Ids']): 3163 3163 data['Atoms'][AtLookUp[id]][cx:cx+3] = newXYZ[i] … … 3185 3185 raise ValueError 3186 3186 RBObj['Orient'][0] = Q 3187 newXYZ = G2mth.UpdateRB Atoms(Bmat,RBObj,RBData,rbType)3187 newXYZ = G2mth.UpdateRBXYZ(Bmat,RBObj,RBData,rbType)[0] 3188 3188 for i,id in enumerate(RBObj['Ids']): 3189 3189 data['Atoms'][AtLookUp[id]][cx:cx+3] = newXYZ[i] … … 3240 3240 val = float(Obj.GetValue()) 3241 3241 RBObj['Torsions'][item][0] = val 3242 newXYZ = G2mth.UpdateR esRBAtoms(Bmat,RBObj,RBData['Residue'])3242 newXYZ = G2mth.UpdateRBXYZ(Bmat,RBObj,RBData,'Residue')[0] 3243 3243 for i,id in enumerate(RBObj['Ids']): 3244 3244 data['Atoms'][AtLookUp[id]][cx:cx+3] = newXYZ[i] … … 3397 3397 sel = dlg.GetSelections() 3398 3398 for x in sel: 3399 RBObjs[x].update( sourceRB)3399 RBObjs[x].update(copy.copy(sourceRB)) 3400 3400 G2plt.PlotStructure(G2frame,data) 3401 3401 wx.CallAfter(FillRigidBodyGrid(True)) … … 3431 3431 rbObj = data['testRBObj']['rbObj'] 3432 3432 rbId = rbObj['RBId'] 3433 newXYZ = G2mth.UpdateRB Atoms(Bmat,rbObj,RBData,rbType)3433 newXYZ = G2mth.UpdateRBXYZ(Bmat,rbObj,RBData,rbType)[0] 3434 3434 Ids = [] 3435 3435 dmax = 0.0 … … 3784 3784 data['RBModels']['Residue'] = RBObjs 3785 3785 for RBObj in RBObjs: 3786 newXYZ = G2mth.UpdateR esRBAtoms(Bmat,RBObj,RBData['Residue'])3786 newXYZ = G2mth.UpdateRBXYZ(Bmat,RBObj,RBData,'Residue')[0] 3787 3787 for i,id in enumerate(RBObj['Ids']): 3788 3788 data['Atoms'][AtLookUp[id]][cx:cx+3] = newXYZ[i] … … 4177 4177 PatternId = G2gd.GetPatternTreeItemId(G2frame,G2frame.root, reflName) 4178 4178 reflData = G2frame.PatternTree.GetItemPyData(PatternId)[1] 4179 mapData.update(G2mth.FourierMap(data,reflData)) 4179 if mapData['MapType'] == 'Omit': 4180 mapData.update(G2mth.OmitMap(data,reflData)) 4181 else: 4182 mapData.update(G2mth.FourierMap(data,reflData)) 4180 4183 mapData['Flip'] = False 4181 4184 mapSig = np.std(mapData['rho']) … … 4316 4319 G2frame.dataFrame.Bind(wx.EVT_MENU, OnReloadDrawAtoms, id=G2gd.wxID_RELOADDRAWATOMS) 4317 4320 G2frame.dataFrame.Bind(wx.EVT_MENU, OnDistAngle, id=G2gd.wxID_ATOMSDISAGL) 4318 for id in G2frame.dataFrame.ReImportMenuId: 4321 for id in G2frame.dataFrame.ReImportMenuId: #loop over submenu items 4319 4322 G2frame.dataFrame.Bind(wx.EVT_MENU, OnReImport, id=id) 4320 4323 -
TabularUnified trunk/GSASIIstruct.py ¶
r879 r881 131 131 return 'Error: no diffraction data','' 132 132 rigidbodyDict = GetRigidBodies(GPXfile) 133 rbVary,rbDict,rbIds = GetRigidBodyModels(rigidbodyDict,Print=False) 133 rbIds = rigidbodyDict.get('RBIds',{'Vector':[],'Residue':[]}) 134 rbVary,rbDict = GetRigidBodyModels(rigidbodyDict,Print=False) 134 135 Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtables,BLtables = GetPhaseData(Phases,RestraintDict=None,rbIds=rbIds,Print=False) 135 136 hapVary,hapDict,controlDict = GetHistogramPhaseData(Phases,Histograms,Print=False) … … 396 397 break 397 398 datum = data[0] 398 if datum[0] == 'Sequent al results':399 if datum[0] == 'Sequential results': 399 400 data[0][1] = SeqResult 400 401 try: … … 589 590 print >>pFile,'\nResidue rigid body model:' 590 591 PrintResRBModel(rigidbodyDict['Residue'][item]) 591 return rbVary,rbDict,rbIds 592 return rbVary,rbDict 593 594 def ApplyRBModels(parmDict,Phases,rigidbodyDict): 595 ''' Takes RB info from RBModels in Phase and RB data in rigidbodyDict along with 596 current RB values in parmDict & modifies atom contents (xyz & Uij) of parmDict 597 ''' 598 RBIds = rigidbodyDict['RBIds'] 599 if not RBIds['Vector'] and not RBIds['Residue']: 600 return 601 RBData = copy.deepcopy(rigidbodyDict) # don't mess with original! 602 if RBIds['Vector']: # first update the vector magnitudes 603 VRBIds = RBIds['Vector'] 604 VRBData = RBData['Vector'] 605 for i,rbId in enumerate(VRBIds): 606 pfxRB = '::RBV;'+str(i)+':' 607 for j in range(len(VRBData[rbId]['VectMag'])): 608 VRBData[rbId]['VectMag'][j] = parmDict[pfxRB+str(j)] 609 for phase in Phases: 610 Phase = Phases[phase] 611 General = Phase['General'] 612 cell = General['Cell'][1:7] 613 Amat,Bmat = G2lat.cell2AB(cell) 614 AtLookup = G2mth.FillAtomLookUp(Phase['Atoms']) 615 pId = Phase['pId'] 616 RBModels = copy.deepcopy(Phase['RBModels']) # again don't mess with original! 617 for irb,RBObj in enumerate(RBModels['Vector']): 618 print irb,RBObj 619 620 XYZ,Cart = G2mth.UpdateRBXYZ(Bmat,RBObj,RBData,'Vector') 621 for x in XYZ: print x 622 UIJ = G2mth.UpdateRBUIJ(Bmat,Cart,RBObj) 623 for u in UIJ: print u 624 625 for irb,RBObj in enumerate(RBModels['Residue']): 626 print irb,RBObj 627 628 629 630 XYZ = G2mth.UpdateRBXYZ(Bmat,RBObj,RBData,'Residue') 631 UIJ = G2mth.UpdateRBUIJ(Amat,XYZ,RBObj) 632 633 raise Exception 634 592 635 593 636 ################################################################################ … … 737 780 print >>pFile,ptstr 738 781 739 def MakeRBParms( ):782 def MakeRBParms(rbKey): 740 783 rbid = str(rbids.index(RB['RBId'])) 741 pfxRB = pfx+'RB P'784 pfxRB = pfx+'RB'+rbKey+'P' 742 785 pstr = ['x','y','z'] 743 786 ostr = ['a','i','j','k'] … … 747 790 if RB['Orig'][1]: 748 791 phaseVary += [name,] 749 pfxRB = pfx+'RB O'792 pfxRB = pfx+'RB'+rbKey+'O' 750 793 for i in range(4): 751 794 name = pfxRB+ostr[i]+':'+str(iRB)+':'+rbid … … 756 799 phaseVary += [name,] 757 800 758 def MakeRBThermals( ):801 def MakeRBThermals(rbKey): 759 802 rbid = str(rbids.index(RB['RBId'])) 760 803 tlstr = ['11','22','33','12','13','23'] 761 804 sstr = ['12','13','21','23','31','32','AA','BB'] 762 805 if 'T' in RB['ThermalMotion'][0]: 763 pfxRB = pfx+'RB T'806 pfxRB = pfx+'RB'+rbKey+'T' 764 807 for i in range(6): 765 808 name = pfxRB+tlstr[i]+':'+str(iRB)+':'+rbid … … 768 811 phaseVary += [name,] 769 812 if 'L' in RB['ThermalMotion'][0]: 770 pfxRB = pfx+'RB L'813 pfxRB = pfx+'RB'+rbKey+'L' 771 814 for i in range(6): 772 815 name = pfxRB+tlstr[i]+':'+str(iRB)+':'+rbid … … 775 818 phaseVary += [name,] 776 819 if 'S' in RB['ThermalMotion'][0]: 777 pfxRB = pfx+'RB S'820 pfxRB = pfx+'RB'+rbKey+'S' 778 821 for i in range(5): 779 822 name = pfxRB+sstr[i]+':'+str(iRB)+':'+rbid … … 782 825 phaseVary += [name,] 783 826 if 'U' in RB['ThermalMotion'][0]: 784 name = pfx+'RB U:'+str(iRB)+':'+rbid827 name = pfx+'RB'+rbKey+'U:'+str(iRB)+':'+rbid 785 828 phaseDict[name] = RB['ThermalMotion'][1][0] 786 829 if RB['ThermalMotion'][2][0]: 787 830 phaseVary += [name,] 788 831 789 def MakeRBTorsions( ):832 def MakeRBTorsions(rbKey): 790 833 rbid = str(rbids.index(RB['RBId'])) 791 pfxRB = pfx+'RB Tr;'834 pfxRB = pfx+'RB'+rbKey+'Tr;' 792 835 for i,torsion in enumerate(RB['Torsions']): 793 836 name = pfxRB+str(i)+':'+str(iRB)+':'+rbid … … 831 874 resRBData = PhaseData[name]['RBModels'].get('Residue',[]) 832 875 if resRBData: 833 rbids = rbIds['Residue'] 876 rbids = rbIds['Residue'] #NB: used in the MakeRB routines 834 877 for iRB,RB in enumerate(resRBData): 835 MakeRBParms( )836 MakeRBThermals( )837 MakeRBTorsions( )878 MakeRBParms('R') 879 MakeRBThermals('R') 880 MakeRBTorsions('R') 838 881 839 882 vecRBData = PhaseData[name]['RBModels'].get('Vector',[]) 840 883 if vecRBData: 841 rbids = rbIds['Vector'] 884 rbids = rbIds['Vector'] #NB: used in the MakeRB routines 842 885 for iRB,RB in enumerate(vecRBData): 843 MakeRBParms( )844 MakeRBThermals( )886 MakeRBParms('V') 887 MakeRBThermals('V') 845 888 846 889 Natoms[pfx] = 0 … … 3734 3777 SumwYo = 0 3735 3778 Nobs = 0 3779 ApplyRBModels(parmdict,Phases,rigidbodyDict) 3736 3780 histoList = Histograms.keys() 3737 3781 histoList.sort() … … 3777 3821 A = [parmdict[pfx+'A%d'%(i)] for i in range(6)] 3778 3822 G,g = G2lat.A2Gmat(A) #recip & real metric tensors 3779 #apply RB models to atom parms in parmDict?3780 3823 refList = Histogram['Data'] 3781 3824 refList = StructureFactor(refList,G,hfx,pfx,SGData,calcControls,parmdict) … … 3870 3913 raise Exception 3871 3914 rigidbodyDict = GetRigidBodies(GPXfile) 3872 rbVary,rbDict,rbIds = GetRigidBodyModels(rigidbodyDict,pFile=printFile) 3915 rbIds = rigidbodyDict.get('RBIds',{'Vector':[],'Residue':[]}) 3916 rbVary,rbDict = GetRigidBodyModels(rigidbodyDict,pFile=printFile) 3873 3917 Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtables,BLtables = GetPhaseData(Phases,restraintDict,rbIds,pFile=printFile) 3874 3918 calcControls['atomIndx'] = atomIndx … … 3876 3920 calcControls['FFtables'] = FFtables 3877 3921 calcControls['BLtables'] = BLtables 3878 calcControls['rbIDs'] = rbIds3879 3922 hapVary,hapDict,controlDict = GetHistogramPhaseData(Phases,Histograms,pFile=printFile) 3880 3923 calcControls.update(controlDict) … … 4032 4075 raise Exception 4033 4076 rigidbodyDict = GetRigidBodies(GPXfile) 4034 rbVary,rbDict,rbIds = GetRigidBodyModels(rigidbodyDict,pFile=printFile) 4077 rbIds = rigidbodyDict.get('RBIds',{'Vector':[],'Residue':[]}) 4078 rbVary,rbDict = GetRigidBodyModels(rigidbodyDict,pFile=printFile) 4035 4079 Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtables,BLtables = GetPhaseData(Phases,restraintDict,rbIds,False,printFile) 4036 4080 for item in phaseVary: … … 4056 4100 calcControls['FFtables'] = FFtables 4057 4101 calcControls['BLtables'] = BLtables 4058 calcControls['rbIDs'] = rbIds4059 4102 varyList = [] 4060 4103 parmDict = {}
Note: See TracChangeset
for help on using the changeset viewer.