Changeset 4812


Ignore:
Timestamp:
Feb 12, 2021 1:58:06 PM (8 months ago)
Author:
vondreele
Message:

Add Cycle XYZ button on residue RB GUI & add description to help text
Set atom fractions to 1.0 for inserted RB atoms.
Comment out "decorations" on RB triplet axes - found them confusing clutter.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIconstrGUI.py

    r4809 r4812  
    33753375                    G2plt.PlotRigidBody(G2frame,'Residue',AtInfo,rbData,plotDefaults)
    33763376                   
     3377            def OnCycleXYZ(event):
     3378                Obj = event.GetEventObject()
     3379                res = Indx[Obj.GetId()]
     3380                rbXYZ = rbData['rbXYZ']
     3381                resTable = res.GetTable()
     3382                for r in range(res.GetNumberRows()):
     3383                    rbXYZ[r] = np.roll(rbXYZ[r],1)
     3384                    row = resTable.GetRowValues(r)
     3385                    row[2:4] = rbXYZ[r]
     3386                    resTable.SetRowValues(r,row)
     3387                res.ForceRefresh()
     3388                G2plt.PlotRigidBody(G2frame,'Residue',AtInfo,rbData,plotDefaults)
    33773389               
    33783390            Types = 2*[wg.GRID_VALUE_STRING,]+3*[wg.GRID_VALUE_FLOAT+':10,5',]
     
    34253437                    refAtmSizer.Add(refSel,0,WACV)
    34263438                RefObjs.append(refObj)
     3439                cycleXYZ = wx.Button(ResidueRBDisplay,label=' Cycle XYZ?')
     3440                cycleXYZ.Bind(wx.EVT_BUTTON,OnCycleXYZ)
     3441                Indx[cycleXYZ.GetId()] = resGrid
     3442                refAtmSizer.Add(cycleXYZ,0,WACV)
    34273443                if 'molCent' not in rbData: rbData['molCent'] = False           #patch
    34283444                molcent = wx.Button(ResidueRBDisplay,label=' Center RB?')
     
    34373453 
    34383454%%* The origin is at A unless the "Center RB?" button is pressed.
     3455
     3456%%* The 'Cycle XYZ' button will permute the rigid body XYZ coordinates so
     3457XYZ --> ZXY. Repeat if needed.
    34393458
    34403459%%* The "Center RB?" button will shift the origin of the
  • trunk/GSASIIphsGUI.py

    r4811 r4812  
    1036610366                        x,y,z = line[2:5]
    1036710367                        AtomAdd(x,y,z,El=elem,Name=lbl,update=False)
    10368                         atomData[nextNum][6] = Mult/maxMult
    1036910368                        Ids.append(atomData[nextNum][-1])
    1037010369                        updateNeeded = True
    1037110370                    else:
    1037210371                        atomData[line[5]][cx:cx+3] = line[2:5]
    10373                         atomData[line[5]][6] = Mult/maxMult
    1037410372                        Ids.append(line[11])
    1037510373                if updateNeeded:
  • trunk/GSASIIplot.py

    r4807 r4812  
    89418941            GL.glVertex3fv(line)
    89428942        # arrows on line ends, colored by planes
    8943         for i in range(3):
    8944             for j in (1,-1):
    8945                 GL.glColor3ubv(colors[(i+1)%3])
    8946                 GL.glVertex3fv(lines[i])
    8947                 GL.glVertex3fv(0.7*lines[i]+ j*0.2*lines[(i+1)%3])
    8948                 GL.glColor3ubv(colors[(i+2)%3])
    8949                 GL.glVertex3fv(lines[i])
    8950                 GL.glVertex3fv(0.7*lines[i]+ j*0.2*lines[(i+2)%3])
     8943        # for i in range(3):
     8944        #     for j in (1,-1):
     8945        #         GL.glColor3ubv(colors[(i+1)%3])
     8946        #         GL.glVertex3fv(lines[i])
     8947        #         GL.glVertex3fv(0.7*lines[i]+ j*0.2*lines[(i+1)%3])
     8948        #         GL.glColor3ubv(colors[(i+2)%3])
     8949        #         GL.glVertex3fv(lines[i])
     8950        #         GL.glVertex3fv(0.7*lines[i]+ j*0.2*lines[(i+2)%3])
    89518951        # draw vector part of Q in white
    89528952        A,V = G2mth.Q2AVdeg(Q)
Note: See TracChangeset for help on using the changeset viewer.