Changeset 3295 for trunk/GSASIIphsGUI.py
- Timestamp:
- Feb 22, 2018 11:01:07 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r3291 r3295 2499 2499 ci = colLabels.index('I/A') 2500 2500 ID = atomData[r][ci+8] 2501 SGData = generalData['SGData'] 2501 2502 if Atoms.GetColLabelValue(c) in ['x','y','z']: 2502 2503 ci = colLabels.index('x') … … 2506 2507 SScol = colLabels.index('site sym') 2507 2508 Mulcol = colLabels.index('mult') 2508 E,SGData = G2spc.SpcGroup(generalData['SGData']['SpGrp'])2509 2509 Sytsym,Mult = G2spc.SytSym(XYZ,SGData)[:2] 2510 2510 atomData[r][SScol] = Sytsym … … 2556 2556 ci = colLabels.index('I/A') 2557 2557 atomData[r][c] = atomData[r][c].replace(rbAtmDict.get(atomData[r][ci+8],''),'') 2558 elif Atoms.GetColLabelValue(c) in ['Mx','My','Mz']: 2559 value = atomData[r][c] 2560 cx = colLabels.index('x') 2561 SpnFlp = generalData['SGData']['SpnFlp'] 2562 SytSym,Mul,Nop,dupDir = G2spc.SytSym(atomData[r][cx:cx+3],SGData) 2563 CSI = G2spc.GetCSpqinel(SytSym,SpnFlp,dupDir) 2564 iM = CSI[0][c-colLabels.index('Mx')] 2565 for i in range(3): 2566 if iM == CSI[0][i]: 2567 atomData[r][i+colLabels.index('Mx')] = value*CSI[1][i] 2558 2568 if 'Atoms' in data['Drawing']: 2559 2569 ci = colLabels.index('I/A') … … 2720 2730 if not SGData['SGGray']: 2721 2731 CSI = G2spc.GetCSpqinel(SytSym,SpnFlp,dupDir) 2722 #print (SytSym,Nop,SpnFlp[Nop],CSI,dupDir)2732 print (SytSym,Nop,SpnFlp[Nop],CSI,dupDir) 2723 2733 for i in range(3): 2724 2734 ci = i+colM … … 2728 2738 Atoms.SetCellStyle(row,ci,WHITE,False) 2729 2739 Atoms.SetCellTextColour(row,ci,BLACK) 2730 2731 2740 if 'X' in rbExcl: 2732 2741 for c in range(0,colX+3): … … 2837 2846 generalData = data['General'] 2838 2847 atId = ran.randint(0,sys.maxsize) 2839 E,SGData = G2spc.SpcGroup(generalData['SGData']['SpGrp'])2848 SGData = generalData['SGData'] 2840 2849 Sytsym,Mult = G2spc.SytSym([x,y,z],SGData)[:2] 2841 2850 if generalData['Type'] == 'macromolecular': … … 3086 3095 atomData = data['Atoms'] 3087 3096 generalData = data['General'] 3088 E,SGData = G2spc.SpcGroup(generalData['SGData']['SpGrp'])3097 SGData = generalData['SGData'] 3089 3098 Sytsym,Mult = G2spc.SytSym([x,y,z],SGData)[:2] 3090 3099 atId = ran.randint(0,sys.maxsize) … … 3178 3187 atomData = data['Atoms'] 3179 3188 generalData = data['General'] 3189 ifMag = False 3180 3190 colLabels = [Atoms.GetColLabelValue(c) for c in range(Atoms.GetNumberCols())] 3181 3191 ci = colLabels.index('I/A') … … 3183 3193 if generalData['Type'] == 'magnetic': 3184 3194 choices += ['Mx','My','Mz',] 3195 ifMag = True 3185 3196 dlg = wx.SingleChoiceDialog(G2frame,'Select','Atom parameter',choices) 3186 3197 parm = '' … … 3191 3202 dlg.Destroy() 3192 3203 if parm in ['Type']: 3193 dlg = G2elemGUI.PickElement(G2frame )3204 dlg = G2elemGUI.PickElement(G2frame,ifMag=ifMag) 3194 3205 if dlg.ShowModal() == wx.ID_OK: 3195 3206 if dlg.Elem not in ['None']:
Note: See TracChangeset
for help on using the changeset viewer.