Changeset 4095 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Aug 16, 2019 10:58:08 AM (4 years ago)
Author:
vondreele
Message:

improve dmax estimation - use proper selected weights
ditto P(R) calculation
remove Seq fit from all but particle fits - not appropriate for rest.
Add option for bead separation in SHAPES results - improves appearance in small proteins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r4094 r4095  
    5353import GSASIIElem as G2elem
    5454import GSASIIsasd as G2sasd
     55import G2shapes_np
    5556VERY_LIGHT_GREY = wx.Colour(235,235,235)
    5657WACV = wx.ALIGN_CENTER_VERTICAL
     
    358359        'Pair':{'Method':'Moore','MaxRadius':100.,'NBins':100,'Errors':'User',
    359360                'Percent error':2.5,'Background':[0,False],'Distribution':[],
    360                 'Moore':20,'Dist G':100.,'Result':[],},           
     361                'Moore':10,'Dist G':100.,'Result':[],},           
    361362        'Particle':{'Matrix':{'Name':'vacuum','VolFrac':[0.0,False]},'Levels':[],},
    362363        'Shapes':{'outName':'run','NumAA':100,'Niter':1,'AAscale':1.0,'Symm':1,'bias-z':0.0,
    363                  'inflateV':1.0,'AAglue':0.0,'pdbOut':False},
     364                 'inflateV':1.0,'AAglue':0.0,'pdbOut':False,'boxStep':4.0},
    364365        'Current':'Size dist.','BackFile':'',
    365366        }
     
    52315232    if 'Pair' not in data:
    52325233        data['Pair'] = {'Method':'Moore','MaxRadius':100.,'NBins':100,'Errors':'User','Result':[],
    5233             'Percent error':2.5,'Background':[0,False],'Distribution':[],'Moore':[20,False],'Dist G':100.,} 
     5234            'Percent error':2.5,'Background':[0,False],'Distribution':[],'Moore':10,'Dist G':100.,} 
    52345235    if 'Shapes' not in data:
    52355236        data['Shapes'] = {'outName':'run','NumAA':100,'Niter':1,'AAscale':1.0,'Symm':1,'bias-z':0.0,
    5236             'inflateV':1.0,'AAglue':0.0,'pdbOut':False}
     5237            'inflateV':1.0,'AAglue':0.0,'pdbOut':False,'boxStep':4.0}
     5238    if 'boxStep' not in data['Shapes']:
     5239        data['Shapes']['boxStep'] = 4.0
    52375240    plotDefaults = {'oldxy':[0.,0.],'Quaternion':[0.,0.,0.,1.],'cameraPos':150.,'viewDir':[0,0,1],}
    52385241
     
    55845587       
    55855588    def PairSizer():
    5586 #        'Pair':{'Method':'Regularization','MaxRadius':[100.,False],'NBins':101,'Errors':'User',
    5587 #                'Percent error':2.5,'Background':[0,False],'Distribution':[],
    5588 #                'Moore':20,},           
    55895589               
    55905590        def OnMethod(event):
     
    56505650            mooreSizer = wx.BoxSizer(wx.HORIZONTAL)
    56515651            mooreSizer.Add(wx.StaticText(G2frame.dataWindow,label='Number of functions: '),0,WACV)
    5652             moore = G2G.ValidatedTxtCtrl(G2frame.dataWindow,data['Pair'],'Moore',min=2)
     5652            moore = G2G.ValidatedTxtCtrl(G2frame.dataWindow,data['Pair'],'Moore',min=2,max=20)
    56535653            mooreSizer.Add(moore,0,WACV)
    56545654            mooreterms = wx.Button(G2frame.dataWindow,label = 'Auto determine?')
     
    56945694            RefreshPlots(True)
    56955695            G2plt.PlotSASDPairDist(G2frame)
    5696            
    5697            
    5698            
    56995696       
    57005697        shapeSizer = wx.BoxSizer(wx.VERTICAL)
     
    57065703        parmSizer.Add(numAA,0,WACV)
    57075704        parmSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Nballs=no. amino acids*'),0,WACV)       
    5708         scaleAA = G2G.ValidatedTxtCtrl(G2frame.dataWindow,data['Shapes'],'AAscale',min=0.1,max=10.,nDig=(10,2))
     5705        scaleAA = G2G.ValidatedTxtCtrl(G2frame.dataWindow,data['Shapes'],'AAscale',min=0.01,max=10.,nDig=(10,2))
    57095706        parmSizer.Add(scaleAA,0,WACV)
    57105707#2nd row       
     
    57295726        name = G2G.ValidatedTxtCtrl(G2frame.dataWindow,data['Shapes'],'outName')
    57305727        parmSizer.Add(name,0,WACV)
    5731 #last row       
     5728#last row
     5729        parmSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Bead separation (3.5-5): '),0,WACV)
     5730        beadsep = G2G.ValidatedTxtCtrl(G2frame.dataWindow,data['Shapes'],'boxStep',min=3.5,max=5,nDig=(10,1))
     5731        parmSizer.Add(beadsep,0,WACV)       
    57325732        pdb = wx.CheckBox(G2frame.dataWindow,label=' Save as pdb files?: ')
    57335733        pdb.SetValue(data['Shapes']['pdbOut'])
     
    60756075    G2G.HorizontalLine(mainSizer,G2frame.dataWindow)
    60766076    if 'Size' in data['Current']:
     6077        G2frame.dataWindow.SasSeqFit.Enable(False)
    60776078        if 'MaxEnt' in data['Size']['Method']:
    60786079            G2frame.GetStatusBar().SetStatusText('Size distribution by Maximum entropy',1)
     
    60816082        mainSizer.Add(SizeSizer())       
    60826083    elif 'Particle' in data['Current']:
     6084        G2frame.dataWindow.SasSeqFit.Enable(True)
    60836085        mainSizer.Add(PartSizer(),1,wx.ALIGN_LEFT|wx.EXPAND)
    60846086    elif 'Pair' in data['Current']:
     6087        G2frame.dataWindow.SasSeqFit.Enable(False)
    60856088        mainSizer.Add(PairSizer(),1,wx.ALIGN_LEFT|wx.EXPAND)
    60866089    elif 'Shape' in data['Current']:
     6090        G2frame.dataWindow.SasSeqFit.Enable(False)
    60876091        mainSizer.Add(ShapesSizer(),1,wx.ALIGN_LEFT|wx.EXPAND)
    60886092    G2G.HorizontalLine(mainSizer,G2frame.dataWindow)   
     
    60926096        nDig=(10,3,'g'),OnLeave=OnBackChange)
    60936097    backSizer.Add(backVal,0,WACV)
    6094     backVar = wx.CheckBox(G2frame.dataWindow,label='Refine?')
    6095     Indx[backVar.GetId()] = [data['Back'],1]
    6096     backVar.SetValue(data['Back'][1])
    6097     backVar.Bind(wx.EVT_CHECKBOX, OnCheckBox)
    6098     backSizer.Add(backVar,0,WACV)
    6099     #multiple background files?
     6098    if 'Shape' not in data['Current']:
     6099        backVar = wx.CheckBox(G2frame.dataWindow,label='Refine?')
     6100        Indx[backVar.GetId()] = [data['Back'],1]
     6101        backVar.SetValue(data['Back'][1])
     6102        backVar.Bind(wx.EVT_CHECKBOX, OnCheckBox)
     6103        backSizer.Add(backVar,0,WACV)
     6104        #multiple background files?
    61006105    backSizer.Add(wx.StaticText(G2frame.dataWindow,-1,' Background file: '),0,WACV)
    61016106    Choices = ['',]+G2gd.GetGPXtreeDataNames(G2frame,['SASD',])
Note: See TracChangeset for help on using the changeset viewer.