Changeset 835 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jan 17, 2013 2:05:19 PM (9 years ago)
Author:
vondreele
Message:

more work on rigid bodies
fixes for crash in selecting wavelengths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r834 r835  
    33763376################################################################################
    33773377
    3378 def PlotRigidBody(G2frame,rbType,rbData,defaults):
     3378def PlotRigidBody(G2frame,rbType,AtInfo,rbData,defaults):
    33793379    '''RB plotting package. Can show rigid body structures as balls & sticks
    33803380    '''
    33813381
    3382     def FindBonds(XYZ,rbData):                    #uses numpy & masks - very fast even for proteins!
     3382    def FindBonds(XYZ):                    #uses numpy & masks - very fast even for proteins!
    33833383        import numpy.ma as ma
    3384         AtInfo = rbData['AtInfo']
    33853384        rbTypes = rbData['rbTypes']
    33863385        Radii = []
     
    34103409        for imag,mag in enumerate(rbData['VectMag']):
    34113410            XYZ += mag*rbData['rbVect'][imag]
    3412         Bonds = FindBonds(XYZ,rbData)
     3411        Bonds = FindBonds(XYZ)
    34133412    elif rbType == 'Residue':
    34143413        pass
     
    35803579        for iat,atom in enumerate(XYZ):
    35813580            x,y,z = atom
    3582             CL = rbData['AtInfo'][rbData['rbTypes'][iat]][1]
     3581            CL = AtInfo[rbData['rbTypes'][iat]][1]
    35833582            color = np.array(CL)/255.
    35843583            RenderSphere(x,y,z,radius,color)
Note: See TracChangeset for help on using the changeset viewer.