Changeset 3030


Ignore:
Timestamp:
Aug 28, 2017 3:29:45 PM (4 years ago)
Author:
vondreele
Message:

make protein validation work with old (works) and new (doesn't work) errat versions via config control
add reference text to console out put for protein validation
contour plots for PWDR q-plots & d-plots - now not allowed as X-axes not linear as required for contour plots.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r3029 r3030  
    25652565###############################################################################
    25662566
    2567 def validProtein(Phase):
     2567def validProtein(Phase,old):
    25682568   
    25692569    def sumintact(intact):
     
    25742574    resNames = ['ALA','ARG','ASN','ASP','CYS','GLN','GLU','GLY','HIS','ILE',
    25752575        'LEU','LYS','MET','PHE','PRO','SER','THR','TRP','TYR','VAL','MSE']
    2576     old = True          #use errat version 1 math
    25772576# data from errat.f
    25782577    b1_old = np.array([
     
    26602659                tgts += list(Boxes[jbox[0],jbox[1],jbox[2]])
    26612660        tgts = list(set(tgts))
    2662         tgts = [tgt for tgt in tgts if np.sum((XYZ[ia]-XYZ[tgt])**2) <= dsmax]
     2661        tgts = [tgt for tgt in tgts if np.sum((XYZ[ia]-XYZ[tgt])**2) < dsmax]
    26632662        tgts = [tgt for tgt in tgts if atom[:3] != cartAtoms[tgt][:3]]    #exclude same residue
    26642663        ires = int(atom[0])
  • trunk/GSASIIphsGUI.py

    r3029 r3030  
    32913291       
    32923292    def OnValidProtein(event):
    3293         resNames,Probs = G2mth.validProtein(data)
    3294         G2plt.PlotAAProb(G2frame,resNames,Probs,Title='Error score for %s'%(data['General']['Name']),
    3295             thresh=[8.0,6.0])
    3296 #            thresh=[17.190823041860433,11.526684477428809])
     3293        old = GSASIIpath.GetConfigValue('Old protein validator',True)
     3294        resNames,Probs = G2mth.validProtein(data,old)
     3295        if old:             #duplicate errat.f 
     3296            print 'Protein validation based on errat.f'
     3297            print 'Ref: Colovos, C. & Yeates, T.O. Protein Science 2, 1511-1519 (1991).'
     3298            print 'Residue error scores >6 for 5% & >8 for 1% likelihood of being correct'
     3299            G2plt.PlotAAProb(G2frame,resNames,Probs,Title='Error score for %s'%(data['General']['Name']),
     3300                thresh=[8.0,6.0])
     3301        else:
     3302            print 'Protein validation based on erratv2.cpp; by D. Obukhov & T. Yeates'
     3303            print 'Ref: Colovos, C. & Yates, T.O. Protein Science 2, 1511-1519 (1991).'
     3304            print 'Residue error scores >11.5 for 5% & >17.2 for 1% likelihood of being correct'
     3305            G2plt.PlotAAProb(G2frame,resNames,Probs,Title='Error score for %s'%(data['General']['Name']),
     3306                thresh=[17.191,11.527])
    32973307
    32983308    def OnSetAll(event):
  • trunk/GSASIIplot.py

    r3023 r3030  
    13651365                G2frame.SinglePlot = True               
    13661366            G2frame.Contour = not G2frame.Contour
     1367            if G2frame.Contour:
     1368                G2frame.plotStyle['qPlot'] = False
     1369                G2frame.plotStyle['dPlot'] = False
    13671370        elif event.key == 'q':
    13681371            if 'PWDR' in plottype:
    13691372                newPlot = True
    13701373                G2frame.plotStyle['qPlot'] = not G2frame.plotStyle['qPlot']
     1374                if G2frame.plotStyle['qPlot']:
     1375                    G2frame.Contour = False
    13711376                G2frame.plotStyle['dPlot'] = False
    13721377            elif plottype in ['SASD','REFD']:
     
    13751380        elif event.key == 't' and 'PWDR' in plottype:
    13761381            G2frame.plotStyle['dPlot'] = not G2frame.plotStyle['dPlot']
     1382            if G2frame.plotStyle['dPlot']:
     1383                G2frame.Contour = False               
    13771384            G2frame.plotStyle['qPlot'] = False
    13781385            newPlot = True     
Note: See TracChangeset for help on using the changeset viewer.