Skip to content

Commit 8a9289c

Browse files
committed
fix sytSym calculation in GenAtm
1 parent f15e88d commit 8a9289c

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

GSASII/GSASIIphsGUI.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9806,6 +9806,7 @@ def OnOrigX(invalid,value,tc):
98069806
for i,Id in enumerate(RBObj['Ids']):
98079807
data['Atoms'][AtLookUp[Id]][cx:cx+3] = newXYZ[i]
98089808
data['Atoms'][AtLookUp[Id]][cx+3] = maxFrac
9809+
data['Atoms'][AtLookUp[Id]][cs,cs+2] = G2spc.SytSym(newXYZ[i],SGData)[:2]
98099810
data['Atoms'] = G2lat.RBsymCheck(data['Atoms'],ct,cx,cs,AtLookUp,Amat,RBObj['Ids'],SGData)
98109811
data['Drawing']['Atoms'] = []
98119812
UpdateDrawAtoms(G2frame,data)
@@ -9824,6 +9825,7 @@ def ApplyAV(A,V):
98249825
maxFrac = max(maxFrac,data['Atoms'][AtLookUp[Id]][cx+3])
98259826
for i,Id in enumerate(RBObj['Ids']):
98269827
data['Atoms'][AtLookUp[Id]][cx:cx+3] = newXYZ[i]
9828+
data['Atoms'][AtLookUp[Id]][cs:cs+2] = G2spc.SytSym(newXYZ[i],SGData)[:2]
98279829
if Uout[i][0] == 'I':
98289830
data['Atoms'][AtLookUp[Id]][cia+1] = Uout[i][1]
98299831
else:

GSASII/GSASIIspc.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,7 +2202,7 @@ def GenAtom(XYZ,SGData,All=False,Uij=[],Move=True):
22022202
inv = 1
22032203
SpnFlp = SGData.get('SpnFlp',[])
22042204
spnflp = []
2205-
X = np.array(XYZ)
2205+
X = np.round(np.array(XYZ),6)
22062206
mj = 0
22072207
for ic,cen in enumerate(icen):
22082208
C = np.array(cen)
@@ -2223,10 +2223,12 @@ def GenAtom(XYZ,SGData,All=False,Uij=[],Move=True):
22232223
else:
22242224
newX = XT
22252225
if All:
2226-
if np.allclose(newX,X,atol=0.0002): #do we want %1. here?
2226+
newX = np.round(newX,6)
2227+
# if np.sqrt(np.sum(np.round(newX%1.,6)**2-np.round(X%1.,6)**2)) < 1.e-6:
2228+
if np.allclose(newX,X,atol=2.e-5): #do we want %1. here?
22272229
idup = False
22282230
else:
2229-
if True in [np.allclose(newX%1.,oldX%1.,atol=0.0002) for oldX in XYZEquiv]:
2231+
if True in [np.allclose(newX%1.,oldX%1.,atol=2.e-5) for oldX in XYZEquiv]:
22302232
idup = False
22312233
if All or idup:
22322234
XYZEquiv.append(newX)

0 commit comments

Comments
 (0)