Changeset 836 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jan 21, 2013 10:59:15 AM (9 years ago)
Author:
vondreele
Message:

finish restraint rigid body input & display

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r835 r836  
    34063406    uColors = [Rd,Gr,Bl]
    34073407    if rbType == 'Vector':
     3408        atNames = [str(i)+':'+Ty for i,Ty in enumerate(rbData['rbTypes'])]
    34083409        XYZ = np.array([[0.,0.,0.] for Ty in rbData['rbTypes']])
    34093410        for imag,mag in enumerate(rbData['VectMag']):
     
    34113412        Bonds = FindBonds(XYZ)
    34123413    elif rbType == 'Residue':
    3413         pass
     3414        atNames = [str(i)+':'+Ty for i,Ty in enumerate(rbData['atNames'])]
     3415        XYZ = np.copy(rbData['rbXYZ'])      #don't mess with original!
     3416        Seq = rbData['rbSeq']
     3417        for seq in Seq:
     3418            for ia,ib,ang,mv in seq:
     3419                va = XYZ[ia]-XYZ[ib]
     3420                Q = G2mth.AVdeg2Q(ang,va)
     3421                for im in mv:
     3422                    vb = XYZ[im]-XYZ[ib]
     3423                    vb = G2mth.prodQVQ(Q,vb)
     3424                    XYZ[im] = XYZ[ib]+vb
     3425        Bonds = FindBonds(XYZ)
    34143426    elif rbType == 'Z-matrix':
    34153427        pass
     
    35423554        glTranslate(x,y,z)
    35433555        glDisable(GL_LIGHTING)
    3544         glColor3f(0,1.,0)
     3556        glColor3f(1.0,1.0,1.0)
    35453557        glRasterPos3f(r,r,r)
    35463558        for c in list(label):
     
    35833595            RenderSphere(x,y,z,radius,color)
    35843596            RenderBonds(x,y,z,Bonds[iat],0.1,color)
    3585             RenderLabel(x,y,z,str(iat),radius)
     3597            RenderLabel(x,y,z,atNames[iat],radius)
    35863598        Page.canvas.SwapBuffers()
    35873599
Note: See TracChangeset for help on using the changeset viewer.