Changeset 4427 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
May 20, 2020 7:33:57 PM (19 months ago)
Author:
vondreele
Message:

fullrmc fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4425 r4427  
    43664366                atSeq = RMCPdict['atSeq']
    43674367                lenA = len(atSeq)
    4368                 for pair in [[' %s-%s'%(atSeq[i],atSeq[j]) for j in range(i,lenA)] for i in range(lenA)]:
     4368                for pair in [[' %s-%s'%(atSeq[i],atSeq[j]) for j in range(i,lenA) if 'Va' not in atSeq[j]] for i in range(lenA) if 'Va' not in atSeq[i]]:
    43694369                    Pairs += pair
    43704370                RMCPdict['Pairs'] = {pairs:[0.0,0.0,0.0] for pairs in Pairs}
     
    44074407                for itype in range(nTypes):
    44084408                    atmChoice.Add(G2G.ValidatedTxtCtrl(G2frame.FRMC,RMCPdict['Oxid'][itype],1,min=0.),0,WACV)
    4409             atmChoice.Add(wx.StaticText(G2frame.FRMC,label=' Set max shift: '),0,WACV)
    4410             for iType in range(nTypes):
    4411                 atId = RMCPdict['atSeq'][iType]
    4412                 atmChoice.Add(G2G.ValidatedTxtCtrl(G2frame.FRMC,RMCPdict['aTypes'],atId,min=0.,max=1.),0,WACV)
     4409            if G2frame.RMCchoice == 'RMCProfile':
     4410                atmChoice.Add(wx.StaticText(G2frame.FRMC,label=' Set max shift: '),0,WACV)
     4411                for iType in range(nTypes):
     4412                    atId = RMCPdict['atSeq'][iType]
     4413                    atmChoice.Add(G2G.ValidatedTxtCtrl(G2frame.FRMC,RMCPdict['aTypes'],atId,min=0.,max=1.),0,WACV)
    44134414            return atmChoice
    44144415       
     
    45774578                        corrChk.Bind(wx.EVT_CHECKBOX,OnCorrChk)
    45784579                        fileSizer.Add(corrChk,0,WACV)
    4579                         delBtn = wx.Button(G2frame.FRMC,label='Delete')
    4580                         delBtn.Bind(wx.EVT_BUTTON,OnDelBtn)
    4581                         Indx[delBtn.GetId()] = fil
    4582                         fileSizer.Add(delBtn,0,WACV)
     4580                    delBtn = wx.Button(G2frame.FRMC,label='Delete')
     4581                    delBtn.Bind(wx.EVT_BUTTON,OnDelBtn)
     4582                    Indx[delBtn.GetId()] = fil
     4583                    fileSizer.Add(delBtn,0,WACV)
    45834584                else:
    45844585                    RMCPdict['files'][fil][0] = 'Select'
     
    46304631                lenA = len(atSeq)
    46314632                Pairs= []
    4632                 for pair in [[' %s-%s'%(atSeq[i],atSeq[j]) for j in range(i,lenA)] for i in range(lenA)]:
     4633                for pair in [[' %s-%s'%(atSeq[i],atSeq[j]) for j in range(i,lenA) if 'Va' not in atSeq[j]] for i in range(lenA) if 'Va' not in atSeq[i]]:
    46334634                    Pairs += pair
    46344635                Pairs = {pairs:[0.0,0.0,0.0] for pairs in Pairs}
     
    47154716                finally:
    47164717                    dlg.Destroy()
     4718                wx.CallAfter(UpdateRMC)
    47174719               
    47184720            def OnAddAngle(event):
     
    47414743               
    47424744                Indx = {}
    4743                 atChoice = RMCPdict['atSeq']
     4745                atChoice = [atm for atm in RMCPdict['atSeq'] if 'Va' not in atm]
    47444746                angleSizer = wx.FlexGridSizer(6,5,5)
    47454747                fxcnLabels = [' ','Atom-A','Atom-B','Atom-C',' min angle',' max angle']
     
    47784780               
    47794781                Indx = {}
     4782                atChoice = [atm for atm in RMCPdict['atSeq'] if 'Va' not in atm]
    47804783                torsionSizer = wx.FlexGridSizer(11,5,5)
    47814784                fxcnLabels = [' ','Atom-A','Atom-B','Atom-C','Atom-D',' min angle1',' max angle1',' min angle2',' max angle2',' min angle3',' max angle3']
     
    47884791                    torsionSizer.Add(delBtn,0,WACV)
    47894792                    for i in [0,1,2,3]:
    4790                         atmSel = wx.ComboBox(G2frame.FRMC,choices=atNames,style=wx.CB_DROPDOWN|wx.TE_READONLY)
     4793                        atmSel = wx.ComboBox(G2frame.FRMC,choices=atChoice,style=wx.CB_DROPDOWN|wx.TE_READONLY)
    47914794                        atmSel.SetStringSelection(torsion[i])
    47924795                        atmSel.Bind(wx.EVT_COMBOBOX,OnTorsionAtSel)
     
    49354938                lenA = len(atSeq)
    49364939                Pairs= []
    4937                 for pair in [[' %s-%s'%(atSeq[i],atSeq[j]) for j in range(i,lenA)] for i in range(lenA)]:
     4940                for pair in [[' %s-%s'%(atSeq[i],atSeq[j]) for j in range(i,lenA) if 'Va' not in atSeq[j]] for i in range(lenA) if 'Va' not in atSeq[i]]:
    49384941                    Pairs += pair
    49394942                Pairs = {pairs:[0.0,0.0,0.0] for pairs in Pairs}
    49404943                BVSpairs = []
    49414944                if lenA > 1:
    4942                     for pair in [[' %s-%s'%(atSeq[i],atSeq[j]) for j in range(i+1,lenA)] for i in range(lenA)]:
     4945                    for pair in [[' %s-%s'%(atSeq[i],atSeq[j]) for j in range(i+1,lenA)] for i in range(lenA)] and 'Va' not in pair:
    49434946                        BVSpairs += pair
    49444947                BVS = {pairs:[0.0,0.0,0.0,0.0] for pairs in BVSpairs}
     
    50775080               
    50785081                fxcnSizer = wx.FlexGridSizer(8,5,5)
    5079                 atChoice = RMCPdict['atSeq']
     5082                atChoice = [atm for atm in RMCPdict['atSeq'] if 'Va' not in atm]
    50805083                fxcnLabels = [' ','Atom-1','Atom-2','min dist','max dist','CN','fraction','weight']
    50815084                for lab in fxcnLabels:
     
    51135116                               
    51145117                avcnSizer = wx.FlexGridSizer(7,5,5)
    5115                 atChoice = RMCPdict['atSeq']
     5118                atChoice = [atm for atm in RMCPdict['atSeq'] if 'Va' not in atm]
    51165119                fxcnLabels = [' ','Atom-1','Atom-2','min dist','max dist','CN','weight']
    51175120                for lab in fxcnLabels:
     
    51505153                    RMCPdict['ReStart'][1] = True
    51515154               
    5152                 atChoice = RMCPdict['atSeq']
     5155                atChoice = [atm for atm in RMCPdict['atSeq'] if 'Va' not in atm]
    51535156                angleSizer = wx.FlexGridSizer(8,5,5)
    51545157                fxcnLabels = [' ','Atom-A','Atom-B','Atom-C',' ABC angle','AB dist','BC dist','potential']
     
    51885191                    RMCPdict['ReStart'][1] = True
    51895192               
    5190                 atChoice = RMCPdict['atSeq']
     5193                atChoice = [atm for atm in RMCPdict['atSeq'] if 'Va' not in atm]
    51915194                bondSizer = wx.FlexGridSizer(5,5,5)
    51925195                fxcnLabels = [' ','Atom-A','Atom-B',' AB dist','potential']
Note: See TracChangeset for help on using the changeset viewer.