Changeset 934 for trunk/GSASIIplot.py


Ignore:
Timestamp:
May 28, 2013 4:29:16 PM (10 years ago)
Author:
vondreele
Message:

changes for MC/SA

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r924 r934  
    26182618    testRBObj = data.get('testRBObj',{})
    26192619    rbObj = testRBObj.get('rbObj',{})
     2620    MCSA = data.get('MCSA',{})
     2621    mcsaModels = []
     2622    if len(MCSA):
     2623        mcsaModels = MCSA['Models']
    26202624    drawAtoms = drawingData.get('Atoms',[])
    26212625    mapData = {}
     
    34643468                RenderBonds(x,y,z,rbBonds[ind],0.03,Gr)
    34653469                RenderLabel(x,y,z,name,0.2,Or)
     3470        if len(mcsaModels) > 1 and pageName == 'MC/SA':             #skip the default MD entry
     3471            XYZ,atTypes = G2mth.UpdateMCSAxyz(Bmat,mcsaModels,MCSA.get('rbData',{}))
     3472            rbBonds = FindPeaksBonds(XYZ)
     3473            for ind,[x,y,z] in enumerate(XYZ):
     3474                aType = atTypes[ind]
     3475                name = aType+str(ind)
     3476                color = np.array(MCSA['AtInfo'][aType][1])
     3477                RenderSphere(x,y,z,0.2,color/255.)
     3478                RenderBonds(x,y,z,rbBonds[ind],0.03,Gr)
     3479                RenderLabel(x,y,z,name,0.2,Or)
    34663480        if Backbones:
    34673481            for chain in Backbones:
     
    35543568        Bonds = FindBonds(XYZ)
    35553569    elif rbType == 'Residue':
    3556         atNames = [str(i)+':'+Ty for i,Ty in enumerate(rbData['atNames'])]
     3570#        atNames = [str(i)+':'+Ty for i,Ty in enumerate(rbData['atNames'])]
     3571        atNames = rbData['atNames']
    35573572        XYZ = np.copy(rbData['rbXYZ'])      #don't mess with original!
    35583573        Seq = rbData['rbSeq']
     
    36103625    def SetLights():
    36113626        glEnable(GL_DEPTH_TEST)
    3612         glShadeModel(GL_SMOOTH)
     3627        glShadeModel(GL_FLAT)
    36133628        glEnable(GL_LIGHTING)
    36143629        glEnable(GL_LIGHT0)
     
    37523767        glMultMatrixf(matRot.T)
    37533768        RenderUnitVectors(0.,0.,0.)
    3754         radius = 0.4
     3769        radius = 0.2
    37553770        for iat,atom in enumerate(XYZ):
    37563771            x,y,z = atom
     
    37583773            color = np.array(CL)/255.
    37593774            RenderSphere(x,y,z,radius,color)
    3760             RenderBonds(x,y,z,Bonds[iat],0.1,color)
     3775            RenderBonds(x,y,z,Bonds[iat],0.05,color)
    37613776            RenderLabel(x,y,z,atNames[iat],radius)
    37623777        Page.canvas.SwapBuffers()
Note: See TracChangeset for help on using the changeset viewer.