Changeset 3669 for trunk


Ignore:
Timestamp:
Oct 11, 2018 10:13:29 AM (7 years ago)
Author:
vondreele
Message:

combine maximal & Landau filters as either one (not both - made no sense)
add k-SUBGROUPSMAG setup error checks (bad k-vectors, etc.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/GSASIIpwdGUI.py

    r3665 r3669  
    36333633        E,SGData = G2spc.SpcGroup(controls[13])
    36343634        testAtoms = ['',]+list(set([atom[1] for atom in controls[15]]))
    3635         kvec = ['0','0','0',' ',' ',' ',' ',' ',' ']
     3635        kvec = ['0','0','0',' ',' ',' ',' ',' ',' ',' ']
    36363636        Kx = [' ','0','1/2','-1/2','1/3','-1/3','2/3','1']
    36373637        Ky = [' ','0','1/2','1/3','2/3','1']
     
    36403640            prompts=[' kx1 as fr.',' ky1 as fr.',' kz1 as fr.',' kx2 as fr.',' ky2 as fr.',' kz2 as fr.', \
    36413641                     ' kx3 as fr.',' ky3 as fr.',' kz3 as fr.', \
    3642                      ' Use whole star',' Landau transition',' Only maximal subgroups','preserve axes', \
     3642                     ' Use whole star',' Filter by','preserve axes', \
    36433643                     'test for mag. atoms','all have moment','max unique'],
    3644             values=kvec+[False,False,False,True,'',False,100],
    3645             limits=[Kx[1:],Ky[1:],Kz[1:],Kx,Ky,Kz,Kx,Ky,Kz,[True,False],[True,False],[True,False],
     3644            values=kvec[:9]+[False,'',True,'',False,100],
     3645            limits=[Kx[1:],Ky[1:],Kz[1:],Kx,Ky,Kz,Kx,Ky,Kz,[True,False],['',' Landau transition',' Only maximal subgroups',],
    36463646                [True,False],testAtoms,[True,False],[1,100]],
    3647             formats=['choice','choice','choice','choice','choice','choice','choice','choice','choice','bool','bool',
    3648                     'bool','bool','choice','bool','%d',])
     3647            formats=['choice','choice','choice','choice','choice','choice','choice','choice','choice','bool','choice',
     3648                    'bool','choice','bool','%d',])
    36493649        if dlg.ShowModal() == wx.ID_OK:
    36503650            magcells = []
    36513651            newVals = dlg.GetValues()
    3652             kvec = newVals[:9]
     3652            kvec[:9] = newVals[:9]
     3653            nkvec = kvec.index(' ')
    36533654            star = newVals[9]
    3654             Landau = newVals[10]
    3655             maximal = newVals[11]
    3656             keepaxes = newVals[12]
    3657             atype = newVals[13]
    3658             allmom = newVals[14]
    3659             maxequiv = newVals[15]
     3655            filterby = newVals[10]
     3656            keepaxes = newVals[11]
     3657            atype = newVals[12]
     3658            allmom = newVals[13]
     3659            maxequiv = newVals[14]
     3660            if 'maximal' in filterby:
     3661                maximal = True
     3662                Landau = False
     3663            elif 'Landau' in filterby:
     3664                maximal = False
     3665                Landau = True
     3666            else:
     3667                maximal = False
     3668                Landau = False           
     3669            if nkvec not in [0,3,6,9]:
     3670                wx.MessageBox('Error: check your propagation vector(s)',
     3671                    caption='Bilbao k-SUBGROUPSMAG setup error',style=wx.ICON_EXCLAMATION)
     3672                return
     3673            if nkvec in [6,9] and Landau:
     3674                wx.MessageBox('Error, multi k-vectors & Landau not compatible',
     3675                    caption='Bilbao k-SUBGROUPSMAG setup error',style=wx.ICON_EXCLAMATION)
     3676                return
    36603677            magAtms = [atom for atom in controls[15] if atom[1] == atype]
    36613678            wx.BeginBusyCursor()
     
    36663683      doi: 10.1146/annurev-matsci-070214-021008''',caption='Bilbao k-SUBGROUPSMAG',style=wx.ICON_INFORMATION)
    36673684           
    3668             MAXMAGN = kMAG.GetNonStdSubgroupsmag(SGData,kvec,star,Landau,maximal)
     3685            MAXMAGN = kMAG.GetNonStdSubgroupsmag(SGData,kvec[:9],star,Landau,maximal)
    36693686            wx.EndBusyCursor()
    36703687            if MAXMAGN is None:
     
    36723689                return
    36733690            if not MAXMAGN:
    3674                 wx.MessageBox('No results from k-SUBGROUPSMAG, check your propagation vector(s)',
    3675                     caption='Bilbao k-SUBGROUPSMAG error',style=wx.ICON_EXCLAMATION)
     3691                if Landau:
     3692                    wx.MessageBox('No results from k-SUBGROUPSMAG, multi k-vectors & Landau not compatible',
     3693                        caption='Bilbao k-SUBGROUPSMAG error',style=wx.ICON_EXCLAMATION)
     3694                else:
     3695                    wx.MessageBox('No results from k-SUBGROUPSMAG, check your propagation vector(s)',
     3696                        caption='Bilbao k-SUBGROUPSMAG error',style=wx.ICON_EXCLAMATION)
    36763697                return
    3677             controls[14] = kvec
     3698            controls[14] = kvec[:9]
    36783699            for result in MAXMAGN:
    36793700                if result[0].strip().endswith("1'"):    #skip gray groups
Note: See TracChangeset for help on using the changeset viewer.