Changeset 4573 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Sep 21, 2020 3:43:06 PM (3 years ago)
Author:
toby
Message:

RB extensions and minor bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r4565 r4573  
    84838483            elif G2frame.phaseDisplay.GetPageText(page) == 'Atoms':
    84848484                Ind = G2frame.phaseDisplay.GetPage(page).GetSelectedRows()      #this is the Atoms grid in Atoms
     8485            elif G2frame.phaseDisplay.GetPageText(page) == 'RB Models':
     8486                if 'testRBObj' not in data: return []
     8487                Ind = data['testRBObj'].get('CRYhighLight',[])
    84858488        return Ind
    84868489                                       
     
    91509153            if iat in Ind and G2frame.phaseDisplay.GetPageText(getSelection()) != 'Map peaks':
    91519154                atColor = np.array(Gr)/255.
     9155                bndColor = atColor
    91529156#            color += [.25,]
    91539157            radius = 0.5
     
    92799283                if showBonds:
    92809284                    RenderLines(x,y,z,mapBonds[ind],Wt)
    9281         if len(testRBObj) and pageName == 'RB Models':
     9285        if len(testRBObj) and pageName == 'RB Models':  # plot a test rigid body as ball & [green] sticks
    92829286            XYZ = G2mth.UpdateRBXYZ(Bmat,testRBObj['rbObj'],testRBObj['rbData'],testRBObj['rbType'])[0]
    92839287            rbBonds = FindPeaksBonds(XYZ)
    92849288            for ind,[x,y,z] in enumerate(XYZ):
    92859289                aType = testRBObj['rbAtTypes'][ind]
    9286                 name = '  '+aType+str(ind)
     9290                if testRBObj['NameLookup'][ind]:
     9291                    name = testRBObj['NameLookup'][ind]+' '
     9292                else:
     9293                    name = '  '+aType+str(ind)
    92879294                color = np.array(testRBObj['AtInfo'][aType][1])
    9288                 RenderSphere(x,y,z,0.2,color/255.)
     9295                if 'RBhighLight' in testRBObj and testRBObj['RBhighLight'] == ind: # highlighted atom is green
     9296                    RenderSphere(x,y,z,0.2,Gr)
     9297                else:
     9298                    RenderSphere(x,y,z,0.2,color/255.)
    92899299                RenderBonds(x,y,z,rbBonds[ind],0.03,Gr)
    92909300                RenderLabel(x,y,z,name,0.2,wxOrange,matRot)
     
    92969306                RenderSphere(x,y,z,0.2,color/255.)
    92979307                RenderBonds(x,y,z,mcsaBonds[ind],0.03,Gr/255.)
    9298                 RenderLabel(x,y,z,name,0.2,wxOrange,matRot)
     9308                RenderLabel(x,y,z,name,0.3,wxOrange,matRot)
    92999309        if Backbones:
    93009310            for chain in Backbones:
Note: See TracChangeset for help on using the changeset viewer.