Changeset 3234


Ignore:
Timestamp:
Jan 19, 2018 12:11:54 PM (4 years ago)
Author:
vondreele
Message:

new G2spc.SSChoice routine finds all allowed super space group symbols for a given space group.
Installed to drive ss symbol choices. Simplifies SSpcGroup.
Fix python 3 bug in covariance plot routine

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r3231 r3234  
    18531853                SpGrp += " 1'"
    18541854            modSizer.Add(wx.StaticText(General,label=' Superspace group: %s '%SpGrp),0,WACV)
    1855             SSGptgp = generalData['SGData']['SGLatt']+generalData['SGData']['SGPtGrp']
    1856             SSChoice = G2spc.ptssdict.get(SSGptgp,[])
     1855            SSChoice = G2spc.SSChoice(generalData['SGData'])
    18571856            if generalData['SGData']['SGGray']:
    18581857                SSChoice = [item+'s' for item in SSChoice]
  • trunk/GSASIIplot.py

    r3231 r3234  
    42374237    Page.Choice = ['s: to change colors','p: to save covariance as text file']
    42384238    Page.keyPress = OnPlotKeyPress
    4239     G2frame.G2plotNB.status.SetFields(['',''])
     4239    G2frame.G2plotNB.status.SetStatusText('',0)
     4240    G2frame.G2plotNB.status.SetStatusText('',1)
    42404241    G2frame.G2plotNB.status.SetStatusWidths([150,-1])   #need to reset field widths here   
    42414242    acolor = mpl.cm.get_cmap(G2frame.VcovColor)
    42424243    Img = Plot.imshow(covArray,aspect='equal',cmap=acolor,interpolation='nearest',origin='lower',
    42434244        vmin=-1.,vmax=1.)
    4244     imgAx = Img.properties()['axes']
     4245    imgAx = Img.axes
    42454246    ytics = imgAx.get_yticks()
    42464247    ylabs = [varyList[int(i)] for i in ytics[:-1]]
  • trunk/GSASIIpwdGUI.py

    r3231 r3234  
    33303330    mainSizer.Add(littleSizer,0)
    33313331    if ssopt.get('Use',False):        #super lattice display
    3332         laueSS = {'2/m':['(a0g)','(a1/2g)','(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)'],
    3333                 'mmm':['(a00)','(a1/20)','(a01/2)','(a1/21/2)','(a10)','(a01)',
    3334                        '(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)','(1b0)','(0b1)',
    3335                        '(00g)','(1/20g)','(01/2g)','(1/21/2g)','(10g)','(01g)']}
    3336                
    3337         laueTS = {'2/m':['','s','s0','0s','ss'],
    3338                   'mmm':['000','s00','0s0','00s','ss0','s0s','0ss','q00','0q0','00q','0qq','q0q','qq0'],
    3339                   }
    33403332        indChoice = ['1','2','3','4',]
    33413333        SpSg = controls[13]
    33423334        SGData = G2spc.SpcGroup(SpSg)[1]
    3343         laue = SGData['SGLaue']
    3344         if laue in ['mmm']:
    3345             SSChoice = []
    3346             for ax in laueSS[laue]:
    3347                 for sx in laueTS[laue]:
    3348                     SSChoice.append(ax+sx)               
    3349         else:
    3350             latt = SGData['SGLatt']+SGData['SGPtGrp']
    3351             SSChoice = G2spc.ptssdict.get(latt,['',])
    3352 #        SSGptgp = SGData['SGLatt']+SGData['SGPtGrp']
    3353 #        SSChoice = G2spc.ptssdict.get(SSGptgp,[])
    3354         ssChoice = []
    3355         for item in SSChoice:
    3356             E,SSG = G2spc.SSpcGroup(SGData,item)
    3357             if SSG: ssChoice.append(item)
     3335        ssChoice = G2spc.SSChoice(SGData)
    33583336        if ssopt['ssSymb'] not in ssChoice:
    33593337            ssopt['ssSymb'] = ssChoice[0]
  • trunk/GSASIIspc.py

    r3227 r3234  
    10811081    """
    10821082   
    1083     def checkModSym():
    1084         '''
    1085         Checks to see if proposed modulation form is allowed for Laue group
    1086         '''
    1087         if LaueId in [0,] and LaueModId in [0,]:
    1088             return True
    1089         elif LaueId in [1,]:
    1090             try:
    1091                 if modsym.index('1/2') != ['A','B','C'].index(SGData['SGLatt']):
    1092                     return False
    1093                 if 'I'.index(SGData['SGLatt']) and modsym.count('1/2') not in [0,2]:
    1094                     return False
    1095             except ValueError:
    1096                 pass
    1097             if SGData['SGUniq'] == 'a' and LaueModId in [5,6,7,8,9,10,]:
    1098                 return True
    1099             elif SGData['SGUniq'] == 'b' and LaueModId in [3,4,13,14,15,16,]:
    1100                 return True
    1101             elif SGData['SGUniq'] == 'c' and LaueModId in [1,2,19,20,21,22,]:
    1102                 return True
    1103         elif LaueId in [2,] and LaueModId in [i+7 for i in range(18)]:
    1104             try:
    1105                 if modsym.index('1/2') != ['A','B','C'].index(SGData['SGLatt']):
    1106                     return False
    1107                 if SGData['SGLatt'] in ['I','F',] and modsym.index('1/2'):
    1108                     return False
    1109             except ValueError:
    1110                 pass
    1111             return True
    1112         elif LaueId in [3,4,] and LaueModId in [19,22,]:
    1113             try:
    1114                 if SGData['SGLatt'] == 'I' and modsym.count('1/2'):
    1115                     return False
    1116             except ValueError:
    1117                 pass
    1118             return True
    1119         elif LaueId in [7,8,9,] and LaueModId in [19,25,]:
    1120             if (SGData['SGLatt'] == 'R' or SGData['SGPtGrp'] in ['3m1','-3m1']) and modsym.count('1/3'):
    1121                 return False
    1122             return True
    1123         elif LaueId in [10,11,] and LaueModId in [19,]:
    1124             return True
    1125         return False
     1083#    def checkModSym():
     1084#        '''
     1085#        Checks to see if proposed modulation form is allowed for Laue group
     1086#        '''
     1087#        if LaueId in [0,] and LaueModId in [0,]:
     1088#            return True
     1089#        elif LaueId in [1,]:
     1090#            try:
     1091#                if modsym.index('1/2') != ['A','B','C'].index(SGData['SGLatt']):
     1092#                    return False
     1093#                if 'I'.index(SGData['SGLatt']) and modsym.count('1/2') not in [0,2]:
     1094#                    return False
     1095#            except ValueError:
     1096#                pass
     1097#            if SGData['SGUniq'] == 'a' and LaueModId in [5,6,7,8,9,10,]:
     1098#                return True
     1099#            elif SGData['SGUniq'] == 'b' and LaueModId in [3,4,13,14,15,16,]:
     1100#                return True
     1101#            elif SGData['SGUniq'] == 'c' and LaueModId in [1,2,19,20,21,22,]:
     1102#                return True
     1103#        elif LaueId in [2,] and LaueModId in [i+7 for i in range(18)]:
     1104#            try:
     1105#                if modsym.index('1/2') != ['A','B','C'].index(SGData['SGLatt']):
     1106#                    return False
     1107#                if SGData['SGLatt'] in ['I','F',] and modsym.index('1/2'):
     1108#                    return False
     1109#            except ValueError:
     1110#                pass
     1111#            return True
     1112#        elif LaueId in [3,4,] and LaueModId in [19,22,]:
     1113#            try:
     1114#                if SGData['SGLatt'] == 'I' and modsym.count('1/2'):
     1115#                    return False
     1116#            except ValueError:
     1117#                pass
     1118#            return True
     1119#        elif LaueId in [7,8,9,] and LaueModId in [19,25,]:
     1120#            if (SGData['SGLatt'] == 'R' or SGData['SGPtGrp'] in ['3m1','-3m1']) and modsym.count('1/3'):
     1121#                return False
     1122#            return True
     1123#        elif LaueId in [10,11,] and LaueModId in [19,]:
     1124#            return True
     1125#        return False
    11261126       
    11271127    def fixMonoOrtho():
     
    14091409        return gensym
    14101410                           
    1411     LaueModList = [
    1412         'abg','ab0','ab1/2','a0g','a1/2g',  '0bg','1/2bg','a00','a01/2','a1/20',
    1413         'a1/21/2','a01','a10','0b0','0b1/2', '1/2b0','1/2b1/2','0b1','1b0','00g',
    1414         '01/2g','1/20g','1/21/2g','01g','10g', '1/31/3g']
    1415     LaueList = ['-1','2/m','mmm','4/m','4/mmm','3R','3mR','3','3m1','31m','6/m','6/mmm','m3','m3m']
    1416     GenSymList = ['','s','0s','s0', '00s','0s0','s00','s0s','ss0','0ss','q00','0q0','00q','qq0','q0q', '0qq',
    1417         'q','qqs','s0s0','00ss','s00s','t','t00','t0','h','h00','000s','0000s']
     1411#    LaueModList = [
     1412#        'abg','ab0','ab1/2','a0g','a1/2g',  '0bg','1/2bg','a00','a01/2','a1/20',
     1413#        'a1/21/2','a01','a10','0b0','0b1/2', '1/2b0','1/2b1/2','0b1','1b0','00g',
     1414#        '01/2g','1/20g','1/21/2g','01g','10g', '1/31/3g']
     1415#    LaueList = ['-1','2/m','mmm','4/m','4/mmm','3R','3mR','3','3m1','31m','6/m','6/mmm','m3','m3m']
     1416#    GenSymList = ['','s','0s','s0', '00s','0s0','s00','s0s','ss0','0ss','q00','0q0','00q','qq0','q0q', '0qq',
     1417#        'q','qqs','s0s0','00ss','s00s','t','t00','t0','h','h00','000s','0000s']
    14181418    Fracs = {'1/2':0.5,'1/3':1./3,'1':1.0,'0':0.,'s':.5,'t':1./3,'q':.25,'h':1./6,'a':0.,'b':0.,'g':0.}
    1419     LaueId = LaueList.index(SGData['SGLaue'])
     1419#    LaueId = LaueList.index(SGData['SGLaue'])
    14201420    if SGData['SGLaue'] in ['m3','m3m']:
    14211421        return '(3+1) superlattices not defined for cubic space groups',None
     
    14261426    except ValueError:
    14271427        return 'Error in superspace symbol '+SSymbol,None
    1428     if ''.join(gensym) not in GenSymList:
    1429         if SGData['SGGray'] and ''.join(gensym[:-1]) not in GenSymList:
    1430             return 'unknown generator symbol '+''.join(gensym),None
    1431     try:
    1432         LaueModId = LaueModList.index(''.join(modsym))
    1433     except ValueError:
    1434         return 'Unknown modulation symbol '+''.join(modsym),None
    1435     if not checkModSym():
    1436         return 'Modulation '+''.join(modsym)+' not consistent with space group '+SGData['SpGrp'],None
     1428#    if ''.join(gensym) not in GenSymList:
     1429#        if SGData['SGGray'] and ''.join(gensym[:-1]) not in GenSymList:
     1430#            return 'unknown generator symbol '+''.join(gensym),None
     1431#    try:
     1432#        LaueModId = LaueModList.index(''.join(modsym))
     1433#    except ValueError:
     1434#        return 'Unknown modulation symbol '+''.join(modsym),None
     1435#    if not checkModSym():
     1436#        return 'Modulation '+''.join(modsym)+' not consistent with space group '+SGData['SpGrp'],None
    14371437    modQ = [Fracs[mod] for mod in modsym]
    14381438    SSGKl = SGData['SSGKl'][:]
     
    14831483    else:
    14841484        return Result+'\nOperator conflict - incorrect superspace symbol',None
     1485   
     1486def SSChoice(SGData):
     1487    '''
     1488    Gets the unique set of possible super space groups for a given space group
     1489    '''
     1490    laueSS = {'-1':['(abg)',],
     1491            '2/m':['(a0g)','(a1/2g)','(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)'],
     1492            'mmm':['(00g)','(1/20g)','(01/2g)','(1/21/2g)','(10g)','(01g)',
     1493                   '(a00)','(a1/20)','(a01/2)','(a1/21/2)','(a10)','(a01)',
     1494                   '(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)','(1b0)','(0b1)',],
     1495            '4/m':['(00g)','(1/21/2g)'],
     1496            '4/mmm':['(00g)','(1/21/2g)'],
     1497            '3':['(00g)','(1/31/3g)'],
     1498            '3m1':['(00g)'],
     1499            '31m':['(00g)','(1/31/3g)'],
     1500            '6/m':['(00g)',],
     1501            '6/mmm':['(00g)',]}
     1502           
     1503    laueTS = {'-1':['',],
     1504            '2/m':['','s','s0','0s','ss'],
     1505            'mmm':['000','s00','0s0','00s','ss0','s0s','0ss','q00','0q0','00q','0qq','q0q','qq0'],
     1506            '4/m':['','q','s','s0',],
     1507            '4/mmm':['','q00','s00','ss0','0ss','s0s','qq0','qqs','0q0','s0s0','00ss','s00s'],
     1508            '3':['','t'],
     1509            '3m1':['','t0','0s','t00','0s0'],
     1510            '31m':['','t00','0ss'],
     1511            '6/m':['','h','t','s','s0'],
     1512            '6/mmm':['h00','t00','s00','ss0','0ss','s0s','s0s0','00ss','s00s']}
     1513    laue = SGData['SGLaue']
     1514    SSChoice = []
     1515    for ax in laueSS[laue]:
     1516        for sx in laueTS[laue]:
     1517            SSChoice.append(ax+sx)               
     1518    ssChoice = []
     1519    ssHash = []
     1520    for item in SSChoice:
     1521        E,SSG = SSpcGroup(SGData,item)
     1522        if SSG:
     1523            sshash = hash(str(SSGPrint(SGData,SSG)[1]))
     1524            if sshash not in ssHash:
     1525                ssHash.append(sshash)
     1526                ssChoice.append(item)
     1527    return ssChoice
     1528   
    14851529
    14861530def splitSSsym(SSymbol):
     
    31143158        'CMME':'C m m a','AEMM':'A b m m','BMEM':'B m c m',
    31153159        'CCCE':'C c c a','AEAA':'A b a a','BBEB':'B b c b'}
    3116 ptssdict = {}
    3117 '''A dictionary of superspace group symbols allowed for each point group
    3118 (except cubics). Monoclinics are all b-unique setting.
    3119 '''
    3120 ptssdict = {
    3121 #1,2
    3122     'P1':['(abg)',],'C1':['(abg)',],
    3123 #3-15
    3124     'P2':['(a0g)','(a1/2g)','(0b0)','(0b0)s','(1/2b0)','(0b1/2)',],
    3125     'C2':['(a0g)','(0b0)','(0b0)s','(0b1/2)',],
    3126     'A2':['(a0g)','(0b0)','(0b0)s','(1/2b0)',],
    3127     'Pm':['(a0g)','(a0g)s','(a1/2g)','(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)',],
    3128     'Cm':['(a0g)','(a0g)s','(0b0)','(0b1/2)',],
    3129     'Am':['(a0g)','(a0g)s','(0b0)','(1/2b0)',],
    3130     'P2/m':['(a0g)','(a0g)0s','(a1/2g)','(0b0)','(0b0)s0','(1/2b0)','(0b1/2)','(1/2b1/2)',],
    3131     'C2/m':['(a0g)','(a0g)0s','(0b0)','(0b0)s0','(0b1/2)',],
    3132     'A2/m':['(a0g)','(a0g)s0','(0b0)','(0b0)0s','(1/2b0)',],
    3133 #16-24
    3134     'P222':['(00g)','(00g)00s','(01/2g)','(1/20g)','(1/21/2g)',
    3135             '(a00)','(a00)s00','(a01/2)','(a1/20)','(a1/21/2)',
    3136             '(0b0)','(0b0)0s0','(1/2b0)','(0b1/2)','(1/2b1/2)',],
    3137     'C222':['(00g)','(00g)00s','(10g)','(10g)00s','(01g)','(01g)00s',
    3138             '(a00)','(a00)s00','(a01/2)',
    3139             '(0b0)','(0b0)0s0','(0b1/2)',],
    3140     'A222':['(a00)','(a00)s00','(a10)','(a10)s00','(a01)','(a01)s00',
    3141             '(0b0)','(0b0)0s0','(1/2b0)',
    3142             '(00g)','(00g)00s','(1/20g)',],
    3143     'B222':['(0b0)','(0b0)0s0','(1b0)','(1b0)0s0','(0b1)','(0b1)0s0',
    3144             '(00g)','(00g)00s','(01/2g)',
    3145             '(a00)','(a00)s00','(a1/20)',],
    3146     'F222':['(00g)','(00g)00s','(10g)','(01g)',
    3147             '(a00)','(a00)s00','(a10)','(a01)',
    3148             '(0b0)','(0b0)0s0','(1b0)','(0b1)',],
    3149     'I222':['(00g)','(00g)00s',
    3150             '(a00)','(a00)s00',
    3151             '(0b0)','(0b0)0s0',],
    3152 #25-46
    3153     'Pmm2':['(00g)','(00g)s0s','(00g)0ss','(00g)ss0','(01/2g)','(01/2g)s0s','(1/20g)','(1/20g)0ss','(1/21/2g)','(1/2b1/2)00q',
    3154             '(a00)','(a00)0s0','(a1/20)','(a01/2)','(a01/2)0s0','(a1/21/2)','(1/21/2g)qq0',
    3155             '(0b0)','(0b0)s00','(0b1/2)','(0b1/2)s00','(1/2b0)','(1/2b1/2)','(1/2b1/2)q00',],       
    3156     'P2mm':['(a00)','(a00)ss0','(a00)s0s','(a00)0ss','(a01/2)','(a01/2)ss0','(a1/20)','(a1/20)s0s','(a1/21/2)','(1/21/2g)q00',
    3157             '(0b0)','(0b0)00s','(1/2b0)','(0b1/2)','(0b1/2)00s','(1/2b1/2)','(a1/21/2)0qq',
    3158             '(00g)','(00g)0s0','(01/2g)','(01/2g)0s0','(1/20g)','(1/21/2g)','(1/21/2g)0q0',],
    3159     'Pm2m':['(0b0)','(0b0)ss0','(0b0)0ss','(0b0)s0s','(0b1/2)','(0b1/2)ss0','(1/2b0)','(1/2b0)0ss','(1/2b1/2)','(a1/21/2)0q0',
    3160             '(00g)','(00g)s00','(1/20g)','(01/2g)','(01/2g)s00','(1/21/2g)','(1/2b1/2)q0q',
    3161             '(a00)','(a00)0s0','(a01/2)','(a01/2)0s0','(a1/20)','(a1/21/2)','(a1/21/2)00q',],
    3162     'Cmm2':['(00g)','(00g)s0s','(00g)ss0',
    3163             '(10g)','(10g)s0s','(10g)ss0',
    3164             '(a00)','(a00)0s0','(a01/2)','(a01/2)0s0',
    3165             '(0b0)','(0b0)s00','(0b1/2)','(0b1/2)s00',],
    3166     'C2mm':['(0b0)','(0b0)00s','(0b1/2)',],
    3167     'Cm2m':['(0b0)','(0b0)0ss','(0b0)s0s','(0b0)ss0','(0b1/2)','(0b1/2)ss0',],
    3168     'A2mm':['(a00)','(a00)ss0','(a00)0ss','(a10)','(a10)ss0','(a10)0ss',
    3169             '(0b0)','(0b0)00s','(1/2b0)','(1/2b0)00s',
    3170             '(00g)','(00g)0s0','(1/20g)','(1/20g)0s0',],
    3171     'Am2m':['(00g)','(00g)s00','(1/20g)',],
    3172     'Amm2':['(00g)','(00g)s0s','(00g)ss0','(00g)0ss','(1/20g)','(1/20g)0ss',],
    3173     'Bm2m':['(0b0)','(0b0)0ss','(0b0)s0s','(0b1)','(0b1)0ss','(0b1)s0s',
    3174             '(a00)','(a00)00s','(a1/20)','(a1/20)00s',
    3175             '(00g)','(00g)s00','(01/2g)','(01/2g)s00',],
    3176     'B2mm':['(a00)','(a00)0ss','(a00)s0s','(a00)ss0','(a1/20)','(a1/20)s0s',],
    3177     'Bmm2':['(a00)','(a00)0s0','(a1/20)',],
    3178     'Fmm2':['(00g)','(00g)s0s','(00g)0ss','(00g)ss0','(10g)','(10g)ss0','(10g)s0s','(01g)','(01g)ss0','(01g)0ss',
    3179             '(a00)','(a00)0s0','(a01)','(a01)0s0',
    3180             '(0b0)','(0b0)s00','(0b1)','(0b1)s00',],       
    3181     'F2mm':['(a00)','(a00)ss0','(a00)s0s','(a00)0ss','(a10)','(a10)0ss','(a10)ss0','(a01)','(a01)0ss','(a01)s0s',
    3182             '(0b0)','(0b0)00s','(1b0)','(1b0)00s',
    3183             '(00g)','(00g)0s0','(10g)','(10g)0s0',],
    3184     'Fm2m':['(0b0)','(0b0)0ss','(0b0)ss0','(0b0)s0s','(0b1)','(0b1)s0s','(0b1)0ss','(1b0)','(1b0)s0s','(1b0)ss0',
    3185             '(00g)','(00g)s00','(01g)','(01g)s00',
    3186             '(a00)','(a00)00s','(a10)','(a10)00s',],       
    3187     'Imm2':['(00g)','(00g)ss0','(00g)s0s','(00g)0ss','(a00)','(a00)0s0','(0b0)','(0b0)s00',],
    3188     'I2mm':['(a00)','(00g)0ss','(00g)ss0','(00g)s0s','(0b0)','(0b0)00s','(00g)','(00g)0s0',],
    3189     'Im2m':['(0b0)','(0b0)s0s','(0b0)0ss','(0b0)ss0','(00g)','(00g)s00','(a00)','(a00)00s',],
    3190 #47-74
    3191     'Pmmm':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(01/2g)','(01/2g)s00','(01/2g)0s0','(01/2g)ss0',
    3192             '(1/20g)','(1/20g)0s0','(1/20g)s00','(1/20g)ss0','(1/21/2g)',
    3193             '(a00)','(a00)0s0','(a00)00s','(a00)0ss','(a01/2)','(a01/2)0s0','(a01/2)00s','(a01/2)0ss',
    3194             '(a1/20)','(a1/20)00s','(a1/20)0ss','(a1/20)0s0','(a1/21/2)',
    3195             '(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s','(1/2b0)','(1/2b0)00s','(1/2b0)s00','(1/2b0)s0s',
    3196             '(0b1/2)','(0b1/2)s00','(0b1/2)00s','(0b1/2)s0s','(1/2b1/2)',],
    3197     'Cmmm':['(00g)','(00g)s00','(00g)ss0','(10g)','(10g)s00','(10g)ss0','(01g)','(01g)0s0','(01g)ss0',
    3198             '(a00)','(a00)00s','(a00)0ss','(a00)0s0','(a01/2)','(a01/2)0s0',
    3199             '(0b0)','(0b0)00s','(0b0)s0s','(0b0)s00','(0b1/2)','(0b1/2)s00',],
    3200     'Ammm':['(a00)','(a00)0s0','(a00)0ss','(a10)','(a10)0s0','(a10)0ss','(a01)','(a01)0s0','(a01)0ss',
    3201             '(0b0)','(0b0)00s','(0b0)s0s','(0b0)s00','(0b1/2)','(0b1/2)s00',
    3202             '(00g)','(00g)s00','(00g)ss0','(00g)0s0','(1/20g)','(1/20g)0s0',],
    3203     'Bmmm':['(0b0)','(0b0)00s','(0b0)s0s','(0b1)','(0b1)00s','(0b1)s0s','(1b0)','(1b0)00s','(1b0)s0s',
    3204             '(a00)','(a00)0s0','(a00)0ss','(a00)00s','(a1/20)','(a1/20)00s',
    3205             '(00g)','(00g)s00','(00g)ss0','(00g)0s0','(1/20g)','(1/20g)0s0',],
    3206     'Fmmm':['(00g)','(00g)s00','(00g)ss0','(10g)','(10g)s00','(10g)0s0','(10g)ss0','(01g)','(01g)s00','(01g)0s0','(01g)ss0',
    3207             '(a00)','(a00)0s0','(a00)0ss','(a10)','(a10)0s0','(a10)00s','(a10)0ss','(a01)','(a01)0s0','(a01)00s','(a01)0ss',
    3208             '(0b0)','(0b0)s00','(0b0)s0s','(0b1)','(0b1)s00','(0b1)00s','(0b1)s0s','(1b0)','(1b0)s00','(1b0)00s','(1b0)s0s'],
    3209 #75-82
    3210     'P4':['(00g)','(00g)q','(00g)s','(1/21/2g)','(1/21/2g)q',],
    3211     'I4':['(00g)','(00g)q','(00g)s',],
    3212     'P-4':['(00g)','(1/21/2g)',],
    3213     'I-4':['(00g)',],
    3214 #83-89
    3215     'P4/m':['(00g)','(00g)s0','(1/21/2g)',],
    3216     'I4/m':['(00g)','(00g)s0',],
    3217 #90-98
    3218     'P422':['(00g)','(00g)q00','(00g)s00','(1/21/2g)','(1/21/2g)q00',],
    3219     'I422':['(00g)','(00g)q00','(00g)s00',],
    3220 #99-122
    3221     'P4mm':['(00g)','(00g)ss0','(00g)0ss','(00g)s0s','(1/21/2g)','(1/21/2g)0ss','(1/21/2g)qq0','(1/21/2g)qqs',],
    3222     'I4mm':['(00g)','(00g)ss0','(00g)0ss','(00g)s0s',],
    3223     'P-42m':['(00g)','(00g)0ss','(1/21/2g)','(1/21/2g)0ss',],
    3224     'P-4m2':['(00g)','(00g)0s0','(1/21/2g)','(1/21/2g)0q0',],
    3225     'I-4m2':['(00g)','(00g)0s0',],
    3226     'I-42m':['(00g)','(00g)0ss',],
    3227 #123-142   
    3228     'P4/mmm':['(00g)','(00g)s0s0','(00g)00ss','(00g)s00s',
    3229         '(1/21/2g)','(1/21/2g)s0s0','(1/21/2g)00ss','(1/21/2g)s00s',],
    3230     'I4/mmm':['(00g)','(00g)s0s0','(00g)00ss','(00g)s00s',],
    3231 #143-148
    3232     'P 3':['(00g)','(00g)t','(1/31/3g)',],
    3233     'R3':['(00g)','(00g)t',],
    3234     'P-3':['(00g)','(1/31/3g)',],
    3235     'R-3':['(00g)',],
    3236 #149-161
    3237     'P312':['(00g)','(00g)t00','(1/31/3g)',],
    3238     'P321':['(00g)','(00g)t00',],
    3239     'R32':['(00g)','(00g)t0',],
    3240     'P3m1':['(00g)','(00g)0s0',],
    3241     'P31m':['(00g)','(00g)00s','(1/31/3g)','(1/31/3g)00s',],
    3242     'R3m':['(00g)','(00g)0s',],
    3243 #162-167
    3244     'P-31m':['(00g)','(00g)00s','(1/31/3g)','(1/31/3g)00s',],
    3245     'P-3m1':['(00g)','(00g)0s0',],
    3246     'R-3m':['(00g)','(00g)0s',],
    3247 #168-176
    3248     'P6':['(00g)','(00g)h','(00g)t','(00g)s',],
    3249     'P-6':['(00g)',],
    3250     'P6/m':['(00g)','(00g)s0',],
    3251 #177-194
    3252     'P622':['(00g)','(00g)h00','(00g)t00','(00g)s00',],
    3253     'P6mm':['(00g)','(00g)ss0','(00g)0ss','(00g)s0s',],
    3254     'P-6m2':['(00g)','(00g)0s0',],
    3255     'P-62m':['(00g)','(00g)00s',],
    3256     'P6/mmm':['(00g)','(00g)s0s0','(00g)00ss','(00g)s00s',],
    3257         }
    3258 
    32593160
    32603161#'A few non-standard space groups for test use'
  • trunk/testSSymbols.py

    r3227 r3234  
    5353       
    5454        def OnExhaustive(event):
    55             laue = Data['SGData']['SGLaue']
    56             good = []
    57             if laue in ['2/m','mmm']:
    58                 SSList = []
    59                 for ax in laueSS[laue]:
    60                     for sx in laueTS[laue]:
    61                         SSList.append(ax+sx)               
    62             else:
    63                 latt = Data['SGData']['SGLatt']+Data['SGData']['SGPtGrp']
    64                 SSList = G2spc.ptssdict.get(latt,['',])
    65             for SSymbol in SSList:
    66                 E,SSGData = G2spc.SSpcGroup(Data['SGData'],SSymbol)
    67                 if SSGData:
    68                     good.append(SSymbol)
    69                     text,table = G2spc.SSGPrint(Data['SGData'],SSGData)
    70                     Data['SSGData'] = SSGData
    71                     Data['SuperSg'] = SSymbol
    72                     msg = 'Superspace Group Information'
    73 #                    G2G.SGMessageBox(self,msg,text,table).Show()
    74 #                else:
    75 #                    msg = 'Superspace Group Error for'+SSymbol
    76 #                    Style = wx.ICON_EXCLAMATION
    77 #                    Text = '\n'+E
    78 #                    wx.MessageBox(Text,caption=msg,style=Style)
    79             print(good)           
     55            SSList = G2spc.SSChoice(Data['SGData'])
     56            print(SSList)           
    8057       
    8158        def OnSpaceGroup(event):
     
    10380                msg = 'Space Group Information'
    10481                G2G.SGMessageBox(self,msg,text,table).Show()
    105             latt = Data['SGData']['SGLatt']+Data['SGData']['SGPtGrp']
    106             SSChoice = G2spc.ptssdict.get(latt,['',])
     82            SSChoice = G2spc.SSChoice(Data['SGData'])
    10783            Data['SuperSg'] = SSChoice[0]
    10884            self.UpdateData(Data)
     
    143119        mainSizer.Add(SGTxt,0,WACV)
    144120        mainSizer.Add(wx.StaticText(self.testSSPanel,label=' Superspace group: '+Data['SGData']['SpGrp']),0,WACV)
    145         latt = Data['SGData']['SGLatt']+Data['SGData']['SGPtGrp']
    146         SSChoice = G2spc.ptssdict.get(latt,['',])
    147         ssChoice = []
    148         for item in SSChoice:
    149             E,SSG = G2spc.SSpcGroup(SGData,item)
    150             if SSG: ssChoice.append(item)
     121        ssChoice = G2spc.SSChoice(Data['SGData'])
    151122        if ssChoice:
    152123            superGp = wx.ComboBox(self.testSSPanel,value=Data['SuperSg'],choices=ssChoice,style=wx.CB_DROPDOWN)   #wx.CB_READONLY|
Note: See TracChangeset for help on using the changeset viewer.