Skip to content

Commit c75d736

Browse files
committed
local site sym fixes for deformation
1 parent 01d2aae commit c75d736

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

GSASII/GSASIIlattice.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2532,7 +2532,6 @@ def RBsymChk(RBsym,cubic,coefNames,L=18):
25322532

25332533
def GenRBCoeff(sytsym,RBsym,L):
25342534
'''imposes rigid body symmetry on spherical harmonics terms
2535-
Key problem is noncubic RB symmetries in cubic site symmetries & vice versa.
25362535
25372536
:param str sytsym: atom position site symmetry symbol
25382537
:param str RBsym: molecular point symmetry symbol
@@ -2543,11 +2542,14 @@ def GenRBCoeff(sytsym,RBsym,L):
25432542
coefNames = []
25442543
coefSgns = []
25452544
cubic = False
2546-
if sytsym in ['23','m3','432','-43m','m3m']:
2545+
rbSym = sytsym
2546+
if RBsym:
2547+
rbSym = RBsym
2548+
if rbSym in ['23','m3','432','-43m','m3m']:
25472549
cubic = True
25482550
for iord in range(1,L+1):
25492551
for n in range(-iord,iord+1):
2550-
rbChk,sgn = RBChk(sytsym,iord,n)
2552+
rbChk,sgn = RBChk(rbSym,iord,n)
25512553
if rbChk:
25522554
if cubic:
25532555
coefNames.append('C(%d,%d)c'%(iord,n))
@@ -2556,7 +2558,7 @@ def GenRBCoeff(sytsym,RBsym,L):
25562558
coefSgns.append(sgn)
25572559
if RBsym == '1':
25582560
return coefNames,coefSgns
2559-
newNames,newSgns = RBsymChk(RBsym,cubic,coefNames,L)
2561+
newNames,newSgns = RBsymChk(rbSym,cubic,coefNames,L)
25602562
return newNames,newSgns
25612563

25622564
def GenShCoeff(sytsym,L):

GSASII/GSASIIphsGUI2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ def OnNewHarm(event):
335335
dId = Indx[Obj.GetId()]
336336
atom = atomData[AtLookUp[dId]]
337337
sytsym = atom[cs].strip()
338+
rbSym = deformationData[-dId]['LocSS']
338339
for harm in data['Deformations'][dId]:
339340
if 'Sl' in harm[0]:
340341
Harm = harm
@@ -346,7 +347,7 @@ def OnNewHarm(event):
346347
cofNames = []
347348
notFound = True
348349
while notFound and Order < 6:
349-
cofNames,cofSgns = G2lat.GenRBCoeff(sytsym,'1',Order) #sytsym, RBsym = '1'
350+
cofNames,cofSgns = G2lat.GenRBCoeff(sytsym,rbSym,Order)
350351
cofNames = [name.replace('C','D') for name in cofNames]
351352
for name in cofNames:
352353
if name not in Hkeys: #new names found

0 commit comments

Comments
 (0)