Changeset 1546


Ignore:
Timestamp:
Oct 27, 2014 8:03:47 PM (7 years ago)
Author:
vondreele
Message:

super symm for trigonal/rhom done

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIspc.py

    r1539 r1546  
    224224        else:
    225225            return '3',[1,]
    226     elif SGData['SGLaue'] == '3mR' and 'R' in Flds[0]:
     226    elif SGData['SGLaue'] == '3mR' or 'R' in Flds[0]:
    227227        if '2' in Flds[2]:
    228228            return '32',[1,-1]
     
    496496            return True
    497497        elif LaueId in [7,8,9,] and LaueModId in [19,25,]:
    498             try:
    499                 if SGData['SGLatt'] == 'R' and modsym.index('1/3'):
    500                     return False
    501             except ValueError:
    502                 pass
     498            if (SGData['SGLatt'] == 'R' or SGData['SGPtGrp'] in ['3m1','-3m1']) and modsym.count('1/3'):
     499                return False
    503500            return True
    504501        elif LaueId in [10,11,] and LaueModId in [19,]:
     
    578575                            return False,OpCtxt+' conflict with '+OpDtxt
    579576        return True,SSGOps
    580        
    581577               
    582578    def genSSGOps():
     
    593589        if SGData['SGInv']:
    594590            SSGOps += [[-1*M,V] for M,V in SSGOps[:]]
    595 # monoclinic
     591# monoclinic - all done
    596592        if SGData['SGPtGrp'] in ['2','m']:  #OK
    597593            SSGOps[1][0][3,3] = SSGKl[0]
     
    599595            for i in iFrac:
    600596                SSGOps[1][0][3,i] = -SSGKl[0]
    601         elif SGData['SGPtGrp'] == '2/m':
     597        elif SGData['SGPtGrp'] == '2/m':    #OK
    602598            for i,j in enumerate([1,3]):
    603599                SSGOps[j][0][3,3] = -SSGKl[i]
     
    607603                    SSGOps[j][0][3,k] = SSGKl[i]
    608604                E,SSGOps = extendSSGOps(SSGOps)
    609             print E,SSMT2text(SSGOps[1]).replace(' ',''),SSMT2text(SSGOps[3]).replace(' ','')
    610605           
    611606# orthorhombic
     
    618613            print SSMT2text(SSGOps[1]).replace(' ',''),SSMT2text(SSGOps[2]).replace(' ',''), \
    619614                SSMT2text(SSGOps[3]).replace(' ','')
     615               
    620616# tetragonal
    621617        elif SGData['SGPtGrp'] == '4':  #OK
     
    629625                SSGOps[1][0][3,1] = 1
    630626        elif SGData['SGPtGrp'] in ['4/m',]:
    631             SSGOps[1][0][3,3] = SSGKl[0]
    632             SSGOps[5][0][3,3] = SSGKl[1]
    633             SSGOps[1][1][3] = genQ[0]
    634627            if '1/2' in SSGData['modSymb']:
    635628                SSGOps[1][0][3,1] = -1
     629            for i,j in enumerate([1,6]):
     630                SSGOps[j][0][3,3] = SSGKl[i]
     631                if genQ[i]:
     632                    SSGOps[j][1][3] = genQ[i]
     633                E,SSGOps = extendSSGOps(SSGOps)
    636634        elif SGData['SGPtGrp'] in ['422','4mm','-42m','-4m2',]:
     635            if '1/2' in SSGData['modSymb']:
     636                SSGOps[1][0][3,1] = -1
    637637            for i,j in enumerate([1,4,5]):
    638638                SSGOps[j][0][3,3] = SSGKl[i]
     
    641641                E,SSGOps = extendSSGOps(SSGOps)
    642642        elif SGData['SGPtGrp'] in ['4/mmm',]:
     643            if '1/2' in SSGData['modSymb']:
     644                SSGOps[1][0][3,1] = -1
    643645            for i,j in enumerate([1,10,6,7]):
    644646                SSGOps[j][0][3,3] = SSGKl[i]
     
    649651                    SSGOps[j][0][3,k] = SSGKl[i]
    650652                E,SSGOps = extendSSGOps(SSGOps)
    651 # trigonal
    652         elif SGData['SGPtGrp'] == '3':
     653               
     654# trigonal - all done
     655        elif SGData['SGPtGrp'] == '3':  #OK
    653656            SSGOps[1][0][3,3] = SSGKl[0]
     657            if '1/3' in SSGData['modSymb']:
     658                SSGOps[1][0][3,1] = -1
    654659            SSGOps[1][1][3] = genQ[0]
    655         elif SGData['SGPtGrp'] == '-3':
     660        elif SGData['SGPtGrp'] == '-3': #OK
    656661            SSGOps[1][0][3,3] = -SSGKl[0]
    657         elif SGData['SGPtGrp'] in ['32','3m','-3m',]:
    658             SSGOps[1][0][3,3] = SSGKl[1]
    659         elif SGData['SGPtGrp'] in ['312','321','3m1','31m','-3m1','-31m',]:
    660             SSGOps[1][0][3,3] = SSGKl[0]
    661 # hexagonal
     662            if '1/3' in SSGData['modSymb']:
     663                SSGOps[1][0][3,1] = -1
     664            SSGOps[1][1][3] = genQ[0]
     665        elif SGData['SGPtGrp'] in ['312','3m','-3m','-3m1','3m1']:   #OK
     666            if '1/3' in SSGData['modSymb']:
     667                SSGOps[1][0][3,1] = -1
     668            for i,j in enumerate([1,5]):
     669                if SGData['SGPtGrp'] in ['3m','-3m']:
     670                    SSGOps[j][0][3,3] = SSGKl[i]
     671                else:                   
     672                    SSGOps[j][0][3,3] = SSGKl[i+1]
     673                if genQ[i]:
     674                    SSGOps[j][1][3] = genQ[i]
     675        elif SGData['SGPtGrp'] in ['321','32']:   #OK
     676            for i,j in enumerate([1,4]):
     677                SSGOps[j][0][3,3] = SSGKl[i]
     678                if genQ[i]:
     679                    SSGOps[j][1][3] = genQ[i]
     680        elif SGData['SGPtGrp'] in ['31m','-31m']:   #OK
     681            ids = [1,3]
     682            if SGData['SGPtGrp'] == '-31m':
     683                ids = [7,3]
     684            if '1/3' in SSGData['modSymb']:
     685                SSGOps[ids[0]][0][3,1] = -1
     686            for i,j in enumerate(ids):
     687                SSGOps[j][0][3,3] = SSGKl[i]
     688                if genQ[i+1]:
     689                    SSGOps[j][1][3] = genQ[i+1]
     690                     
     691# hexagonal - all done
    662692        elif SGData['SGPtGrp'] == '6':  #OK
    663693            SSGOps[1][0][3,3] = SSGKl[0]
     
    681711                    SSGOps[j][1][3] = genQ[i]
    682712                E,SSGOps = extendSSGOps(SSGOps)
    683         if SGData['SGPtGrp'] in ['1','-1']: #triclinic - done
     713        elif SGData['SGPtGrp'] in ['1','-1']: #triclinic - done
    684714            return True,SSGOps
    685715        E,SSGOps = extendSSGOps(SSGOps)
     
    740770        elif SGData['SGPtGrp'] in ['32',] and sym not in ['','t0']:
    741771            return False
    742         elif SGData['SGPtGrp'] in ['321',] and sym not in ['','t00']:
    743             return False
    744         elif SGData['SGPtGrp'] in ['312',] and sym not in ['',]:
     772        elif SGData['SGPtGrp'] in ['321','312'] and sym not in ['','t00']:
    745773            return False
    746774        elif SGData['SGPtGrp'] in ['3m','-3m'] and sym not in ['','0s']:
     
    807835        genQ = [0,0,0,0]
    808836    SSGData = {'SSpGrp':SGData['SpGrp']+SSymbol,'modQ':modQ,'modSymb':modsym}
    809     SSCen = np.ones((len(SGData['SGCen']),4))*0.5
     837    SSCen = np.zeros((len(SGData['SGCen']),4))
    810838    for icen,cen in enumerate(SGData['SGCen']):
    811839        SSCen[icen,0:3] = cen
Note: See TracChangeset for help on using the changeset viewer.