@@ -11989,21 +11989,22 @@ def SelDeformAtom(event):
1198911989 fxchoice.append('Slater')
1199011990 if not radial:
1199111991 radial = 'Slater'
11992- if 's' in orb:
11993- data['Deformations'][Ids[indx]].append([orb,{'Ne':[float(orbs[orb]['Ne']),False],'kappa':[1.0,False]}]) #no sp. harm for s terms
11994- else: #p, d or f
11995- orbDict = {}
11996- Order = 'spdf'.index(orb[-1])
11997- cofNames,cofSgns = G2lat.GenRBCoeff(sytsyms[indx],'1',Order) #sytsym, RBsym = '1'
11998- cofNames = [name.replace('C','D') for name in cofNames]
11999- cofTerms = {name:[0.0,False] for name in cofNames if str(Order) in name}
12000- for name in cofNames:
12001- if str(Order) in name and '0' not in name:
12002- negname = name.replace(',',',-')
12003- cofTerms.update({negname:[0.0,False]})
12004- orbDict.update(cofTerms)
12005- orbDict.update({'Ne':[float(orbs[orb]['Ne']),False]})
12006- data['Deformations'][Ids[indx]].append([orb,orbDict])
11992+ if 'Sl val' in orb: #valence; no harmonics
11993+ data['Deformations'][Ids[indx]].append([orb,{'Ne':[float(orbs[orb]['Ne']),False],'kappa':[1.0,False]}])
11994+ break
11995+ # else: #p, d or f
11996+ # orbDict = {}
11997+ # Order = 'spdf'.index(orb[-1])
11998+ # cofNames,cofSgns = G2lat.GenRBCoeff(sytsyms[indx],'1',Order) #sytsym, RBsym = '1'
11999+ # cofNames = [name.replace('C','D') for name in cofNames]
12000+ # cofTerms = {name:[0.0,False] for name in cofNames if str(Order) in name}
12001+ # for name in cofNames:
12002+ # if str(Order) in name and '0' not in name:
12003+ # negname = name.replace(',',',-')
12004+ # cofTerms.update({negname:[0.0,False]})
12005+ # orbDict.update(cofTerms)
12006+ # orbDict.update({'Ne':[float(orbs[orb]['Ne']),False]})
12007+ # data['Deformations'][Ids[indx]].append([orb,orbDict])
1200712008 data['Deformations'][-Ids[indx]] = {'U':'X','V':'Y','UVmat':np.eye(3),
1200812009 'MUV':"A: X'=U, Y'=(UxV)xU & Z'=UxV",'Radial':radial,'fxchoice':fxchoice}
1200912010 dlg.Destroy()
@@ -12154,17 +12155,18 @@ def OnNewHarm(event):
1215412155 if len(orders):
1215512156 Order = max(orders)+1
1215612157 cofNames = []
12157- while not len(cofNames) and Order < 5:
12158+ notFound = True
12159+ while notFound and Order < 6:
1215812160 cofNames,cofSgns = G2lat.GenRBCoeff(sytsym,'1',Order) #sytsym, RBsym = '1'
12161+ cofNames = [name.replace('C','D') for name in cofNames]
12162+ for name in cofNames:
12163+ if name not in Hkeys: #new names found
12164+ notFound = False
12165+ Harm[1].update({name:[0.0,False]})
12166+ if '0' not in name:
12167+ negname = name.replace(',',',-')
12168+ Harm[1].update({negname:[0.0,False]})
1215912169 Order += 1
12160- Order -= 1
12161- cofNames = [name.replace('C','D') for name in cofNames]
12162- cofTerms = {name:[0.0,False] for name in cofNames if str(Order) in name}
12163- for name in cofNames:
12164- if str(Order) in name and '0' not in name:
12165- negname = name.replace(',',',-')
12166- cofTerms.update({negname:[0.0,False]})
12167- Harm[1].update(cofTerms)
1216812170 wx.CallAfter(UpdateDeformation,dId)
1216912171
1217012172 def OnDelHarm(event):
0 commit comments