- Timestamp:
- Mar 24, 2022 10:07:33 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIconstrGUI.py ¶
r5239 r5250 2027 2027 pass 2028 2028 elif 'Residue' in G2frame.rbBook.GetPageText(page): 2029 ImportResidueRB() 2030 2029 try: 2030 ImportResidueRB() 2031 except Exception as msg: 2032 print('Error reading .xyz file\n Error msg:',msg) 2033 if GSASIIpath.GetConfigValue('debug'): 2034 import traceback 2035 print (traceback.format_exc()) 2036 2031 2037 def OnSaveRigidBody(event): 2032 2038 page = G2frame.rbBook.GetSelection() … … 3123 3129 Indx[delRB.GetId()] = rbid 3124 3130 nameSizer.Add(delRB,0,WACV) 3131 nameSizer.Add((-1,-1),1,wx.EXPAND,1) 3132 nameSizer.Add(G2G.HelpButton(VectorRBDisplay,helpIndex=G2frame.dataWindow.helpKey)) 3125 3133 return nameSizer 3126 3134 … … 3187 3195 magSizer = wx.BoxSizer(wx.HORIZONTAL) 3188 3196 magSizer.Add(wx.StaticText(VectorRBDisplay,-1,'Translation magnitude: '),0,WACV) 3189 magValue = wx.TextCtrl(VectorRBDisplay,-1,'%8.4f'%(rbData['VectMag'][imag])) 3197 magValue = wx.TextCtrl(VectorRBDisplay,-1,'%8.4f'%(rbData['VectMag'][imag]), 3198 style=wx.TE_PROCESS_ENTER) 3190 3199 Indx[magValue.GetId()] = [rbid,imag] 3191 3200 magValue.Bind(wx.EVT_TEXT_ENTER,OnRBVectorMag) … … 3325 3334 SetStatusLine(' You may use e.g. "c60" or "s60" for a vector entry') 3326 3335 FillRefChoice(resRBsel,rbData) 3327 VectorRBSizer.Add(rbNameSizer(resRBsel,rbData),0 )3336 VectorRBSizer.Add(rbNameSizer(resRBsel,rbData),0,wx.EXPAND) 3328 3337 VectorRBSizer.Add(rbRefAtmSizer(resRBsel,rbData),0) 3329 3338 XYZ = np.array([[0.,0.,0.] for Ty in rbData['rbTypes']]) … … 3424 3433 nameSizer.Add(wx.StaticText(ResidueRBDisplay,-1,' body type #'+ 3425 3434 str(data['RBIds']['Residue'].index(rbid))),0,WACV) 3435 nameSizer.Add((-1,-1),1,wx.EXPAND,1) 3436 nameSizer.Add(G2G.HelpButton(ResidueRBDisplay,helpIndex=G2frame.dataWindow.helpKey)) 3426 3437 return nameSizer 3427 3438 … … 3549 3560 atNames = rbData['atNames'] 3550 3561 rbRef = rbData['rbRef'] 3562 refHelpInfo = ''' 3563 * The "Orientation Reference" control defines the Cartesian 3564 axes for rigid bodies with the three atoms, A, B and C. 3565 The vector from B to A defines the x-axis and the y axis is placed 3566 in the plane defined by B to A and C to A. A,B,C must not be collinear. 3567 3568 %%* The origin is at A unless the "Center RB?" button is pressed. 3569 3570 %%* The 'Cycle XYZ' button will permute the rigid body XYZ coordinates so 3571 XYZ --> ZXY. Repeat if needed. 3572 3573 %%* The "Center RB?" button will shift the origin of the 3574 rigid body to be the midpoint of all atoms in the body (not mass weighted). 3575 ''' 3576 hlp = G2G.HelpButton(ResidueRBDisplay,refHelpInfo,wrap=400) 3577 refAtmSizer.Add(hlp,0,wx.LEFT|wx.RIGHT|wx.ALIGN_CENTER_VERTICAL,2) 3578 refAtmSizer2 = None 3551 3579 if rbData['rbRef'][3] or rbData['useCount']: 3552 3580 refAtmSizer.Add(wx.StaticText(ResidueRBDisplay,-1, … … 3566 3594 refObj[i] = refSel 3567 3595 refAtmSizer.Add(refSel,0,WACV) 3596 refAtmSizer.Add((50,-1)) # moves the help button out a bit 3568 3597 RefObjs.append(refObj) 3598 refAtmSizer2 = wx.BoxSizer(wx.HORIZONTAL) 3569 3599 cycleXYZ = wx.Button(ResidueRBDisplay,label=' Cycle XYZ?') 3570 3600 cycleXYZ.Bind(wx.EVT_BUTTON,OnCycleXYZ) 3571 3601 Indx[cycleXYZ.GetId()] = resGrid 3572 refAtmSizer .Add(cycleXYZ,0,WACV)3602 refAtmSizer2.Add(cycleXYZ,0,WACV) 3573 3603 if 'molCent' not in rbData: rbData['molCent'] = False #patch 3574 3604 molcent = wx.Button(ResidueRBDisplay,label=' Center RB?') 3575 3605 molcent.Bind(wx.EVT_BUTTON,OnMolCent) 3576 3606 Indx[molcent.GetId()] = resGrid 3577 refAtmSizer.Add(molcent,0,WACV) 3578 refHelpInfo = ''' 3579 * The "Orientation Reference" control defines the Cartesian 3580 axes for rigid bodies with the three atoms, A, B and C. 3581 The vector from B to A defines the x-axis and the y axis is placed 3582 in the plane defined by B to A and C to A. A,B,C must not be collinear. 3583 3584 %%* The origin is at A unless the "Center RB?" button is pressed. 3585 3586 %%* The 'Cycle XYZ' button will permute the rigid body XYZ coordinates so 3587 XYZ --> ZXY. Repeat if needed. 3588 3589 %%* The "Center RB?" button will shift the origin of the 3590 rigid body to be the midpoint of all atoms in the body (not mass weighted). 3591 ''' 3592 hlp = G2G.HelpButton(ResidueRBDisplay,refHelpInfo,wrap=400) 3593 refAtmSizer.Add(hlp,0,wx.LEFT|wx.RIGHT|wx.ALIGN_CENTER_VERTICAL,2) 3607 refAtmSizer2.Add(molcent,0,WACV) 3594 3608 3595 3609 mainSizer = wx.BoxSizer(wx.VERTICAL) 3596 mainSizer.Add(refAtmSizer) 3610 mainSizer.Add(refAtmSizer,0,wx.EXPAND) 3611 if refAtmSizer2: mainSizer.Add(refAtmSizer2) 3597 3612 mainSizer.Add(vecSizer) 3598 3613 return mainSizer … … 3745 3760 rbData = data['Residue'][resRBsel] 3746 3761 FillRefChoice(resRBsel,rbData) 3747 ResidueRBSizer.Add(rbNameSizer(resRBsel,rbData),0 )3762 ResidueRBSizer.Add(rbNameSizer(resRBsel,rbData),0,wx.EXPAND) 3748 3763 ResidueRBSizer.Add(rbResidues(resRBsel,rbData),0) 3749 3764 if len(rbData['rbSeq']): … … 3770 3785 Size[1] = max(Size[1],450) + 20 3771 3786 ResidueRB.SetSize(Size) 3772 ResidueRB.SetScrollbars(10,10,int(Size[0]/10-4),int(Size[1]/10-1))3787 #ResidueRB.SetScrollbars(10,10,int(Size[0]/10-4),int(Size[1]/10-1)) # dataframe already scrolls 3773 3788 G2frame.dataWindow.SendSizeEvent() 3774 3789 -
TabularUnified trunk/GSASIIphsGUI.py ¶
r5248 r5250 2433 2433 if len(Map['RefList']) and not generalData['Modulated']: 2434 2434 if all(['PWDR' in map for map in Map['RefList']]): 2435 Dysno = wx.CheckBox(General,-1,label=' Use Dysnomia (Max. Ent. Method)?')2435 Dysno = wx.CheckBox(General,-1,label=' Use Dysnomia?') 2436 2436 Dysno.SetValue(generalData['doDysnomia']) 2437 2437 Dysno.Bind(wx.EVT_CHECKBOX,OnDysnomia) 2438 2438 line2Sizer.Add(Dysno,0,WACV) 2439 hlpText = '''Dysnomia uses the maximum entropy method 2440 to compute intensities for unobserved reflections. 2441 ''' 2442 hlp = G2G.HelpButton(General,hlpText) 2443 line2Sizer.Add(hlp,0,WACV) 2439 2444 mapSizer.Add(line2Sizer,0) 2440 2445 return mapSizer … … 3529 3534 Atoms.SetReadOnly(row,colSS,True) #site sym 3530 3535 Atoms.SetReadOnly(row,colSS+1,True) #Mult 3536 oldSizer = AtomList.GetSizer() 3537 if oldSizer: oldSizer.Clear() # get rid of the old sizer, if repeated call 3531 3538 Atoms.AutoSizeColumns(False) 3532 3539 mainSizer = wx.BoxSizer(wx.VERTICAL) … … 8921 8928 #### UpdateDrawAtoms executable code starts here 8922 8929 G2frame.GetStatusBar().SetStatusText('',1) 8930 oldSizer = drawAtomsList.GetSizer() 8931 if oldSizer: 8932 oldSizer.Clear() # get rid of the old sizer, if repeated call 8923 8933 generalData = data['General'] 8924 8934 SetupDrawingData() … … 13292 13302 # FillPawleyReflectionsGrid executable starts here 13293 13303 G2frame.GetStatusBar().SetStatusText('To delete a Pawley reflection: select row & press Delete',1) 13304 oldSizer = PawleyRefList.GetSizer() 13305 if oldSizer: oldSizer.Clear() 13294 13306 generalData = data['General'] 13295 13307 PawleyPeaks = data['Pawley ref'] … … 13646 13658 # beginning of FillMapPeaksGrid() 13647 13659 G2frame.GetStatusBar().SetStatusText('',1) 13660 oldSizer = MapPeakList.GetSizer() 13661 if oldSizer: oldSizer.Clear() 13648 13662 if 'Map Peaks' in data: 13649 13663 mainSizer = wx.BoxSizer(wx.VERTICAL) -
TabularUnified trunk/GSASIIplot.py ¶
r5247 r5250 9329 9329 page = getSelection() 9330 9330 if page: 9331 if G2frame.phaseDisplay.GetPageText(page) == 'Draw Atoms': 9332 G2frame.phaseDisplay.GetPage(page).GetChildren()[0].ClearSelection() #this is the Atoms grid in Draw Atoms 9333 elif G2frame.phaseDisplay.GetPageText(page) == 'Map peaks': 9334 G2frame.phaseDisplay.GetPage(page).GetChildren()[0].ClearSelection() #this is the Atoms grid in Atoms 9335 elif G2frame.phaseDisplay.GetPageText(page) == 'Atoms': 9336 G2frame.phaseDisplay.GetPage(page).GetChildren()[0].ClearSelection() #this is the Atoms grid in Atoms 9337 9331 if G2frame.phaseDisplay.GetPageText(page) in ( 9332 'Draw Atoms','Map peaks','Atoms'): 9333 for widget in G2frame.phaseDisplay.GetPage(page).GetChildren(): 9334 try: 9335 widget.ClearSelection() # this is a grid 9336 break 9337 except AttributeError: 9338 pass 9338 9339 9339 9340 def SetSelectedAtoms(ind,Add=False): 9340 9341 page = getSelection() 9341 9342 if page: 9342 if G2frame.phaseDisplay.GetPageText(page) == 'Draw Atoms': 9343 G2frame.phaseDisplay.GetPage(page).GetChildren()[0].SelectRow(ind,Add) #this is the Atoms grid in Draw Atoms 9344 elif G2frame.phaseDisplay.GetPageText(page) == 'Map peaks': 9345 G2frame.phaseDisplay.GetPage(page).GetChildren()[0].SelectRow(ind,Add) 9346 elif G2frame.phaseDisplay.GetPageText(page) == 'Atoms': 9347 Id = drawAtoms[ind][-3] 9348 for i,atom in enumerate(atomData): 9349 if atom[-1] == Id: 9350 G2frame.phaseDisplay.GetPage(page).GetChildren()[0].SelectRow(i,Add) #this is the Atoms grid in Atoms 9343 if G2frame.phaseDisplay.GetPageText(page) in ( 9344 'Draw Atoms','Map peaks','Atoms'): 9345 for widget in G2frame.phaseDisplay.GetPage(page).GetChildren(): 9346 if hasattr(widget,'GetSelectedRows'): break 9347 else: 9348 return 9349 if G2frame.phaseDisplay.GetPageText(page) == 'Atoms': 9350 Id = drawAtoms[ind][-3] 9351 for i,atom in enumerate(atomData): 9352 if atom[-1] == Id: 9353 widget.SelectRow(i,Add) #this is the Atoms grid in Atoms 9354 else: 9355 widget.SelectRow(ind,Add) # this is a grid 9351 9356 9352 9357 def GetSelectedAtoms(): … … 9354 9359 Ind = [] 9355 9360 if page: 9356 if G2frame.phaseDisplay.GetPageText(page) == 'Draw Atoms': 9357 Ind = G2frame.phaseDisplay.GetPage(page).GetChildren()[0].GetSelectedRows() #this is the Atoms grid in Draw Atoms 9358 elif G2frame.phaseDisplay.GetPageText(page) == 'Map peaks': 9359 Ind = G2frame.phaseDisplay.GetPage(page).GetChildren()[0].GetSelectedRows() 9360 elif G2frame.phaseDisplay.GetPageText(page) == 'Atoms': 9361 Ind = G2frame.phaseDisplay.GetPage(page).GetChildren()[0].GetSelectedRows() #this is the Atoms grid in Atoms 9361 if G2frame.phaseDisplay.GetPageText(page) in ( 9362 'Draw Atoms','Map peaks','Atoms'): 9363 for widget in G2frame.phaseDisplay.GetPage(page).GetChildren(): 9364 try: 9365 Ind = widget.GetSelectedRows() # this is a grid 9366 break 9367 except AttributeError: 9368 pass 9362 9369 elif G2frame.phaseDisplay.GetPageText(page) == 'RB Models': 9363 9370 if 'testRBObj' not in data: return [] -
TabularUnified trunk/help/gsasII-phase.html ¶
r5249 r5250 5170 5170 <p class=MsoListParagraphCxSpMiddle style='margin-left:1.0in;mso-add-space: 5171 5171 auto;text-indent:-.25in;mso-list:l9 level1 lfo14;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a 5172 name= Pawley><![if !supportLists]><span style='mso-fareast-font-family:"Times New Roman"'><span5172 name="Phase-Pawley_reflections"><![if !supportLists]><span style='mso-fareast-font-family:"Times New Roman"'><span 5173 5173 style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'> 5174 5174 </span></span></span><![endif]>Select the </a><span class=SpellE><span … … 5765 5765 </span></div> 5766 5766 5767 <p class=MsoNormal><span style='mso-fareast-font-family:"Times New Roman"'><!-- hhmts start -->Last 5768 modified: Tue Jan 25 09:29:56 CST 2022 <!-- hhmts end --><o:p></o:p></span></p> 5767 <p class=MsoNormal><span style='mso-fareast-font-family:"Times New Roman"'><!-- hhmts start -->Last modified: Thu Mar 24 16:28:36 CDT 2022 <!-- hhmts end --><o:p></o:p></span></p> 5769 5768 5770 5769 </div>
Note: See TracChangeset
for help on using the changeset viewer.