Changeset 4809
- Timestamp:
- Feb 10, 2021 3:49:46 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIconstrGUI.py
r4805 r4809 3292 3292 Indx[stripH.GetId()] = rbid 3293 3293 nameSizer.Add(stripH,0,WACV) 3294 nameSizer.Add(wx.StaticText(ResidueRBDisplay,-1,' body type #'+ 3295 str(data['RBIds']['Residue'].index(rbid))),0,WACV) 3294 3296 return nameSizer 3295 3297 -
trunk/GSASIIdataGUI.py
r4806 r4809 8528 8528 mainSizer.Add((5,5),) 8529 8529 wtSizer = wx.BoxSizer(wx.HORIZONTAL) 8530 wtSizer.Add(G2G.HelpButton(G2frame.dataWindow,helpIndex=G2frame.dataWindow.helpKey))8531 8530 wtSizer.Add(wx.StaticText(G2frame.dataWindow,-1,' Weight factor: '),0,WACV) 8532 8531 wtSizer.Add(G2G.ValidatedTxtCtrl(G2frame.dataWindow,data[0],'wtFactor',nDig=(10,3),xmin=1.e-9),0,WACV) … … 8539 8538 # comp.Bind(wx.EVT_COMBOBOX, OnCompression) 8540 8539 # wtSizer.Add(comp,0,WACV) 8541 8542 mainSizer.Add(wtSizer) 8540 wtSizer.Add((-1,-1),1,wx.EXPAND) 8541 wtSizer.Add(G2G.HelpButton(G2frame.dataWindow,helpIndex=G2frame.dataWindow.helpKey)) 8542 mainSizer.Add(wtSizer,0,wx.EXPAND) 8543 8543 wtSizer = wx.BoxSizer(wx.HORIZONTAL) 8544 8544 wtSizer.Add(wx.StaticText(G2frame.dataWindow,-1,' Histogram label: '),0,WACV) -
trunk/GSASIIobj.py
r4680 r4809 454 454 455 455 456 Phase Information 457 -------------------- 458 459 .. index:: 460 single: Phase information record description 461 462 Phase information is placed in one of the following keys: 463 464 .. tabularcolumns:: |l|p{4.5in}| 465 466 ========== ============================================================== 467 key explanation 468 ========== ============================================================== 469 General Overall information about a phase 470 Histograms Information about each histogram linked to the 471 current phase as well as parameters that 472 are defined for each histogram and phase 473 (such as sample peak widths and preferred 474 orientation parameters. 475 Atoms Contains a list of atoms, as described in the 476 :ref:`Atom Records <Atoms_table>` description. 477 Drawing Parameters that determine how the phase is 478 displayed, including a list of atoms to be 479 included, as described in the 480 :ref:`Drawing Atom Records <Drawing_atoms_table>` 481 description 482 MCSA Monte-Carlo simulated annealing parameters 483 pId The index of each phase in the project, numbered 484 starting at 0 485 ranId An int value with a unique value for each phase 486 RBModels A list of dicts with parameters for each 487 rigid body inserted into the current phase, 488 as defined in the 489 :ref:`Rigid Body Insertions <Rigid_Body_Insertions>`. 490 Note that the rigid bodies are defined as 491 :ref:`Rigid Body Objects <RBData_table>` 492 RMC PDF modeling parameters 493 Pawley ref Pawley refinement parameters 494 495 ========== ============================================================== 496 456 497 .. _Atoms_table: 457 498 … … 460 501 single: Data object descriptions; Atoms record 461 502 503 -------------------- 462 504 Atom Records 463 ------------ 505 -------------------- 464 506 465 507 If ``phasedict`` points to the phase information in the data tree, then … … 500 542 single: Data object descriptions; Drawing atoms record 501 543 544 ---------------------------- 502 545 Drawing Atom Records 503 -------------------- 546 ---------------------------- 504 547 505 548 If ``phasedict`` points to the phase information in the data tree, then … … 531 574 cs+5...cs+11 (6 floats) U11, U22, U33, U12, U13, U23 532 575 ci (int) unique atom identifier; matches source atom Id in Atom Records 576 ============== =================================================================================== 577 578 .. _Rigid_Body_Insertions: 579 580 ---------------------------- 581 Rigid Body Insertions 582 ---------------------------- 583 584 If ``phasedict`` points to the phase information in the data tree, then 585 rigid body information is contained in list(s) in 586 ``phasedict['RBModels']['Residue']`` and/or ``phasedict['RBModels']['Vector']`` 587 for each rigid body inserted into the current phase. 588 589 .. tabularcolumns:: |l|p{4.5in}| 590 591 ============== =================================================================================== 592 key explanation 593 ============== =================================================================================== 594 fixOrig Should the origin be fixed (when editing, not the refinement flag) 595 Ids Ids for assignment of atoms in the rigid body 596 numChain Chain number for macromolecular fits 597 Orient Orientation of the RB as a quaternion and a refinement flag (' ', 'A' or 'AV') 598 OrientVec Orientation of the RB expressed as a vector and azimuthal rotation angle 599 Orig Origin of the RB in fractional coordinates and refinement flag (bool) 600 RBId References the unique ID of a rigid body in the 601 :ref:`Rigid Body Objects <RBData_table>` 602 RBname The name for the rigid body (str) 603 ThermalMotion The thermal motion description for the rigid body, which includes a choice for 604 the model and can include TLS parameters or an overall Uiso value. 605 Torsions Defines the torsion angle and refinement flag for each torsion defined in 606 the :ref:`Rigid Body Object <RBData_table>` 533 607 ============== =================================================================================== 534 608 … … 1713 1787 lbl = ShortPhaseNames.get(l[0],'phase?') 1714 1788 if 'RB' in l[2]: #rigid body parm 1715 s = "R es #"+str(l[3])+" body #"+str(l[4])+" in "+str(lbl)1789 s = "RB body #"+str(l[3])+" (type "+str(l[4])+") in "+str(lbl) + ',' 1716 1790 else: #modulation parm 1717 1791 s = 'Atom %s wave %s in %s'%(LookupAtomLabel(l[0],l[3])[0],l[4],lbl) -
trunk/GSASIIphsGUI.py
r4803 r4809 89 89 acosd = lambda x: 180.*np.arccos(x)/np.pi 90 90 atan2d = lambda x,y: 180.*np.arctan2(y,x)/np.pi 91 92 # previous rigid body selections 93 prevResId = None 94 prevVecId = None 91 95 92 96 if '2' in platform.python_version_tuple()[0]: … … 9806 9810 Note that the page is a ScrolledWindow, not a Grid 9807 9811 ''' 9812 resVarLookup = [] 9808 9813 def OnThermSel(event): #needs to be seen by VecRbSizer! 9809 9814 Obj = event.GetEventObject() … … 9955 9960 return rbSizer 9956 9961 9957 def ResrbSizer(RBObj ):9958 9962 def ResrbSizer(RBObj,resIndx): 9963 '''Displays details for selected rigid body''' 9959 9964 def OnTorsionRef(event): 9960 9965 Obj = event.GetEventObject() … … 10005 10010 topLine.Add(wx.StaticText(RigidBodies,-1, 10006 10011 ' Rigid body {} axis is aligned along oriention vector'.format(lbl)),0,WACV) 10012 varname = str(data['pId'])+'::RBRxxx:'+resVarLookup[resIndx] 10013 topLine.Add(wx.StaticText(RigidBodies,-1, 10014 ' (variables '+varname+')'),0,WACV) 10007 10015 resrbSizer.Add(topLine) 10008 10016 resrbSizer.Add(LocationSizer(RBObj,'Residue')) … … 10073 10081 10074 10082 def OnVecSelect(event): 10075 rbId = select.GetSelection() 10076 wx.CallLater(100,RepaintRBInfo,'Vector',rbId) 10083 global prevVecId 10084 prevVecId = select.GetSelection() 10085 wx.CallLater(100,RepaintRBInfo,'Vector',prevVecId) 10077 10086 10078 10087 def OnResSelect(event): 10079 rbId = resSelect.GetSelection() 10080 wx.CallLater(100,RepaintRBInfo,'Residue',rbId) 10088 global prevResId 10089 prevResId = resSelect.GetSelection() 10090 wx.CallLater(100,RepaintRBInfo,'Residue',prevResId) 10081 10091 10082 def RepaintRBInfo(rbType,rbI d,Scroll=0):10092 def RepaintRBInfo(rbType,rbIndx,Scroll=0): 10083 10093 oldFocus = wx.Window.FindFocus() 10084 10094 if 'phoenix' in wx.version(): … … 10087 10097 G2frame.bottomSizer.DeleteWindows() 10088 10098 Indx.clear() 10089 rbObj = data['RBModels'][rbType][rbI d]10099 rbObj = data['RBModels'][rbType][rbIndx] 10090 10100 data['Drawing']['viewPoint'][0] = rbObj['Orig'][0] 10091 10101 Quad = rbObj['Orient'][0] 10092 10102 data['Drawing']['Quaternion'] = G2mth.invQ(Quad) 10093 G2frame.bottomSizer = ResrbSizer(rbObj )10103 G2frame.bottomSizer = ResrbSizer(rbObj,rbIndx) 10094 10104 mainSizer.Add(G2frame.bottomSizer) 10095 10105 mainSizer.Layout() … … 10132 10142 mainSizer.Add((5,5),0) 10133 10143 RBnames = [] 10134 for RBObj in data['RBModels']['Residue']: 10135 RBnames.append(RBObj['RBname']+RBObj['numChain']) 10136 if resId is None: 10144 resVarLookup = [] 10145 for irb,RBObj in enumerate(data['RBModels']['Residue']): 10146 name = RBObj['RBname']+RBObj['numChain'] 10147 RBnames.append(name) 10148 jrb = RBData['RBIds']['Residue'].index(RBObj['RBId']) 10149 resVarLookup.append(str(irb)+':'+str(jrb)) # var name suffix following G2strMath.ApplyRBModels() 10150 if prevResId is not None: 10151 resId = prevResId 10152 try: 10153 rbName = RBnames[resId] 10154 except TypeError: 10137 10155 resId = 0 10138 rbName = RBnames[resId]10156 rbName = RBnames[resId] 10139 10157 rbObj = data['RBModels']['Residue'][resId] 10140 10158 data['Drawing']['viewPoint'][0] = rbObj['Orig'][0] … … 10146 10164 mainSizer.Add(resSelect,0) 10147 10165 G2frame.bottomSizer = wx.BoxSizer(wx.VERTICAL) 10148 G2frame.bottomSizer.Add(ResrbSizer(rbObj ))10166 G2frame.bottomSizer.Add(ResrbSizer(rbObj,resId)) 10149 10167 mainSizer.Add(G2frame.bottomSizer) 10150 10168 G2plt.PlotStructure(G2frame,data) … … 10158 10176 for RBObj in data['RBModels']['Vector']: 10159 10177 RBnames.append(RBObj['RBname']) 10160 if vecId is None: 10178 if prevVecId is not None: 10179 vecId = prevVecId 10180 try: 10181 rbName = RBnames[vecId] 10182 except TypeError: 10161 10183 vecId = 0 10162 rbName = RBnames[vecId]10184 rbName = RBnames[vecId] 10163 10185 rbObj = data['RBModels']['Vector'][vecId] 10164 10186 data['Drawing']['viewPoint'][0] = rbObj['Orig'][0]
Note: See TracChangeset
for help on using the changeset viewer.