Changeset 3736 for trunk/GSASIIspc.py
 Timestamp:
 Nov 17, 2018 7:36:26 PM (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIspc.py
r3729 r3736 408 408 SGText = [] 409 409 SGText.append(' Space Group: '+SGData['SpGrp']) 410 if SGData.get('SGGray',False): SGText[1] += " 1'" 410 if SGData.get('SGGray',False): 411 SGText[1] += " 1'" 412 Mult //= 2 411 413 CentStr = 'centrosymmetric' 412 414 if not SGData['SGInv']: … … 1638 1640 elif SGData['SGLaue'] in ['3R','3mR']: 1639 1641 return '(3+1) superlattices not defined for rhombohedral settings  use hexagonal setting',None 1640 if SGData['SGGray'] and SSymbol[1] == 's':1641 SSymbol = SSymbol[:1]1642 # if SGData['SGGray'] and SSymbol[1] == 's': 1643 # SSymbol = SSymbol[:1] 1642 1644 try: 1643 1645 modsym,gensym = splitSSsym(SSymbol) … … 1691 1693 Gets the unique set of possible super space groups for a given space group 1692 1694 ''' 1693 laueSS = {'1':['(abg)',], 1694 '2/m':['(a0g)','(a1/2g)','(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)'], 1695 'mmm':['(00g)','(1/20g)','(01/2g)','(1/21/2g)','(10g)','(01g)', 1696 '(a00)','(a1/20)','(a01/2)','(a1/21/2)','(a10)','(a01)', 1697 '(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)','(1b0)','(0b1)',], 1698 '4/m':['(00g)','(1/21/2g)'], 1699 '4/mmm':['(00g)','(1/21/2g)'], 1700 '3':['(00g)','(1/31/3g)'], 1701 '3m1':['(00g)'], 1702 '31m':['(00g)','(1/31/3g)'], 1703 '6/m':['(00g)',], 1704 '6/mmm':['(00g)',], 1705 'm3':['',],'m3m':['',]} 1695 ptgpSS = {'1':['(abg)',],'1':['(abg)',], 1696 1697 '2':['(a0g)','(a1/2g)','(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)'], 1698 'm':['(a0g)','(a1/2g)','(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)'], 1699 '2/m':['(a0g)','(a1/2g)','(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)'], 1700 1701 '222':['(00g)','(1/20g)','(01/2g)','(1/21/2g)','(10g)','(01g)', 1702 '(a00)','(a1/20)','(a01/2)','(a1/21/2)','(a10)','(a01)', 1703 '(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)','(1b0)','(0b1)',], 1704 'mm2':['(00g)','(1/20g)','(01/2g)','(1/21/2g)','(10g)','(01g)', 1705 '(a00)','(a1/20)','(a01/2)','(a1/21/2)','(a10)','(a01)', 1706 '(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)','(1b0)','(0b1)',], 1707 'm2m':['(00g)','(1/20g)','(01/2g)','(1/21/2g)','(10g)','(01g)', 1708 '(a00)','(a1/20)','(a01/2)','(a1/21/2)','(a10)','(a01)', 1709 '(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)','(1b0)','(0b1)',], 1710 '2mm':['(00g)','(1/20g)','(01/2g)','(1/21/2g)','(10g)','(01g)', 1711 '(a00)','(a1/20)','(a01/2)','(a1/21/2)','(a10)','(a01)', 1712 '(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)','(1b0)','(0b1)',], 1713 'mmm':['(00g)','(1/20g)','(01/2g)','(1/21/2g)','(10g)','(01g)', 1714 '(a00)','(a1/20)','(a01/2)','(a1/21/2)','(a10)','(a01)', 1715 '(0b0)','(1/2b0)','(0b1/2)','(1/2b1/2)','(1b0)','(0b1)',], 1716 1717 '4':['(00g)','(1/21/2g)'],'4mm':['(00g)','(1/21/2g)'], 1718 '4/m':['(00g)','(1/21/2g)'], 1719 '422':['(00g)','(1/21/2g)'],'4m2':['(00g)','(1/21/2g)'],'42m':['(00g)','(1/21/2g)'], 1720 '4/mmm':['(00g)','(1/21/2g)'], 1721 1722 '3':['(00g)','(1/31/3g)'], 1723 '32':['(00g)'],'3m':['(00g)'], 1724 '321':['(00g)'],'3m1':['(00g)'], 1725 '312':['(00g)','(1/31/3g)'],'31m':['(00g)','(1/31/3g)'], 1726 1727 '6':['(00g)',],'6/m':['(00g)',],'62m':['(00g)',],'6m2':['(00g)',], 1728 '622':['(00g)',],'6/mmm':['(00g)',],'6mm':['(00g)',], 1729 1730 '23':['',],'m3':['',],'432':['',],'43m':['',],'m3m':['',]} 1706 1731 1707 laueTS = {'1':['',], 1708 '2/m':['','s','0s','ss','s0'], 1709 'mmm':['','s00','0s0','00s','ss0','s0s','0ss','q00','0q0','00q','0qq','q0q','qq0'], 1710 '4/m':['','q','s','s0',], 1711 '4/mmm':['','q00','s00','s0s','ss0','0ss','qq0','qqs','0q0','s0s0','00ss','s00s','ss00','0ss0','0s0s'], 1712 '3':['','t'], 1713 '3m1':['','t0','0s','t00','0s0'], 1714 '31m':['','t00','0ss'], 1715 '6/m':['','h','t','s','s0'], 1716 '6/mmm':['','h00','t00','s00','ss0','0ss','s0s','s0s0','00ss','s00s','ss00','0ss0','0s0s'], 1717 'm3':['',],'m3m':['',]} 1718 laue = SGData['SGLaue'] 1732 ptgpTS = {'1':['0',],'1':['0',], 1733 1734 '2':['0','s'],'m':['0','s'], 1735 '2/m':['00','0s','ss','s0'], 1736 1737 '222':['000','s00','0s0','00s',], 1738 'mm2':['000','s00','0s0','00s','ss0','s0s','0ss','q00','0q0','00q','0qq','q0q','qq0'], 1739 'm2m':['000','s00','0s0','00s','ss0','s0s','0ss','q00','0q0','00q','0qq','q0q','qq0'], 1740 '2mm':['000','s00','0s0','00s','ss0','s0s','0ss','q00','0q0','00q','0qq','q0q','qq0'], 1741 'mmm':['000','s00','0s0','00s','ss0','s0s','0ss','q00','0q0','00q','0qq','q0q','qq0'], 1742 1743 '4':['0','q','s'],'4mm':['000','q00','s00','s0s','ss0','0ss','qq0','qqs'], 1744 '4/m':['00','s0'],'4m2':['000','0s0','0q0'],'42m':['000','00s'], 1745 '422':['000','q00','s00','s0s','ss0','0ss','qq0','qqs','0q0'], 1746 '4/mmm':['0000','s0s0','00ss','s00s','ss00','0ss0','0s0s'], 1747 1748 '3':['0','t'], 1749 '32':['00','t0'],'3m':['00','0s'], 1750 '321':['000','t00'],'3m1':['000','0s0'], 1751 '312':['000','t00'],'31m':['000','00s'], 1752 1753 '6':['0','h','t','s'], 1754 '6/m':['00','s0'],'62m':['000','00s'],'6m2':['000','0s0'], 1755 '622':['000','h00','t00','s00',],'6mm':['000','ss0','s0s','0ss',], 1756 '6/mmm':['0000','s0s0','00ss','s00s','ss00','0ss0','0s0s'], 1757 1758 '23':['',],'m3':['',],'432':['',],'43m':['',],'m3m':['',]} 1759 1760 ptgp = SGData['SGPtGrp'] 1719 1761 SSChoice = [] 1720 for ax in laueSS[laue]:1721 for sx in laueTS[laue]:1762 for ax in ptgpSS[ptgp]: 1763 for sx in ptgpTS[ptgp]: 1722 1764 SSChoice.append(ax+sx) 1723 1765 ssChoice = [] … … 1732 1774 return ssChoice 1733 1775 1776 def fixSSymb(ssSymb,SGData): 1777 sgPtGp = SGData['SGPtGrp'] 1778 ssSymb += ' ' 1779 if ssSymb.rfind('0000 ') > 0: 1780 ssSymb = ssSymb.replace('0000 ','') 1781 elif ssSymb.rfind('000 ') > 0 and not sgPtGp in ['4/mmm','6/mmm']: 1782 ssSymb = ssSymb.replace('000 ','') 1783 elif ssSymb.rfind('00 ') > 0: 1784 ssSymb = ssSymb.replace('00 ','') 1785 elif ssSymb.rfind('0 ') > 0: 1786 ssSymb = ssSymb.replace('0 ','') 1787 return ssSymb 1788 1734 1789 def fixGray(SGData,SSymbol): 1735 1790 modsym,gensym = SSymbol.replace(' ','').split(')') … … 1801 1856 SGTable  list of strings for each of the operations 1802 1857 ''' 1803 Mult = len(SSGData['SSGCen'])*len(SSGData['SSGOps'])*(int(SGData['SGInv'])+1) 1858 nCen = len(SSGData['SSGCen']) 1859 Mult = nCen*len(SSGData['SSGOps'])*(int(SGData['SGInv'])+1) 1860 if SGData.get('SGFixed',False): 1861 Mult = len(SSGData['SSGCen'])*len(SSGData['SSGOps']) 1862 SSsymb = SSGData['SSpGrp'] 1863 if SGData.get('SGGray',False): 1864 Mult //= 2 1865 else: 1866 if "1'" in SSsymb: 1867 nCen //= 2 1868 Mult //= 2 1869 SSsymb = SSsymb.replace("1'",'')[:1] 1804 1870 SSGText = [] 1805 SSGText.append(' Superspace Group: '+SS GData['SSpGrp'])1871 SSGText.append(' Superspace Group: '+SSsymb) 1806 1872 CentStr = 'centrosymmetric' 1807 1873 if not SGData['SGInv']: … … 1827 1893 if len(SSGData['SSGCen']) > 1: 1828 1894 SSGText.append(' The equivalent positions are:') 1829 SSGText.append(' ('+SSLatt2text(SSGData['SSGCen'] )+')+\n')1895 SSGText.append(' ('+SSLatt2text(SSGData['SSGCen'][:nCen])+')+\n') 1830 1896 else: 1831 1897 SSGText.append(' The equivalent positions are:\n') … … 2220 2286 DHKL = np.reshape(np.inner(HKLS,OpM)HKL,(1,4)) 2221 2287 PHKL = np.reshape(np.inner(HKLS,OpT),(1,)) 2222 for dhkl,phkl in zip(DHKL,PHKL)[1:]: #skip identity2288 for dhkl,phkl in list(zip(DHKL,PHKL))[1:]: #skip identity 2223 2289 if dhkl.any(): 2224 2290 continue … … 2842 2908 dMTP = [] 2843 2909 CSI = [np.zeros((6,3),dtype='i'),np.zeros((6,3))] 2844 print(siteSym)2845 2910 if siteSym == '1': 2846 2911 CSI = [[1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0],[6,0,0]],6*[[1.,0.,0.],]
Note: See TracChangeset
for help on using the changeset viewer.