Changeset 1011 for trunk/GSASIIphsGUI.py
- Timestamp:
- Jul 25, 2013 6:04:52 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r1007 r1011 3147 3147 RBObj = Indx[Obj.GetId()] 3148 3148 val = Obj.GetValue() 3149 Ttype = 'A' 3149 3150 if val == 'Uiso': 3151 Ttype = 'I' 3150 3152 RBObj['ThermalMotion'][0] = 'Uiso' 3151 3153 elif val == 'T': … … 3156 3158 RBObj['ThermalMotion'][0] = 'TLS' 3157 3159 wx.CallAfter(FillRigidBodyGrid,True) 3158 #need to set atom I/A here & update Uiso/Uij 3160 if val != 'None': 3161 cia = data['General']['AtomPtrs'][3] 3162 for i,id in enumerate(RBObj['Ids']): 3163 data['Atoms'][AtLookUp[id]][cia] = Ttype 3159 3164 G2plt.PlotStructure(G2frame,data) 3160 3165 3161 def ThermDataSizer(RBObj ):3166 def ThermDataSizer(RBObj,rbType): 3162 3167 3163 3168 def OnThermval(event): … … 3170 3175 pass 3171 3176 Obj.SetValue('%8.4f'%(RBObj['ThermalMotion'][1][item])) 3172 #need to update atom Uiso/Uij here! 3177 Cart = G2mth.UpdateRBXYZ(Bmat,RBObj,RBData,rbType)[1] 3178 Uout = G2mth.UpdateRBUIJ(Bmat,Cart,RBObj) 3179 cia = data['General']['AtomPtrs'][3] 3180 for i,id in enumerate(RBObj['Ids']): 3181 if Uout[i][0] == 'I': 3182 data['Atoms'][AtLookUp[id]][cia+1] = Uout[i][1] 3183 else: 3184 data['Atoms'][AtLookUp[id]][cia+2:cia+8] = Uout[i][2:8] 3173 3185 G2plt.PlotStructure(G2frame,data) 3174 3186 … … 3358 3370 resrbSizer.Add(thermSizer) 3359 3371 if RBObj['ThermalMotion'][0] != 'None': 3360 resrbSizer.Add(ThermDataSizer(RBObj ))3372 resrbSizer.Add(ThermDataSizer(RBObj,'Residue')) 3361 3373 return resrbSizer 3362 3374 … … 3398 3410 vecrbSizer.Add(thermSizer) 3399 3411 if RBObj['ThermalMotion'][0] != 'None': 3400 vecrbSizer.Add(ThermDataSizer(RBObj ))3412 vecrbSizer.Add(ThermDataSizer(RBObj,'Vector')) 3401 3413 return vecrbSizer 3402 3414 … … 3861 3873 3862 3874 def OnGlobalResRBTherm(event): 3875 AtLookUp = G2mth.FillAtomLookUp(data['Atoms']) 3863 3876 RBObjs = data['RBModels']['Residue'] 3864 3877 names = ['None','Uiso','T','TL','TLS'] 3878 cia = data['General']['AtomPtrs'][3] 3865 3879 dlg = wx.SingleChoiceDialog(G2frame,'Select','Residue thermal motion model',names) 3866 3880 if dlg.ShowModal() == wx.ID_OK: 3867 3881 sel = dlg.GetSelection() 3868 3882 parm = names[sel] 3869 for rbObj in RBObjs: 3870 rbObj['ThermalMotion'][0] = parm 3883 Ttype = 'A' 3884 if parm == 'Uiso': 3885 Ttype = 'I' 3886 for rbObj in RBObjs: 3887 rbObj['ThermalMotion'][0] = parm 3888 if parm != 'None': 3889 for i,id in enumerate(rbObj['Ids']): 3890 data['Atoms'][AtLookUp[id]][cia] = Ttype 3871 3891 dlg.Destroy() 3872 FillRigidBodyGrid(True)3892 wx.CallAfter(FillRigidBodyGrid,True) 3873 3893 3874 3894 def OnGlobalResRBRef(event): … … 4951 4971 def ChangePage(page): 4952 4972 text = G2frame.dataDisplay.GetPageText(page) 4953 print 'Select',page,text4973 # print 'Select',page,text 4954 4974 if text == 'General': 4955 4975 G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DataGeneral)
Note: See TracChangeset
for help on using the changeset viewer.