Changeset 1548 for trunk/GSASIIspc.py
 Timestamp:
 Oct 30, 2014 4:07:50 PM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIspc.py
r1547 r1548 175 175 returns SSGPtGrp & SSGKl (only defaults for Mono & Ortho) 176 176 ''' 177 Flds = SGData['SpGrp'].split(' ') 177 Flds = SGData['SpGrp'].split() 178 if len(Flds) < 2: 179 return '',[] 178 180 if SGData['SGLaue'] == '1': #triclinic 179 181 if '' in Flds[1]: … … 430 432 """ 431 433 432 def splitSSsym(SSymbol):433 '''434 Splits supersymmetry symbol into two lists of strings435 '''436 modsym,gensym = SSymbol.replace(' ','').split(')')437 nfrac = modsym.count('/')438 modsym = modsym.lstrip('(')439 if nfrac == 0:440 modsym = list(modsym)441 elif nfrac == 1:442 pos = modsym.find('/')443 if pos == 1:444 modsym = [modsym[:3],modsym[3],modsym[4]]445 elif pos == 2:446 modsym = [modsym[0],modsym[1:4],modsym[4]]447 else:448 modsym = [modsym[0],modsym[1],modsym[2:]]449 else:450 lpos = modsym.find('/')451 rpos = modsym.rfind('/')452 if lpos == 1 and rpos == 4:453 modsym = [modsym[:3],modsym[3:6],modsym[6]]454 elif lpos == 1 and rpos == 5:455 modsym = [modsym[:3],modsym[3],modsym[4:]]456 else:457 modsym = [modsym[0],modsym[1:4],modsym[4:]]458 gensym = list(gensym)459 return modsym,gensym460 461 434 def checkModSym(): 462 435 ''' … … 589 562 if SGData['SGInv']: 590 563 SSGOps += [[1*M,V] for M,V in SSGOps[:]] 591 # monoclinic  all done 564 # monoclinic  all done & all checked 592 565 if SGData['SGPtGrp'] in ['2','m']: #OK 593 566 SSGOps[1][0][3,3] = SSGKl[0] … … 602 575 for k in iFrac: 603 576 SSGOps[j][0][3,k] = SSGKl[i] 604 E,SSGOps = extendSSGOps(SSGOps)605 577 606 578 # orthorhombic … … 626 598 elif SGData['SGPtGrp'] in ['4/m',]: 627 599 if '1/2' in SSGData['modSymb']: 628 SSGOps[1][0][3,1] = 1600 SSGOps[1][0][3,1] = SSGKl[0] 629 601 for i,j in enumerate([1,6]): 630 602 SSGOps[j][0][3,3] = SSGKl[i] … … 634 606 elif SGData['SGPtGrp'] in ['422','4mm','42m','4m2',]: 635 607 if '1/2' in SSGData['modSymb']: 636 SSGOps[1][0][3,1] = 1608 SSGOps[1][0][3,1] = SSGKl[0] 637 609 for i,j in enumerate([1,4,5]): 638 610 SSGOps[j][0][3,3] = SSGKl[i] … … 856 828 return Result+'\nOperator conflict  incorrect superspace symbol',None 857 829 830 def splitSSsym(SSymbol): 831 ''' 832 Splits supersymmetry symbol into two lists of strings 833 ''' 834 modsym,gensym = SSymbol.replace(' ','').split(')') 835 nfrac = modsym.count('/') 836 modsym = modsym.lstrip('(') 837 if nfrac == 0: 838 modsym = list(modsym) 839 elif nfrac == 1: 840 pos = modsym.find('/') 841 if pos == 1: 842 modsym = [modsym[:3],modsym[3],modsym[4]] 843 elif pos == 2: 844 modsym = [modsym[0],modsym[1:4],modsym[4]] 845 else: 846 modsym = [modsym[0],modsym[1],modsym[2:]] 847 else: 848 lpos = modsym.find('/') 849 rpos = modsym.rfind('/') 850 if lpos == 1 and rpos == 4: 851 modsym = [modsym[:3],modsym[3:6],modsym[6]] 852 elif lpos == 1 and rpos == 5: 853 modsym = [modsym[:3],modsym[3],modsym[4:]] 854 else: 855 modsym = [modsym[0],modsym[1:4],modsym[4:]] 856 gensym = list(gensym) 857 return modsym,gensym 858 858 859 def SSGPrint(SGData,SSGData): 859 860 ''' … … 897 898 return SSGText,SSGTable 898 899 899 def SSGModCheck(Vec, SSGData):900 def SSGModCheck(Vec,modSymb): 900 901 ''' Checks modulation vector compatibility with supersymmetry space group symbol. 901 902 Superspace group symbol takes precidence & the vector will be modified accordingly 902 903 ''' 903 modQ = SSGData['modQ']904 mod Symb = SSGData['modSymb']904 Fracs = {'1/2':0.5,'1/3':1./3,'1':1.0,'0':0.,'a':0.,'b':0.,'g':0.} 905 modQ = [Fracs[mod] for mod in modSymb] 905 906 Vec = [0.1 if (vec == 0.0 and mod in ['a','b','g']) else vec for [vec,mod] in zip(Vec,modSymb)] 906 return [Q if mod not in ['a','b','g'] and vec != Q else vec for [vec,mod,Q] in zip(Vec,modSymb,modQ)] 907 return [Q if mod not in ['a','b','g'] and vec != Q else vec for [vec,mod,Q] in zip(Vec,modSymb,modQ)], \ 908 [True if mod in ['a','b','g'] else False for mod in modSymb] 907 909 908 910 def SSMT2text(Opr): … … 1656 1658 rspc = rspc[:1] 1657 1659 rhomb = ' R' 1658 if rspc[1:] == 'H': # hexagonal is assumed and thus can be ignored1660 elif rspc[1:] == 'H': # hexagonal is assumed and thus can be ignored 1659 1661 rspc = rspc[:1] 1660 1662 # look for a match in the spacegroup lists … … 1764 1766 'P 1':['(abg)',],'P 1':['(abg)',], 1765 1767 #monoclinic  done 1766 'P 2':['(a0g)','(a1/2g)','(0b0)','(0b0)s','(1/2b0)','(0b1/2)', ],1768 'P 2':['(a0g)','(a1/2g)','(0b0)','(0b0)s','(1/2b0)','(0b1/2)','(1/2b0)s','(0b1/2)s',], 1767 1769 'P 21':['(a0g)','(0b0)','(0b0)s','(1/2b0)','(0b1/2)','(1/2b0)s','(0b1/2)s',], 1768 1770 'P m':['(a0g)','(a0g)s','(a1/2g)','(a1/2g)s','(0b0)','(1/2b0)','(0b1/2)',], … … 1772 1774 'P 2/m':['(a0g)','(a1/2g)','(a0g)0s','(a1/2g)0s', 1773 1775 '(0b0)','(0b0)s0','(1/2b0)','(0b1/2)','(1/2b0)s0','(0b1/2)s0',], 1774 'P 21/m':['(a0g)','(a0g)0s','(0b0)','(0b0)s ',1776 'P 21/m':['(a0g)','(a0g)0s','(0b0)','(0b0)s0', 1775 1777 '(1/2b0)','(0b1/2)','(1/2b0)s0','(0b1/2)s0'], 1776 1778 'P 2/c':['(a0g)','(a1/2g)','(a0g)0s','(a1/2g)0s', … … 1787 1789 'C c':['(a0g)','(a0g)s','(0b0)',], 1788 1790 'C n':['(a0g)','(a0g)s','(0b0)',], 1789 'C 2/m':['(a0g)','(a0g)0s','(0b0)','(0b0)s0', 1790 '(1/2b0)','(0b1/2)','(1/2b0)s0','(0b1/2)s0',], 1791 'C 2/m':['(a0g)','(a0g)0s','(0b0)','(0b0)s0','(0b1/2)','(0b1/2)s0',], 1791 1792 'C 2/c':['(a0g)','(a0g)0s','(0b0)','(0b0)s0',], 1792 1793 'C 2/n':['(a0g)','(a0g)0s','(0b0)','(0b0)s0',], … … 1914 1915 'P c m a':[], 1915 1916 1916 'P c c n':[], 1917 'P n a a':[], 1918 'P b n b':[], 1917 'P c c n':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1918 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1919 'P n a a':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1920 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1921 'P b n b':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1922 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1919 1923 1920 1924 'P b c m':[], … … 1925 1929 'P c m b':[], 1926 1930 1927 'P n n m':[], 1928 'P m n n':[], 1929 'P n m n':[], 1931 'P n n m':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1932 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1933 'P m n n':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1934 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1935 'P n m n':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1936 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1930 1937 1931 1938 'P m m n':[], … … 1933 1940 'P m n m':[], 1934 1941 1935 'P b c n':[], 1936 'P c a n':[], 1937 'P n c a':[], 1938 'P n a b':[], 1939 'P b n a':[], 1940 'P c n b':[], 1942 'P b c n':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1943 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1944 'P c a n':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1945 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1946 'P n c a':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1947 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1948 'P n a b':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1949 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1950 'P b n a':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1951 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1952 'P c n b':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1953 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1941 1954 1942 1955 'P b c a':[], 1943 1956 'P c a b':[], 1944 1957 1945 'P n m a':[], 1946 'P m n b':[], 1947 'P b n m':[], 1948 'P c m n':[], 1949 'P m c n':[], 1950 'P n a m':[], 1958 'P n m a':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1959 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1960 'P m n b':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1961 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1962 'P b n m':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1963 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1964 'P c m n':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1965 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1966 'P m c n':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1967 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1968 'P n a m':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 1969 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 1951 1970 1952 1971 'C 2 2 21':['(a00)','(0b0)','(00g)','(10g)','(01g)',], … … 1992 2011 'I m 2 a':[], 1993 2012 1994 'I b a m':[], 1995 'I m c b':[], 1996 'I c m a':[], 1997 1998 'I b c a':[], 1999 'I c a b':[], 2000 2001 'I m m a':[], 2002 'I m m b':[], 2003 'I b m m ':[], 2004 'I c m m':[], 2005 'I m c m':[], 2006 'I m a m':[], 2007 2008 'F 2 2 2':[], 2009 'F m m m':[], 2010 'F d d d':[], 2011 2012 'F m m 2':[], 2013 'F m 2 m':[], 2014 'F 2 m m':[], 2015 2016 'F d d 2':[], 2017 'F d 2 d':[], 2018 'F 2 d d':[], 2013 'I b a m':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2014 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 2015 'I m c b':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2016 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 2017 'I c m a':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2018 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 2019 2020 'I b c a':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2021 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 2022 'I c a b':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2023 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 2024 2025 'I m m a':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2026 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 2027 'I m m b':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2028 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 2029 'I b m m ':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2030 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 2031 'I c m m':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2032 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 2033 'I m c m':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2034 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 2035 'I m a m':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2036 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 2037 2038 'F 2 2 2':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2039 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s', 2040 '(10g)','(10g)s00','(10g)0s0','(10g)ss0','(a10)','(a10)0s0', 2041 '(a10)00s','(a10)0ss','(0b1)','(0b1)s00','(0b1)00s','(0b1)s0s', 2042 '(01g)','(01g)s00','(01g)0s0','(01g)ss0','(a01)','(a01)0s0', 2043 '(a01)00s','(a01)0ss','(1b0)','(1b0)s00','(1b0)00s','(1b0)s0s'], 2044 2045 'F m m m':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2046 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s', 2047 '(10g)','(10g)s00','(10g)0s0','(10g)ss0','(a10)','(a10)0s0', 2048 '(a10)00s','(a10)0ss','(0b1)','(0b1)s00','(0b1)00s','(0b1)s0s', 2049 '(01g)','(01g)s00','(01g)0s0','(01g)ss0','(a01)','(a01)0s0', 2050 '(a01)00s','(a01)0ss','(1b0)','(1b0)s00','(1b0)00s','(1b0)s0s'], 2051 2052 'F d d d':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 2053 '(a00)00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s'], 2054 2055 'F m m 2':['(00g)','(00g)ss0','(00g)0ss','(00g)s0s','(a00)','(a00)0s0', 2056 '(0b0)','(0b0)s00','(10g)','(10g)ss0','(10g)0ss','(10g)s0s','(a01)','(a01)0s0', 2057 '(1b0)','(1b0)s00','(01g)','(01g)ss0','(01g)0ss','(01g)s0s','(a10)','(a10)0s0', 2058 '(0b1)','(0b1)s00',], 2059 2060 'F m 2 m':['(0b0)','(0b0)ss0','(0b0)0ss','(0b0)s0s','(a00)','(a00)00s', 2061 '(00g)','(00g)s00','(1b0)','(1b0)ss0','(1b0)0ss','(1b0)s0s','(a01)','(a01)00s', 2062 '(01g)','(01g)s00','(0b1)','(0b1)ss0','(0b1)0ss','(0b1)s0s','(a10)','(a10)00s', 2063 '(10g)','(10g)s00',], 2064 2065 'F 2 m m':['(a00)','(a00)ss0','(a00)0ss','(a00)s0s','(0b0)','(0b0)00s', 2066 '(00g)','(00g)0s0','(a10)','(a10)ss0','(a10)0ss','(a10)s0s','(0b1)','(0b1)00s', 2067 '(10g)','(10g)0s0','(a01)','(a01)ss0','(a01)0ss','(a01)s0s','(1b0)','(1b0)00s', 2068 '(01g)','(01g)0s0',], 2069 2070 'F d d 2':['(00g)','(00g)ss0','(00g)0ss','(00g)s0s','(a00)','(a00)0s0', 2071 '(0b0)','(0b0)s00',], 2072 'F d 2 d':['(0b0)','(0b0)ss0','(0b0)0ss','(0b0)s0s','(a00)','(a00)00s', 2073 '(00g)','(00g)s00',], 2074 'F 2 d d':['(a00)','(a00)ss0','(a00)0ss','(a00)s0s','(0b0)','(0b0)00s', 2075 '(00g)','(00g)0s0',], 2019 2076 #tetragonal  done 2020 2077 'P 4':['(00g)','(00g)q','(00g)s','(1/21/2g)','(1/21/2g)q',],
Note: See TracChangeset
for help on using the changeset viewer.