Changeset 1531
- Timestamp:
- Oct 21, 2014 12:28:29 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIImath.py
r1513 r1531 188 188 vcov[i1][i2] = covMatrix[varyList.index(name1)][varyList.index(name2)] 189 189 except ValueError: 190 if i1 == i2: 191 vcov[i1][i2] = 1.0 192 else: 193 vcov[i1][i2] = 0.0 190 vcov[i1][i2] = 0.0 191 # if i1 == i2: 192 # vcov[i1][i2] = 1e-20 193 # else: 194 # vcov[i1][i2] = 0.0 194 195 return vcov 195 196 -
trunk/GSASIIspc.py
r1530 r1531 515 515 elif SGData['SGPtGrp'] == '2/m': #OK 516 516 if mod in ['a00','0b0','00g']: 517 return SGData['SSGKl'] 517 return SGData['SSGKl'][:] 518 518 else: 519 519 return [i*-1 for i in SGData['SSGKl']] … … 547 547 def genSSGOps(): 548 548 SSGOps = SSGData['SSGOps'] 549 SSGKl = SGData['SSGKl']550 print 'genQ',genQ551 print 'SSGKl',SSGKl552 549 iFrac = {} 553 550 for i,frac in enumerate(SSGData['modSymb']): 554 551 if frac in ['1/2','1/3','1/4','1/6','1']: 555 552 iFrac[i] = frac 553 print SSymbol 554 print 'SSGKl',SSGKl,'genQ',genQ,'iFrac',iFrac 556 555 # set identity & 1,-1; triclinic 557 556 SSGOps[0][0][3,3] = 1. 557 # expand if centrosymmetric 558 if SGData['SGInv']: 559 SSGOps = SSGOps[:] + [[-1*M,V] for M,V in SSGOps] 558 560 # monoclinic 559 561 if SGData['SGPtGrp'] in ['2','m']: #OK … … 568 570 SSGOps[1][0][3,i] *= -1 569 571 elif SGData['SGPtGrp'] == '2/m': #OK 570 SSGOps[1][0][3,3] = SSGKl[1] 572 SSGOps[1][0][3,3] = -SSGKl[0] 573 SSGOps[3][0][3,3] = -SSGKl[1] 571 574 for i in iFrac: 572 575 SSGOps[1][0][3,i] = -1 … … 587 590 SSGOps[1][0][3,1] = 1 588 591 elif SGData['SGPtGrp'] in ['4/m',]: 589 SSGOps[1][0][3,3] = -SSGKl[1] 592 SSGOps[1][0][3,3] = SSGKl[0] 593 SSGOps[5][0][3,3] = SSGKl[1] 590 594 SSGOps[1][1][3] = genQ[0] 591 595 if '1/2' in SSGData['modSymb']: … … 642 646 SSGOps[11][0][3,3] = -SSGKl[3] 643 647 SSGOps[11][1][3] = genQ[3] 644 if SGData['SGInv']:645 SSGfull = SSGOps[:]646 for M,V in SSGOps:647 Mi = -1*M648 SSGfull.append([Mi,V])649 SSGOps = SSGfull650 648 if SGData['SGPtGrp'] in ['1','-1']: #triclinic - done 651 649 return True,SSGOps … … 660 658 continue 661 659 elif np.allclose(OpC[0][:3,:3],OpD[0][:3,:3]): 662 if np.any([np.allclose(OpC[0][3][:3],cen) for cen in SGData['SGCen']]): 663 # if np.allclose(OpC[0][3],np.zeros(4)): 660 if np.allclose(OpD[0][3],np.zeros(4)): 661 SSGOps[k] = OpC 662 elif np.any([np.allclose(OpC[0][3][:3],cen) for cen in SGData['SGCen']]): #? 664 663 continue 665 elif np.allclose(OpD[0][3],np.zeros(4)):666 SSGOps[k] = OpC667 664 else: 668 print 'OpC',SSMT2text(OpC),'OpD',SSMT2text(OpD) 669 return False,None 665 OpCtxt = SSMT2text(OpC).strip() 666 OpDtxt = SSMT2text(OpD).strip() 667 print 'OpC',OpCtxt,'OpD',OpDtxt 668 return False,OpCtxt+' conflict with '+OpDtxt 670 669 return True,SSGOps 671 670 … … 687 686 Fracs = {'1/2':0.5,'1/3':1./3,'1':1.0,'0':0.,'s':.5,'t':1./3,'q':.25,'h':1./6,'a':0.,'b':0.,'g':0.} 688 687 LaueId = LaueList.index(SGData['SGLaue']) 689 if LaueId in [12,13,]:688 if SGData['SGLaue'] in ['m3','m3m']: 690 689 return '(3+1) superlattices not defined for cubic space groups',None 691 elif LaueId in [5,6,]:690 elif SGData['SGLaue'] in ['3R','3mR']: 692 691 return '(3+1) superlattices not defined for rhombohedral settings - use hexagonal setting',None 693 692 try: … … 704 703 return 'Modulation '+''.join(modsym)+' not consistent with space group '+SGData['SpGrp'],None 705 704 modQ = [Fracs[mod] for mod in modsym] 706 if LaueId in [1,2]: 707 SGData['SSGKl'] = fixMonoOrtho() 705 SSGKl = SGData['SSGKl'][:] 706 if SGData['SGLaue'] in ['2/m','mmm']: 707 SSGKl = fixMonoOrtho() 708 708 genQ = [Fracs[mod] for mod in gensym] 709 if len(gensym) and len(gensym) != len(S GData['SSGKl']):709 if len(gensym) and len(gensym) != len(SSGKl): 710 710 return 'Wrong number of items in generator symbol '+''.join(gensym),None 711 711 genQ = getTau() … … 722 722 T[:3] = op[1] 723 723 SSGData['SSGOps'].append([ssop,T]) 724 E, SSGOps= genSSGOps()724 E,Result = genSSGOps() 725 725 if E: 726 SSGData['SSGOps'] = SSGOps726 SSGData['SSGOps'] = Result 727 727 return None,SSGData 728 728 else: 729 return 'Operator conflict - incorrect superspace symbol',None729 return Result+'\nOperator conflict - incorrect superspace symbol',None 730 730 731 731 def SSGPrint(SGData,SSGData): -
trunk/GSASIIstrMain.py
r1493 r1531 552 552 ShowBanner(DisAglCtls['Name']) 553 553 SGData = DisAglData['SGData'] 554 SGtext = G2spc.SGPrint(SGData)554 SGtext,SGtable = G2spc.SGPrint(SGData) 555 555 for line in SGtext: MyPrint(line) 556 if len(SGtable): 557 for i,item in enumerate(SGtable[::2]): 558 line = ' %s %s'%(item.ljust(30),SGtable[2*i+1].ljust(30)) 559 MyPrint(line) 560 else: 561 MyPrint(' ( 1) %s'%(SGtable[0])) 556 562 Cell = DisAglData['Cell'] 557 563
Note: See TracChangeset
for help on using the changeset viewer.