Skip to content

Commit a741546

Browse files
committed
fixes to spin RBs
1 parent 2849d09 commit a741546

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

GSASII/GSASIIconstrGUI.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3492,7 +3492,7 @@ def OnSymSel(event):
34923492
bodSizer.Add(G2G.ValidatedTxtCtrl(SpinRBDisplay,data['Spin'][spinID],'RBname'))
34933493
bodSizer.Add(wx.StaticText(SpinRBDisplay,label='Q'),0)
34943494
data['Spin'][spinID]['rbType'] = 'Q' #patch
3495-
symchoice = ['53m','m3m','-43m','6/mmm','-6m2','-3m','3m','32','4/mmm','-42m','mmm','2/m','-1','1']
3495+
symchoice = ['53m','m3m','-43m','6/mmm','-6m2','-3m','3m','32','3','4/mmm','-42m','mmm','2/m','2','m','-1','1']
34963496
data['Spin'][spinID]['RBsym'] = data['Spin'][spinID].get('RBsym','53m')
34973497
simsel = wx.ComboBox(SpinRBDisplay,choices=symchoice,value=data['Spin'][spinID]['RBsym'],
34983498
style=wx.CB_READONLY|wx.CB_DROPDOWN)

GSASII/GSASIIphsGUI.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14182,13 +14182,10 @@ def OnAddRB(event):
1418214182
if not rbType in data['RBModels']:
1418314183
data['RBModels'][rbType] = []
1418414184
if rbType == 'Spin': #convert items to lists of shells
14185-
for name in ['atColor','atType','Natoms','nSH','Radius','RBId','RBname','RBsym']:
14186-
# #patch
14187-
# if name == 'Radius' and name not in rbObj:
14188-
# item = rbObj['radius']
14189-
# else:
14185+
for name in ['atColor','atType','Natoms','nSH','RBId','RBname','RBsym']:
1419014186
item = rbObj[name]
14191-
rbObj[name] = [item,]
14187+
rbObj[name] = [rbObj[name],]
14188+
rbObj['Radius'] = [[1.0,False],]
1419214189
data['RBModels'][rbType].append(copy.deepcopy(rbObj))
1419314190
RBData[rbType][rbId]['useCount'] += 1
1419414191
del data['testRBObj']
@@ -14321,8 +14318,7 @@ def getSelectedAtoms():
1432114318
for i in dups:
1432214319
msg += i
1432314320
msg += ', '
14324-
wx.MessageBox(msg[:-2],caption='Duplicated Fixed Atoms',
14325-
style=wx.ICON_EXCLAMATION)
14321+
wx.MessageBox(msg[:-2],caption='Duplicated Fixed Atoms',style=wx.ICON_EXCLAMATION)
1432614322
return
1432714323
return selDict
1432814324

@@ -14457,7 +14453,7 @@ def OnSymRadioSet(event):
1445714453
def OnOrigSet(event):
1445814454
data['testRBObj']['rbObj']['Orig'][0] = data['Drawing']['viewPoint'][0]
1445914455
for i,item in enumerate(Xsizers):
14460-
item.SetValue(data['testRBObj']['rbObj']['Orig'][0][i])
14456+
item.ChangeValue(data['testRBObj']['rbObj']['Orig'][0][i])
1446114457
UpdateSytSym()
1446214458
UpdateTablePlot()
1446314459

0 commit comments

Comments
 (0)