Changeset 3308 for trunk/GSASIIspc.py
 Timestamp:
 Mar 5, 2018 3:31:19 PM (4 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIspc.py
r3307 r3308 207 207 if SGData['SGPtGrp'] in ['1','3','23',]: 208 208 SGData['SGSpin'] = lattSpin+[1,] 209 elif SGData['SGPtGrp'] in ['1','2','m','4','4','3','312','321','3m1','31m','6','6','432','43m' ,'m3']:209 elif SGData['SGPtGrp'] in ['1','2','m','4','4','3','312','321','3m1','31m','6','6','432','43m']: 210 210 SGData['SGSpin'] = lattSpin+[1,1,] 211 211 elif SGData['SGPtGrp'] in ['2/m','4/m','422','4mm','42m','4m2','3m1','31m', 212 '6/m','622','6mm','6m2','62m','m 3m']:212 '6/m','622','6mm','6m2','62m','m3','m3m']: 213 213 SGData['SGSpin'] = lattSpin+[1,1,1,] 214 214 else: #'222''mmm','4/mmm','6/mmm' … … 790 790 elif '(I)' in BNS: 791 791 Tmat *= 2.0 792 SGData['SGSpin'][1] = 1 792 793 if 'R' in BNS: 793 794 SGData['SGSpin'][1] = 1 … … 1053 1054 "From magnetic space group cif text returns matrix/translation + spin flip" 1054 1055 XYZ = {'x':[1,0,0],'+x':[1,0,0],'x':[1,0,0],'y':[0,1,0],'+y':[0,1,0],'y':[0,1,0], 1055 'z':[0,0,1],'+z':[0,0,1],'z':[0,0,1],'xy':[1,1,0],'x+y':[1,1,0], }1056 'z':[0,0,1],'+z':[0,0,1],'z':[0,0,1],'xy':[1,1,0],'x+y':[1,1,0],'yx':[1,1,0]} 1056 1057 ops = mcifOpr.split(",") 1057 1058 M = [] … … 1121 1122 SpnFlp = np.ones(Nsym,dtype=np.int) 1122 1123 GenFlg = SGData.get('GenFlg',[0]) 1124 # print ('GenFlg:',SGData['GenFlg']) 1125 # print ('GenSym:',SGData['GenSym']) 1123 1126 Nfl = len(GenFlg) 1124 if Nfl>1: 1125 for ieqv in range(Nsym): 1126 for iunq in range(Nfl): 1127 if SGData['SGGen'][ieqv] & GenFlg[iunq]: 1128 SpnFlp[ieqv] *= FlpSpn[iunq] 1127 for ieqv in range(Nsym): 1128 for iunq in range(Nfl): 1129 if SGData['SGGen'][ieqv] & GenFlg[iunq]: 1130 SpnFlp[ieqv] *= FlpSpn[iunq] 1129 1131 # print ('\nMagSpGrp:',SGData['MagSpGrp'],Ncv) 1130 # print ('GenFlg:',SGData['GenFlg'])1131 # print ('GenSym:',SGData['GenSym'])1132 1132 # print ('FlpSpn:',Nfl,FlpSpn) 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1133 detM = [nl.det(M) for M in sgOp] 1134 for incv in range(Ncv): 1135 if incv: 1136 try: 1137 SpnFlp = np.concatenate((SpnFlp,SpnFlp[:Nsym]*FlpSpn[Nfl+incv1])) 1138 except IndexError: 1139 FlpSpn = [1,]+FlpSpn 1140 SpnFlp = np.concatenate((SpnFlp,SpnFlp[:Nsym]*FlpSpn[Nfl+incv1])) 1141 if ' 1bar ' in SGData['GenSym'][0] and FlpSpn[0] < 0: 1142 detM[1] = 1. 1143 MagMom = SpnFlp*np.array(Ncv*detM) 1144 SGData['MagMom'] = MagMom 1145 1145 # print ('SgOps:',OprNames) 1146 1146 # print ('SGGen:',SGData['SGGen']) … … 2190 2190 "returns Mxyz terms, multipliers, GUI flags" 2191 2191 CSI = [[1,2,3],[1.0,1.0,1.0]] 2192 print('for ',siteSym) 2192 2193 for opr in dupDir: 2193 2194 indx = GetNXUPQsym(opr) … … 2196 2197 else: 2197 2198 csi = CSxinel[indx[3]] #Q 2198 #print(opr,SpnFlp[dupDir[opr]],indx,csi,CSI)2199 print(opr,SpnFlp[dupDir[opr]],indx,csi,CSI) 2199 2200 if not len(csi): 2200 2201 return [[0,0,0],[0.,0.,0.]] … … 2212 2213 elif CSI[0][kcs] >= csi[0][kcs]: 2213 2214 CSI[0][kcs] = min(CSI[0][kcs],csi[0][kcs]) 2214 if CSI[ 0][kcs] != csi[0][kcs]:2215 if CSI[1][kcs] != csi[1][kcs]: 2215 2216 if CSI[1][kcs] == 1.: 2216 2217 CSI[1][kcs] = csi[1][kcs] 2218 print(CSI) 2217 2219 return CSI 2218 2220
Note: See TracChangeset
for help on using the changeset viewer.