Changeset 3616


Ignore:
Timestamp:
Sep 20, 2018 11:24:54 AM (3 years ago)
Author:
vondreele
Message:

change phase names etc. for magnetic structures to have the k-SUBgroupsMag no.
show kvector used in results table

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r3613 r3616  
    24702470        for mid,magdata in enumerate(magData):
    24712471            if magdata['Keep']:
     2472                magdata['No.'] = mid
    24722473                trans = G2spc.Trans2Text(magdata['Trans'])
    24732474                vec = G2spc.Latt2text([magdata['Uvec'],])
    24742475                magKeep.append(magdata)
    24752476                magIds.append(mid)
    2476                 magchoices.append('%s; (%s) + (%s)'%(magdata['Name'],trans,vec))
     2477                magchoices.append('(%d) %s; (%s) + (%s)'%(mid,magdata['Name'],trans,vec))
    24772478        if not len(magKeep):
    24782479            G2frame.ErrorDialog('Magnetic phase selection error','No magnetic phases found; be sure to "Keep" some')
     
    24842485            magchoice = magKeep[sel]
    24852486            magId = magIds[sel]
    2486             phaseName = '%s mag_%d'%(data['General']['Name'],sel)
     2487            phaseName = '%s mag_%d'%(data['General']['Name'],magchoice['No.'])
    24872488            newPhase = copy.deepcopy(data)
    24882489            newPhase['ranId'] = ran.randint(0,sys.maxsize),
  • trunk/GSASIIpwdGUI.py

    r3608 r3616  
    31233123    def LoadUnitCell(event):
    31243124        controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(UnitCellsId)
     3125        controls = controls[:14]+[['0','0','0',' ',' ',' '],[],]
     3126        data = controls,bravais,cells,dminx,ssopt,magcells
     3127        G2frame.GPXtree.SetItemPyData(UnitCellsId,data)
    31253128        pId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root, 'Phases')
    31263129        if not pId: return
     
    31563159                if len(G2elem.GetMFtable([atom[ct],],[2.0,])):
    31573160                    testAtoms.append(atom[:cx+3])
    3158             controls.append(testAtoms)
     3161            controls[15] = testAtoms
    31593162            G2frame.dataWindow.RunSubGroupsMag.Enable(True)
    31603163        G2frame.dataWindow.RefineCell.Enable(True)
     
    35013504        controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List'))
    35023505        E,SGData = G2spc.SpcGroup(controls[13])
    3503         if len(controls) > 14:
    3504             testAtoms = ['',]+list(set([atom[1] for atom in controls[14]]))
    3505         kvec = ['0','0','0',' ',' ',' ']
    3506         Kx = [' ','0','1/2','-1/2','1/3','-1/3','2/3','1']
    3507         Ky = [' ','0','1/2','1/3','2/3','1']
    3508         Kz = [' ','0','1/2','3/2','1/3','2/3','1']
     3506        testAtoms = ['',]+list(set([atom[1] for atom in controls[15]]))
     3507        kvec = ['0','0','0','0','0','0']
     3508        Kx = ['0','1/2','-1/2','1/3','-1/3','2/3','1']
     3509        Ky = ['0','1/2','1/3','2/3','1']
     3510        Kz = ['0','1/2','3/2','1/3','2/3','1']
    35093511        dlg = G2G.MultiDataDialog(G2frame,title='k-SUBGROUPSMAG options',
    35103512            prompts=[' kx1 as fr.',' ky1 as fr.',' kz1 as fr.',' kx2 as fr.',' ky2 as fr.',' kz2 as fr.',\
     
    35243526            atype = newVals[10]
    35253527            allmom = newVals[11]
    3526             magAtms = [atom for atom in controls[14] if atom[1] == atype]
     3528            magAtms = [atom for atom in controls[15] if atom[1] == atype]
    35273529            wx.BeginBusyCursor()
    35283530            wx.MessageBox(''' For use of k-SUBGROUPSMAG, please cite:
     
    35413543                    caption='Bilbao k-SUBGROUPSMAG error',style=wx.ICON_EXCLAMATION)
    35423544                return
     3545            controls[14] = kvec
    35433546            for result in MAXMAGN:
    35443547                if result[0].strip().endswith("1'"):    #skip gray groups
     
    38603863        if 'N' in Inst['Type'][0]:
    38613864            G2frame.dataWindow.RunSubGroupsMag.Enable(True)
    3862         mainSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label='\n Magnetic cells from Bilbao k-SUBGROUPSMAG:'),0,WACV)
     3865       
     3866        Label = '\n Magnetic cells from Bilbao k-SUBGROUPSMAG for %s; kvec1: (%s), kvec2: (%s):'%(SGData['SpGrp'],''.join(controls[14][:3]),''.join(controls[14][3:]))
     3867        mainSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=Label),0,WACV)
    38633868        rowLabels = []
     3869        for i in range(len(magcells)): rowLabels.append(str(i+1))
    38643870        colLabels = ['Space Gp.','Try','Keep','Trans','Vec','a','b','c','alpha','beta','gamma','Volume']
    38653871        Types = [wg.GRID_VALUE_STRING,wg.GRID_VALUE_BOOL,wg.GRID_VALUE_BOOL,wg.GRID_VALUE_STRING,wg.GRID_VALUE_STRING,]+ \
     
    38673873        table = []
    38683874        for phase in magcells:
    3869             rowLabels.append('')
    38703875            cell  = list(phase['Cell'])
    38713876            trans = G2spc.Trans2Text(phase['Trans'])
     
    38773882        magDisplay.SetTable(MagCellsTable, True)
    38783883        magDisplay.Bind(wg.EVT_GRID_CELL_LEFT_CLICK,RefreshMagCellsGrid)
    3879         magDisplay.SetRowLabelSize(0)
    38803884        magDisplay.AutoSizeColumns(False)
    38813885        for r in range(magDisplay.GetNumberRows()):
  • trunk/GSASIIspc.py

    r3591 r3616  
    11181118
    11191119def getlattSym(Trans):
    1120     Fives = {'ababc':'abc','bcbca':'cba','acacb':'acb'}
     1120    Fives = {'ababc':'abc','bcbca':'cba','acacb':'acb','cabab':'cab'}
    11211121    transText = Trans2Text(Trans)
    11221122    lattSym = ''
Note: See TracChangeset for help on using the changeset viewer.