Changeset 4427 for trunk/GSASIIphsGUI.py
- Timestamp:
- May 20, 2020 7:33:57 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r4425 r4427 4366 4366 atSeq = RMCPdict['atSeq'] 4367 4367 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]]: 4369 4369 Pairs += pair 4370 4370 RMCPdict['Pairs'] = {pairs:[0.0,0.0,0.0] for pairs in Pairs} … … 4407 4407 for itype in range(nTypes): 4408 4408 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) 4413 4414 return atmChoice 4414 4415 … … 4577 4578 corrChk.Bind(wx.EVT_CHECKBOX,OnCorrChk) 4578 4579 fileSizer.Add(corrChk,0,WACV) 4579 4580 4581 4582 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) 4583 4584 else: 4584 4585 RMCPdict['files'][fil][0] = 'Select' … … 4630 4631 lenA = len(atSeq) 4631 4632 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]]: 4633 4634 Pairs += pair 4634 4635 Pairs = {pairs:[0.0,0.0,0.0] for pairs in Pairs} … … 4715 4716 finally: 4716 4717 dlg.Destroy() 4718 wx.CallAfter(UpdateRMC) 4717 4719 4718 4720 def OnAddAngle(event): … … 4741 4743 4742 4744 Indx = {} 4743 atChoice = RMCPdict['atSeq']4745 atChoice = [atm for atm in RMCPdict['atSeq'] if 'Va' not in atm] 4744 4746 angleSizer = wx.FlexGridSizer(6,5,5) 4745 4747 fxcnLabels = [' ','Atom-A','Atom-B','Atom-C',' min angle',' max angle'] … … 4778 4780 4779 4781 Indx = {} 4782 atChoice = [atm for atm in RMCPdict['atSeq'] if 'Va' not in atm] 4780 4783 torsionSizer = wx.FlexGridSizer(11,5,5) 4781 4784 fxcnLabels = [' ','Atom-A','Atom-B','Atom-C','Atom-D',' min angle1',' max angle1',' min angle2',' max angle2',' min angle3',' max angle3'] … … 4788 4791 torsionSizer.Add(delBtn,0,WACV) 4789 4792 for i in [0,1,2,3]: 4790 atmSel = wx.ComboBox(G2frame.FRMC,choices=at Names,style=wx.CB_DROPDOWN|wx.TE_READONLY)4793 atmSel = wx.ComboBox(G2frame.FRMC,choices=atChoice,style=wx.CB_DROPDOWN|wx.TE_READONLY) 4791 4794 atmSel.SetStringSelection(torsion[i]) 4792 4795 atmSel.Bind(wx.EVT_COMBOBOX,OnTorsionAtSel) … … 4935 4938 lenA = len(atSeq) 4936 4939 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]]: 4938 4941 Pairs += pair 4939 4942 Pairs = {pairs:[0.0,0.0,0.0] for pairs in Pairs} 4940 4943 BVSpairs = [] 4941 4944 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: 4943 4946 BVSpairs += pair 4944 4947 BVS = {pairs:[0.0,0.0,0.0,0.0] for pairs in BVSpairs} … … 5077 5080 5078 5081 fxcnSizer = wx.FlexGridSizer(8,5,5) 5079 atChoice = RMCPdict['atSeq']5082 atChoice = [atm for atm in RMCPdict['atSeq'] if 'Va' not in atm] 5080 5083 fxcnLabels = [' ','Atom-1','Atom-2','min dist','max dist','CN','fraction','weight'] 5081 5084 for lab in fxcnLabels: … … 5113 5116 5114 5117 avcnSizer = wx.FlexGridSizer(7,5,5) 5115 atChoice = RMCPdict['atSeq']5118 atChoice = [atm for atm in RMCPdict['atSeq'] if 'Va' not in atm] 5116 5119 fxcnLabels = [' ','Atom-1','Atom-2','min dist','max dist','CN','weight'] 5117 5120 for lab in fxcnLabels: … … 5150 5153 RMCPdict['ReStart'][1] = True 5151 5154 5152 atChoice = RMCPdict['atSeq']5155 atChoice = [atm for atm in RMCPdict['atSeq'] if 'Va' not in atm] 5153 5156 angleSizer = wx.FlexGridSizer(8,5,5) 5154 5157 fxcnLabels = [' ','Atom-A','Atom-B','Atom-C',' ABC angle','AB dist','BC dist','potential'] … … 5188 5191 RMCPdict['ReStart'][1] = True 5189 5192 5190 atChoice = RMCPdict['atSeq']5193 atChoice = [atm for atm in RMCPdict['atSeq'] if 'Va' not in atm] 5191 5194 bondSizer = wx.FlexGridSizer(5,5,5) 5192 5195 fxcnLabels = [' ','Atom-A','Atom-B',' AB dist','potential']
Note: See TracChangeset
for help on using the changeset viewer.