Changeset 935 for trunk/GSASIIplot.py
- Timestamp:
- May 29, 2013 9:31:23 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r934 r935 3193 3193 3194 3194 def RenderLines(x,y,z,Bonds,color): 3195 glShadeModel(GL_FLAT) 3195 3196 xyz = np.array([x,y,z]) 3196 3197 glEnable(GL_COLOR_MATERIAL) … … 3206 3207 glPopMatrix() 3207 3208 glDisable(GL_COLOR_MATERIAL) 3209 glShadeModel(GL_SMOOTH) 3208 3210 3209 3211 def RenderPolyhedra(x,y,z,Faces,color): … … 3224 3226 3225 3227 def RenderMapPeak(x,y,z,color,den): 3228 glShadeModel(GL_FLAT) 3226 3229 xyz = np.array([x,y,z]) 3227 3230 glEnable(GL_COLOR_MATERIAL) … … 3237 3240 glPopMatrix() 3238 3241 glDisable(GL_COLOR_MATERIAL) 3242 glShadeModel(GL_SMOOTH) 3239 3243 3240 3244 def RenderBackbone(Backbone,BackboneColor,radius): … … 3254 3258 glDisable(GL_LIGHTING) 3255 3259 glColor3fv(color) 3256 glRasterPos3f( r,r,r)3260 glRasterPos3f(0,0,0) 3257 3261 for c in list(label): 3258 3262 glutBitmapCharacter(GLUT_BITMAP_8_BY_13,ord(c)) … … 3261 3265 3262 3266 def RenderMap(rho,rhoXYZ,indx,Rok): 3267 glShadeModel(GL_FLAT) 3263 3268 cLevel = drawingData['contourLevel'] 3264 3269 XYZ = [] … … 3278 3283 RC.append([0.1*alpha,Gr]) 3279 3284 RenderDots(XYZ,RC) 3285 glShadeModel(GL_SMOOTH) 3280 3286 3281 3287 def Draw(caller=''): … … 3433 3439 3434 3440 if atom[cs+1] == 'type': 3435 RenderLabel(x,y,z, atom[ct],radius,Gr)3441 RenderLabel(x,y,z,' '+atom[ct],radius,Gr) 3436 3442 elif atom[cs+1] == 'name': 3437 RenderLabel(x,y,z, atom[ct-1],radius,Gr)3443 RenderLabel(x,y,z,' '+atom[ct-1],radius,Gr) 3438 3444 elif atom[cs+1] == 'number': 3439 RenderLabel(x,y,z, str(iat),radius,Gr)3445 RenderLabel(x,y,z,' '+str(iat),radius,Gr) 3440 3446 elif atom[cs+1] == 'residue' and atom[ct-1] == 'CA': 3441 RenderLabel(x,y,z, atom[ct-4],radius,Gr)3447 RenderLabel(x,y,z,' '+atom[ct-4],radius,Gr) 3442 3448 elif atom[cs+1] == '1-letter' and atom[ct-1] == 'CA': 3443 RenderLabel(x,y,z, atom[ct-3],radius,Gr)3449 RenderLabel(x,y,z,' '+atom[ct-3],radius,Gr) 3444 3450 elif atom[cs+1] == 'chain' and atom[ct-1] == 'CA': 3445 RenderLabel(x,y,z, atom[ct-2],radius,Gr)3451 RenderLabel(x,y,z,' '+atom[ct-2],radius,Gr) 3446 3452 # glDisable(GL_BLEND) 3447 3453 if len(rhoXYZ): … … 3462 3468 for ind,[x,y,z] in enumerate(XYZ): 3463 3469 aType = testRBObj['rbAtTypes'][ind] 3464 name = aType+str(ind)3470 name = ' '+aType+str(ind) 3465 3471 color = np.array(testRBObj['AtInfo'][aType][1]) 3466 3472 RenderSphere(x,y,z,0.2,color/255.) … … 3473 3479 for ind,[x,y,z] in enumerate(XYZ): 3474 3480 aType = atTypes[ind] 3475 name = aType+str(ind)3481 name = ' '+aType+str(ind) 3476 3482 color = np.array(MCSA['AtInfo'][aType][1]) 3477 3483 RenderSphere(x,y,z,0.2,color/255.) … … 3729 3735 glPopMatrix() 3730 3736 3731 def RenderLabel(x,y,z,label ,r):3737 def RenderLabel(x,y,z,label): 3732 3738 glPushMatrix() 3733 3739 glTranslate(x,y,z) 3734 3740 glDisable(GL_LIGHTING) 3735 3741 glColor3f(1.0,1.0,1.0) 3736 glRasterPos3f( r,r,r)3742 glRasterPos3f(0,0,0) 3737 3743 for c in list(label): 3738 3744 glutBitmapCharacter(GLUT_BITMAP_8_BY_13,ord(c)) … … 3774 3780 RenderSphere(x,y,z,radius,color) 3775 3781 RenderBonds(x,y,z,Bonds[iat],0.05,color) 3776 RenderLabel(x,y,z, atNames[iat],radius)3782 RenderLabel(x,y,z,' '+atNames[iat]) 3777 3783 Page.canvas.SwapBuffers() 3778 3784
Note: See TracChangeset
for help on using the changeset viewer.