Changeset 4468 for trunk/GSASIIphsGUI.py
- Timestamp:
- Jun 6, 2020 3:52:50 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r4464 r4468 9832 9832 rbId = rbObj['RBId'] 9833 9833 rbAtmTypes = RBData[rbType][rbId]['rbTypes'] 9834 atomData = data['Atoms'] 9834 9835 if 'atNames' in RBData[rbType][rbId]: 9835 9836 rbAtmLbs = RBData[rbType][rbId]['atNames'] … … 9839 9840 newXYZ = G2mth.UpdateRBXYZ(Bmat,rbObj,RBData,rbType)[0] 9840 9841 atmTypes = [atomData[i][ct] for i in range(len(atomData))] 9842 notfound = [] 9843 for t in rbAtmTypes: 9844 if t not in atmTypes and t not in notfound: 9845 notfound.append(t) 9846 if notfound: 9847 print('Rigid body atom type(s) not in structure',notfound) 9848 return [] 9841 9849 # remove assigned atoms from search groups 9842 9850 for i in selDict: … … 9877 9885 if min(dist) == 100: 9878 9886 print('no atom matches, how could this happen?') 9879 GSASIIpath.IPyBreak()9880 return 9887 if GSASIIpath.GetConfigValue('debug'): GSASIIpath.IPyBreak() 9888 return [] 9881 9889 Ids.append(atomData[pid][-1]) 9882 9890 matchTable.append([t , lbl] + list(xyz) + [pid, atomData[pid][0]] … … 10151 10159 mainSizer.Add(wx.StaticText(RigidBodies,wx.ID_ANY,'No side chain torsions'),0,WACV) 10152 10160 matchTable = assignAtoms() 10153 OkBtn = wx.Button(RigidBodies,wx.ID_ANY,"Add") 10154 OkBtn.Bind(wx.EVT_BUTTON, OnOk) 10161 if not matchTable: 10162 OkBtn = None 10163 mainSizer.Add((15,15)) 10164 mainSizer.Add(wx.StaticText(RigidBodies,wx.ID_ANY, 10165 'Error: unable to match atoms in rigid body to structure (see console window)'), 10166 0,WACV) 10167 else: 10168 OkBtn = wx.Button(RigidBodies,wx.ID_ANY,"Add") 10169 OkBtn.Bind(wx.EVT_BUTTON, OnOk) 10155 10170 CancelBtn = wx.Button(RigidBodies,wx.ID_ANY,'Cancel') 10156 10171 CancelBtn.Bind(wx.EVT_BUTTON, OnCancel) 10157 10172 btnSizer = wx.BoxSizer(wx.HORIZONTAL) 10158 10173 btnSizer.Add((20,20),1) 10159 btnSizer.Add(OkBtn)10174 if OkBtn: btnSizer.Add(OkBtn) 10160 10175 btnSizer.Add(CancelBtn) 10161 10176 btnSizer.Add((20,20),1) … … 10164 10179 SetPhaseWindow(RigidBodies,mainSizer) 10165 10180 10181 if not matchTable: 10182 mainSizer.Layout() 10183 RigidBodies.SetScrollRate(10,10) 10184 RigidBodies.SendSizeEvent() 10185 RigidBodies.Scroll(0,0) 10186 return 10166 10187 G2plt.PlotStructure(G2frame,data,True,UpdateTable) 10167 10188 colLabels = ['RB\ntype','phase\n#','phase\nlabel','delta, A','Assign as atom']
Note: See TracChangeset
for help on using the changeset viewer.