Changeset 2483
- Timestamp:
- Oct 3, 2016 1:24:31 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r2482 r2483 1747 1747 Atoms.SetCellTextColour(row,cj,VERY_LIGHT_GREY) 1748 1748 if colM: 1749 SytSym,Mul,Nop = G2spc.SytSym(atomData[row][colX:colX+3],SGData) 1750 if SpnFlp[Nop] > 0.: #black 1751 CSI = G2spc.GetCSpqinel(SytSym)[0] 1752 else: #red 1753 CSI = G2spc.GetCSpqinel(SytSym)[1] 1749 SytSym,Mul,Nop,dupDir = G2spc.SytSym(atomData[row][colX:colX+3],SGData) 1750 CSI = G2spc.GetCSpqinel(SytSym,SpnFlp,dupDir) 1751 # print SytSym,Nop,SpnFlp[Nop],CSI,dupDir 1754 1752 for i in range(3): 1755 1753 ci = i+colM … … 1772 1770 SpnFlp = generalData['SGData'].get('SpnFlp',[]) 1773 1771 OprNames = generalData['SGData'].get('OprNames',[]) 1772 # print OprNames 1773 # print SpnFlp 1774 # print generalData['SGData'].get('MagMom',[]) 1774 1775 atomData = data['Atoms'] 1775 1776 DData = data['Drawing'] … … 1832 1833 1833 1834 def OnAtomAdd(event): 1834 AtomAdd(0,0,0) 1835 Elem = 'H' 1836 if data['General']['Type'] == 'magnetic': 1837 Elem = 'Fe' 1838 AtomAdd(0,0,0,El=Elem) 1835 1839 FillAtomsGrid(Atoms) 1836 1840 event.StopPropagation() … … 1839 1843 1840 1844 def OnAtomViewAdd(event): 1845 Elem = 'H' 1846 if data['General']['Type'] == 'magnetic': 1847 Elem = 'Fe' 1841 1848 try: 1842 1849 drawData = data['Drawing'] 1843 1850 x,y,z = drawData['viewPoint'][0] 1844 AtomAdd(x,y,z )1851 AtomAdd(x,y,z,El=Elem) 1845 1852 except: 1846 AtomAdd(0,0,0 )1853 AtomAdd(0,0,0,El=Elem) 1847 1854 FillAtomsGrid(Atoms) 1848 1855 event.StopPropagation() -
trunk/GSASIIspc.py
r2473 r2483 1861 1861 '-2151':[ 74,'-3+--2',64],'0':[0,' ????',0] 1862 1862 } 1863 1864 OprName = { 1865 '-6643':' -1 ','6479' :' 2(z)','-6479':' m(z)', 1866 '6481' :' m(y)','-6481':' 2(y)','6641' :' m(x)', 1867 '-6641':' 2(x)','6591' :' m(+-0)','-6591':' 2(+-0)', 1868 '6531' :' m(110) ','-6531':' 2(110) ','6537' :' 4(001)', 1869 '-6537':' -4(001)','975' :' 3(111)','6456' :' 3 ', 1870 '-489' :' 3(+--)','483' :' 3(-+-)','-969' :' 3(--+)', 1871 '819' :' m(+0-)','-819' :' 2(+0-)','2431' :' m(0+-)', 1872 '-2431':' 2(0+-)','-657' :' m(xz)','657' :' 2(xz)', 1873 '1943' :' -4(100)','-1943':' 4(100)','-2429':' m(yz)', 1874 '2429' :' 2(yz)','639' :' -4(010)','-639' :' 4(010)', 1875 '-6484':' 2(010) ','6484' :' m(010) ','-6668':' 2(100) ', 1876 '6668' :' m(100) ','-6454':' 2(120) ','6454' :' m(120) ', 1877 '-6638':' 2(210) ','6638' :' m(210) '} #search ends here 1878 1863 1879 1864 1880 KNsym = { … … 2015 2031 return OprPtrName[key] 2016 2032 2033 def GetOprName(key): 2034 'Needs a doc string' 2035 return OprName[key] 2036 2017 2037 def GetKNsym(key): 2018 2038 'Needs a doc string' … … 2035 2055 return CSuinel[indx[1]] 2036 2056 2037 def GetCSpqinel(siteSym ):2057 def GetCSpqinel(siteSym,SpnFlp,dupDir): 2038 2058 "returns Mxyz terms, multipliers, GUI flags" 2039 indx = GetNXUPQsym(siteSym) 2040 return CSxinel[indx[2]],CSxinel[indx[3]] 2059 CSI = [[1,2,3],[1.0,1.0,1.0]] 2060 for opr in dupDir: 2061 indx = GetNXUPQsym(opr) 2062 if SpnFlp[dupDir[opr]] > 0.: 2063 csi = CSxinel[indx[2]] #P 2064 else: 2065 csi = CSxinel[indx[3]] #Q 2066 for kcs in [0,1,2]: 2067 if csi[0][kcs] == 0 and CSI[0][kcs] != 0: 2068 jcs = CSI[0][kcs] 2069 for ics in [0,1,2]: 2070 if CSI[0][ics] == jcs: 2071 CSI[0][ics] = 0 2072 CSI[1][ics] = 0. 2073 elif CSI[0][ics] > jcs: 2074 CSI[0][ics] = CSI[0][jcs]-1 2075 elif CSI[0][kcs] == csi[0][kcs] and CSI[1][kcs] != csi[1][kcs]: 2076 CSI[1][kcs] = csi[1][kcs] 2077 elif CSI[0][kcs] > csi[0][kcs]: 2078 CSI[0][kcs] = min(CSI[0][kcs],csi[0][kcs]) 2079 if CSI[1][kcs] == 1.: 2080 CSI[1][kcs] = csi[1][kcs] 2081 return CSI 2041 2082 2042 2083 def getTauT(tau,sop,ssop,XYZ): … … 2646 2687 Jdup = 0 2647 2688 Ndup = 0 2689 dupDir = {} 2648 2690 Xeqv = GenAtom(XYZ,SGData,True) 2649 2691 IRT = PackRot(SGData['SGOps']) … … 2657 2699 Ndup = io 2658 2700 Jdup += 1 2659 jx = GetOprPtrName(str(irtx)) 2701 jx = GetOprPtrName(str(irtx)) #[KN table no,op name,KNsym ptr] 2660 2702 if jx[2] < 39: 2703 px = GetOprName(str(irtx)) 2704 if px != '6643': #skip Iden 2705 dupDir[px] = io 2661 2706 Isym += 2**(jx[2]-1) 2662 2707 if Isym == 1073741824: Isym = 0 2663 2708 Mult = len(SGData['SGOps'])*len(SGData['SGCen'])*(int(SGData['SGInv'])+1)/Jdup 2664 2709 2665 return GetKNsym(str(Isym)),Mult,Ndup 2710 return GetKNsym(str(Isym)),Mult,Ndup,dupDir 2666 2711 2667 2712 def ElemPosition(SGData): … … 3798 3843 assert not E, msg 3799 3844 for t in crdlist: 3800 symb, m, n = SytSym(t[0],S)3845 symb, m, n, od = SytSym(t[0],S) 3801 3846 if symb.strip() != t[2].strip() or m != t[1]: 3802 print spc,t[0],m,n,symb,t[2] 3847 print spc,t[0],m,n,symb,t[2],od 3803 3848 assert m == t[1] 3804 3849 #assert symb.strip() == t[2].strip() -
trunk/GSASIIstrIO.py
r2481 r2483 1209 1209 G2mv.StoreEquivalence(name,equiv[1:]) 1210 1210 if 'M' in at[ct+1]: 1211 SytSym,Mul,Nop = G2spc.SytSym(at[cx:cx+3],SGData) 1212 if SpnFlp[Nop] > 0.: #black use p 1213 mId,mCoef = G2spc.GetCSpqinel(SytSym)[0] 1214 else: #red use q 1215 mId,mCoef = G2spc.GetCSpqinel(SytSym)[1] 1211 SytSym,Mul,Nop,dupDir = G2spc.SytSym(at[cx:cx+3],SGData) 1212 mId,mCoef = G2spc.GetCSpqinel(SytSym,SpnFlp,dupDir) 1216 1213 names = [pfx+'AMx:'+str(i),pfx+'AMy:'+str(i),pfx+'AMz:'+str(i)] 1217 1214 equivs = [[],[],[]] -
trunk/GSASIIstrMath.py
r2481 r2483 1046 1046 SGMT = np.array([ops[0].T for ops in SGData['SGOps']]) 1047 1047 SGT = np.array([ops[1] for ops in SGData['SGOps']]) 1048 Ncen = len(SGData['SGCen']) 1048 1049 FFtables = calcControls['FFtables'] 1049 1050 BLtables = calcControls['BLtables'] 1051 MFtables = calcControls['MFtables'] 1052 Amat,Bmat = G2lat.Gmat2AB(G) 1050 1053 nRef = len(refDict['RefList']) 1051 1054 Tdata,Mdata,Fdata,Xdata,dXdata,IAdata,Uisodata,Uijdata,Gdata = \ … … 1128 1131 fotp = FPP*Tcorr 1129 1132 if 'N' in calcControls[hfx+'histType'] and parmDict[pfx+'isMag']: 1130 MF = np.repeat(refDict['FF']['MF'][iBeg:iFin].T[Tindx].T,len(TwinLaw),axis=0)#Nref,Natm1133 MF = refDict['FF']['MF'][iBeg:iFin].T[Tindx].T #Nref,Natm 1131 1134 TMcorr = 0.5*0.539*Tcorr[:,0,:]*MF*len(SGMT)/Mdata #Nref,Natm 1132 1135 if SGData['SGInv']:
Note: See TracChangeset
for help on using the changeset viewer.