Changeset 3247 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
Jan 29, 2018 9:34:15 AM (4 years ago)
Author:
vondreele
Message:

implement pick of protein validation bar - new view point on structure plot an N atom for selected residue
fix of non-gray modulated magnetic structures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r3245 r3247  
    34573457                       
    34583458    def OnValidProtein(event):
    3459         resNames,Probs1 = G2mth.validProtein(data,True)         #old version
    3460         resNames,Probs2 = G2mth.validProtein(data,False)        #new version
     3459       
     3460        def pickHandler(resName):
     3461            drawData = data['Drawing']
     3462            resid = resIDs[resName]
     3463            drawData['viewPoint'][0] = atomData[AtLookUp[resid]][cx:cx+3]
     3464            UpdateDrawAtoms()
     3465            G2plt.PlotStructure(G2frame,data)
     3466       
     3467        atomData = data['Atoms']
     3468        cx,ct,cs,cia = data['General']['AtomPtrs']
     3469        AtLookUp = G2mth.FillAtomLookUp(atomData,cia+8)
     3470        resNames,Probs1,resIDs = G2mth.validProtein(data,True)         #old version
     3471        resNames,Probs2,resIDs = G2mth.validProtein(data,False)        #new version
    34613472        print ('Plot 1 is Protein validation based on errat.f')
    34623473        print ('Ref: Colovos, C. & Yeates, T.O. Protein Science 2, 1511-1519 (1991).')
     
    34683479        print ('NB: this calc. gives a close approximate to original erratv2 result')
    34693480        G2plt.PlotAAProb(G2frame,resNames,Probs1,Probs2,Title='Error score for %s'%(data['General']['Name']),
    3470             thresh=[[8.0,6.0],[17.191,11.527]])
     3481            thresh=[[8.0,6.0],[17.191,11.527]],pickHandler=pickHandler)
    34713482
    34723483    def OnIsoDistortCalc(event):
Note: See TracChangeset for help on using the changeset viewer.