Changeset 3795 for trunk/GSASIIspc.py


Ignore:
Timestamp:
Jan 24, 2019 12:14:33 PM (3 years ago)
Author:
vondreele
Message:

fix space group & incommensurate space group displays for mag. incomensurate cases
disable cell refine in Unit Cell List if no peaks
another shot at incommensurate mag. structure factor calc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIspc.py

    r3768 r3795  
    845845    elif 'R' in SGData['SGLatt']:
    846846        BNSsym = {'R_I':[0,0,.5]}
     847       
     848    if SGData['SGGray']:
     849        for bns in BNSsym:
     850            BNSsym[bns].append(0.5)
     851           
    847852    return UsymOp,OprFlg,BNSsym
    848853
     
    878883        return Tmat
    879884    SGData['SGSpin'].append(-1)
    880     C = SGCen+A
     885    C = SGCen+A[:3]
    881886    SGData['SGCen'] = np.vstack((SGCen,C))%1.
    882887    return Tmat
     
    12781283    sgOp = [M for M,T in SGData['SGOps']]
    12791284    oprName = [GetOprPtrName(str(irtx)) for irtx in PackRot(SGData['SGOps'])]
    1280     if SGData['SGInv'] and not SGData['SGFixed'] and not SGData['SGGray']:
     1285    if SGData['SGInv'] and not SGData['SGFixed']:
    12811286        Nsym *= 2
    12821287        sgOp += [-M for M,T in SGData['SGOps']]
     
    12951300        GenFlg = SGData.get('GenFlg',[0])
    12961301        Ngen = len(SGData['SGGen'])
    1297     #    print ('GenFlg:',SGData['GenFlg'])
    1298     #    print ('GenSym:',SGData['GenSym'])
    12991302        Nfl = len(GenFlg)
    13001303        for ieqv in range(Nsym):
     
    13021305                if SGData['SGGen'][ieqv%Ngen] & GenFlg[iunq]:
    13031306                    SpnFlp[ieqv] *= FlpSpn[iunq]
    1304     #        print ('\nMagSpGrp:',SGData['MagSpGrp'],Ncv)
    1305     #        print ('FlpSpn:',Nfl,FlpSpn)
    13061307        for incv in range(Ncv):
    13071308            if incv:
     
    13141315    MagMom = SpnFlp*np.array(Ncv*detM)      #duplicate for no. centerings
    13151316    SGData['MagMom'] = MagMom
    1316 #        print ('SgOps:',OprNames)
    1317 #        print ('SGGen:',SGData['SGGen'])
    1318 #        print ('SpnFlp:',SpnFlp)
    1319 #        print ('MagMom:',MagMom)
    13201317    return OprNames,SpnFlp
    13211318   
     
    16411638    elif SGData['SGLaue'] in ['3R','3mR']:
    16421639        return '(3+1) superlattices not defined for rhombohedral settings - use hexagonal setting',None
    1643 #    if SGData['SGGray'] and SSymbol[-1] == 's':
    1644 #        SSymbol = SSymbol[:-1]
    16451640    try:
    16461641        modsym,gensym = splitSSsym(SSymbol)
     
    16631658    if SGData['SGGray']:
    16641659        SSgSpc = SSgSpc.replace('('," 1'(")
    1665 #        SSgSpc += 's'
    16661660    SSGData = {'SSpGrp':SSgSpc,'modQ':modQ,'modSymb':modsym,'SSGKl':SSGKl}
    16671661    SSCen = np.zeros((len(SGData['SGCen']),4))
    16681662    for icen,cen in enumerate(SGData['SGCen']):
    16691663        SSCen[icen,0:3] = cen
    1670     SSCen[0] = np.zeros(4)
    16711664    SSGData['SSGCen'] = SSCen
    16721665    SSGData['SSGOps'] = []
     
    18331826        Mult = len(SSGData['SSGCen'])*len(SSGData['SSGOps'])
    18341827    SSsymb = SSGData['SSpGrp']
     1828    if 'BNSlattsym' in SGData and '_' in SGData['BNSlattsym'][0]:
     1829        SSsymb = SGData['BNSlattsym'][0]+SSsymb[1:]
    18351830    if SGData.get('SGGray',False):
    18361831        if SGData.get('SGFixed',False): Mult //= 2
     
    18741869        for i,Opr in enumerate(SSGData['SSGOps']):
    18751870            IOpr = [-Opr[0],-Opr[1]]
    1876             SSGTable.append('(%2d) %s'%(i+1,SSMT2text(IOpr)))       
    1877     if SGData['SGGray']:
    1878         SSGTable.append("     for 1'")
    1879         for i,Opr in enumerate(SSGData['SSGOps']):
    1880             Opr2 = [Opr[0],Opr[1]+np.array([0,0,0,.5])]
    1881             SSGTable.append('(%2d) %s'%(i+1,SSMT2text(Opr2)))
     1871            SSGTable.append('(%2d) %s'%(i+1+len(SSGData['SSGOps']),SSMT2text(IOpr)))       
    18821872    return SSGText,SSGTable
    18831873   
     
    35423532    iAx = abs(Ax[0])
    35433533    nA = iAx%100-1
    3544     nC = len(SGOps)*(iAx//100)
     3534    if SGData['SGInv'] and not SGData['SGFixed']:
     3535        nC = 2*len(SGOps)*(iAx//100)
     3536    else:
     3537        nC = len(SGOps)*(iAx//100)
    35453538    NA = nA
    35463539    if Ax[0] < 0:
Note: See TracChangeset for help on using the changeset viewer.