Changeset 5475 for trunk/GSASIIlattice.py
- Timestamp:
- Jan 16, 2023 10:08:28 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIlattice.py ¶
r5472 r5475 2120 2120 ''' 2121 2121 if M <= L: 2122 if sytsym == '23': #cubics use different Fourier expansion than those below 2122 if sytsym == '53m': 2123 if not L%2 and M > 0: 2124 if L in [6,10,12,16,18]: 2125 if L%12 == 2: 2126 if M <= L//12: return True,1.0 2127 else: 2128 if M <= L//12+1: return True,1.0 2129 elif sytsym == '23': #cubics use different Fourier expansion than those below 2123 2130 if 2 < L < 11 and [L,M] in [[3,1],[4,1],[6,1],[6,2],[7,1],[8,1],[9,1],[9,2],[10,1],[10,2]]: 2124 2131 return True,1.0 … … 2232 2239 return False,0. 2233 2240 2234 def RBsymChk(RBsym,cubic,coefNames ):2241 def RBsymChk(RBsym,cubic,coefNames,L=18): 2235 2242 '''imposes rigid body symmetry on spherical harmonics terms 2236 2243 Key problem is noncubic RB symmetries in cubic site symmetries & vice versa. … … 2274 2281 newSgns.append(sgn) 2275 2282 else: 2276 for name in coefNames: 2277 LM = eval(name[1:]) 2278 if RBsym in ['m3m','-43m']: 2279 cubNames,sgns = GenShCoeff(RBsym,LM[0]) 2280 print(name,LM[0],cubNames) 2281 M = [] 2282 for cname in cubNames: 2283 LMc = eval(cname[1:-1]) 2284 if (LMc[0]+LMc[1])%2: #even L odd M or vv 2285 if LMc[0]%2: 2286 M += [4*m for m in range(LMc[0]//2)[1:] if 4*m <= LMc[0]] 2287 else: 2288 M += [4*m for m in range(LMc[0]//2) if 4*m <= LMc[0]] 2289 else: #both even or both odd 2290 M += [4*m+2 for m in range(LMc[0]//2) if 4*m+2 <= LMc[0]] 2291 for m in M: 2292 rbChk,sgn = RBChk(RBsym,LM[0],m) 2293 if rbChk: 2294 newname = 'C(%d,%d)'%(LM[0],m) 2295 if newname not in newNames: 2296 newNames.append(newname) 2297 newSgns.append(sgn) 2298 print(name,cubNames,M) 2299 else: 2283 if RBsym in ['m3m','-43m','53m']: #force mol. sym. here 2284 for L in range(L+1): 2285 cubNames,cubSgns = GenShCoeff(RBsym,L) 2286 newNames += cubNames 2287 newSgns += cubSgns 2288 else: 2289 for name in coefNames: 2290 LM = eval(name[1:]) 2300 2291 rbChk,sgn = RBChk(RBsym,LM[0],LM[1]) 2301 2292 if rbChk: … … 2325 2316 if RBsym == '1': 2326 2317 return coefNames,coefSgns 2327 newNames,newSgns = RBsymChk(RBsym,cubic,coefNames )2318 newNames,newSgns = RBsymChk(RBsym,cubic,coefNames,L) 2328 2319 return newNames,newSgns 2329 2320 … … 2332 2323 coefSgns = [] 2333 2324 cubic = False 2334 if sytsym in ['23','m3','432','-43m','m3m' ]:2325 if sytsym in ['23','m3','432','-43m','m3m','53m']: 2335 2326 cubic = True 2336 2327 for n in range(L+1): … … 2342 2333 coefNames.append('C(%d,%d)'%(L,n)) 2343 2334 coefSgns.append(sgn) 2344 newNames,newSgns = RBsymChk(sytsym,cubic,coefNames )2335 newNames,newSgns = RBsymChk(sytsym,cubic,coefNames,L) 2345 2336 return newNames,newSgns 2346 2337
Note: See TracChangeset
for help on using the changeset viewer.