Skip to content

Commit 1c8aed0

Browse files
committed
Fix to InvertRB option
1 parent eb14489 commit 1c8aed0

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

GSASII/GSASIImath.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ def UpdateRBXYZ(Bmat,RBObj,RBData,RBType):
13841384
vecs = RBRes['rbVect']
13851385
mags = RBRes['VectMag']
13861386
Cart = np.zeros_like(vecs[0])
1387-
if RBRes.get('Invert',False):
1387+
if RBObj.get('Invert',False):
13881388
Cart *= -1.
13891389
for vec,mag in zip(vecs,mags):
13901390
Cart += vec*mag
@@ -1394,7 +1394,7 @@ def UpdateRBXYZ(Bmat,RBObj,RBData,RBType):
13941394
for tor,seq in zip(RBObj['Torsions'],RBRes['rbSeq']):
13951395
QuatA = AVdeg2Q(tor[0],Cart[seq[0]]-Cart[seq[1]])
13961396
Cart[seq[3]] = prodQVQ(QuatA,(Cart[seq[3]]-Cart[seq[1]]))+Cart[seq[1]]
1397-
if RBRes.get('Invert',False):
1397+
if RBObj.get('Invert',False):
13981398
Cart *= -1.
13991399
elif RBType == 'Spin':
14001400
Cart = np.zeros(3)

GSASII/GSASIIphsGUI.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10918,6 +10918,7 @@ def OnOrigSet(event):
1091810918
UpdateTablePlot()
1091910919

1092010920
def OnInvert(event):
10921+
UpdateTable()
1092110922
UpdateTablePlot()
1092210923

1092310924
showAtom = [None]
@@ -10942,6 +10943,7 @@ def showCryAtom(*args,**kwargs):
1094210943
mainSizer = wx.BoxSizer(wx.VERTICAL)
1094310944
mainSizer.Add((5,5),0)
1094410945
rbObj = data['testRBObj']['rbObj']
10946+
rbObj['Invert'] = rbObj.get('Invert',False)
1094510947
data['RBModels']['SpnIds'] = data['RBModels'].get('SpnIds',{})
1094610948
rbType = data['testRBObj']['rbType']
1094710949
rbName = rbObj['RBname']

0 commit comments

Comments
 (0)