Changeset 4602
 Timestamp:
 Oct 17, 2020 9:05:15 AM (19 months ago)
 Location:
 trunk
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIconstrGUI.py
r4594 r4602 2773 2773 data['Residue'][resRBsel] = {'RBname':rbName,'rbXYZ':rbXYZ,'rbTypes':rbTypes, 2774 2774 'atNames':atNames,'rbRef':[nOrig1,mRef1,nRef1,True],'rbSeq':rbSeq, 2775 'SelSeq':[0,0],'useCount':0 }2775 'SelSeq':[0,0],'useCount':0,'molCent':None} 2776 2776 data['RBIds']['Residue'].append(resRBsel) 2777 2777 print ('Rigid body '+rbName+' added') … … 2851 2851 name = G2obj.MakeUniqueLabel(name,namelist) 2852 2852 data['Residue'][resRBsel] = {'RBname':name,'rbXYZ':rbXYZ,'rbTypes':rbTypes, 2853 'atNames':atNames,'rbRef':[0,1,2,False],'rbSeq':[],'SelSeq':[0,0],'useCount':0 }2853 'atNames':atNames,'rbRef':[0,1,2,False],'rbSeq':[],'SelSeq':[0,0],'useCount':0,'molCent':False} 2854 2854 data['RBIds']['Residue'].append(resRBsel) 2855 2855 print ('Rigid body UNKRB added') … … 3050 3050 magSizer.Add(magValue,0,WACV) 3051 3051 magSizer.Add((5,0),) 3052 magref = wx.CheckBox(VectorRBDisplay, 1,label=' Refine?')3052 magref = wx.CheckBox(VectorRBDisplay,label=' Refine?') 3053 3053 magref.SetValue(rbData['VectRef'][imag]) 3054 3054 magref.Bind(wx.EVT_CHECKBOX,OnRBVectorRef) … … 3293 3293 rbXYZ = np.inner(Mat,rbXYZ).T 3294 3294 rbData['rbXYZ'] = rbXYZ 3295 rbData['molCent'] = False 3295 3296 res.ClearSelection() 3296 3297 resTable = res.GetTable() … … 3300 3301 resTable.SetRowValues(r,row) 3301 3302 res.ForceRefresh() 3303 molcent.SetValue(False) 3302 3304 G2plt.PlotRigidBody(G2frame,'Residue',AtInfo,rbData,plotDefaults) 3305 3306 def OnMolCent(event): 3307 rbData['molCent'] = not rbData['molCent'] 3308 if rbData['molCent']: 3309 Obj = event.GetEventObject() 3310 res = Indx[Obj.GetId()] 3311 rbXYZ = rbData['rbXYZ'] 3312 rbCent = np.array([np.sum(rbXYZ[:,0]),np.sum(rbXYZ[:,1]),np.sum(rbXYZ[:,2])])/rbXYZ.shape[0] 3313 rbXYZ = rbCent 3314 rbData['rbXYZ'] = rbXYZ 3315 res.ClearSelection() 3316 resTable = res.GetTable() 3317 for r in range(res.GetNumberRows()): 3318 row = resTable.GetRowValues(r) 3319 row[2:4] = rbXYZ[r] 3320 resTable.SetRowValues(r,row) 3321 res.ForceRefresh() 3322 G2plt.PlotRigidBody(G2frame,'Residue',AtInfo,rbData,plotDefaults) 3323 3303 3324 3304 3325 Types = 2*[wg.GRID_VALUE_STRING,]+3*[wg.GRID_VALUE_FLOAT+':10,5',] … … 3351 3372 refAtmSizer.Add(refSel,0,WACV) 3352 3373 RefObjs.append(refObj) 3374 if 'molCent' not in rbData: rbData['molCent'] = False #patch 3375 molcent = wx.CheckBox(ResidueRBDisplay,label=' Use RB center?') 3376 molcent.SetValue(rbData['molCent']) 3377 molcent.Bind(wx.EVT_CHECKBOX,OnMolCent) 3378 Indx[molcent.GetId()] = resGrid 3379 refAtmSizer.Add(molcent,0,WACV) 3353 3380 3354 3381 mainSizer = wx.BoxSizer(wx.VERTICAL) 
trunk/GSASIIphsGUI.py
r4601 r4602 4374 4374 for angles in AngArray: 4375 4375 Angles += [item[2][0] for item in AngArray[angles]] 4376 G2plt.PlotBarGraph(G2frame,Angles,Xname= '$\mathsf{Angles,{^o}}$',4376 G2plt.PlotBarGraph(G2frame,Angles,Xname=r'$\mathsf{Angles,{^o}}$', 4377 4377 Title='Bond angles about %s'%Atypes,PlotName='%s Angles'%Atypes) 4378 4378 print('Total number of angles about %s is %d'%(Atypes,len(Angles))) … … 10024 10024 topLine.Add(delRB,0,WACV) 10025 10025 symAxis = RBObj.get('symAxis') 10026 if symAxis:10026 if np.any(symAxis): 10027 10027 if symAxis[0] == symAxis[1] == symAxis[2]: 10028 10028 lbl = 'x+y+z'
Note: See TracChangeset
for help on using the changeset viewer.