Changeset 3589


Ignore:
Timestamp:
Sep 8, 2018 1:27:00 PM (3 years ago)
Author:
vondreele
Message:

fixes to Bilbao mag symm stuff - now gets nonstd. sp.grp. correct with right site symm rules

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r3587 r3589  
    376376        bns = MSG[0][2]
    377377    spn = SGData['SGSpin']
    378        
    379    
    380378    if 'ortho' in SGData['SGSys']:
    381         transText = G2spc.Trans2Text(nl.inv(Trans))
     379#        transText = G2spc.Trans2Text(nl.inv(Trans.T))
     380        transText = G2spc.Trans2Text(Trans.T)
    382381        lattSym = ''
    383382        for fld in transText.split(','):
     
    422421    phase['SGData'] = G2spc.SpcGroup(SpGrp)[1]
    423422    BNSlatt = phase['SGData']['SGLatt']
    424     phase['SGData']['SGSpin'] = G2spc.GetSGSpin(phase['SGData'],result[0])
     423    if not result[1]:
     424        phase['SGData']['SGSpin'] = G2spc.GetSGSpin(phase['SGData'],result[0])
    425425    phase['SGData']['GenSym'],phase['SGData']['GenFlg'],BNSsym = G2spc.GetGenSym(phase['SGData'])
    426426    if result[1]:
  • trunk/GSASIIpwdGUI.py

    r3587 r3589  
    30473047            controls[4] = 1
    30483048            controls[5] = (SGData['SGLatt']+SGData['SGLaue']).replace('-','')
     3049            if controls[5][1:] == 'm3': controls[5] += 'm'
     3050            if 'P3' in controls[5] or 'P-3' in controls[5]: controls[5] = 'P6/mmm'
     3051            if 'R' in controls[5]: controls[5] = 'R3-H'
    30493052            controls[6:13] = phase['Cell']
    30503053            controls[13] = SGData['SpGrp']
     
    30803083        controls[5] = (SGData['SGLatt']+SGData['SGLaue']).replace('-','')
    30813084        if controls[5][1:] == 'm3': controls[5] += 'm'
    3082         if 'P3' in controls[5]: controls[5] = 'P6/mmm'
     3085        if 'P3' in controls[5] or 'P-3' in controls[5]: controls[5] = 'P6/mmm'
    30833086        if 'R' in controls[5]: controls[5] = 'R3-H'
    30843087        controls[6:13] = Cell[1:8]
     
    31113114        controls[5] = (SGData['SGLatt']+SGData['SGLaue']).replace('-','')
    31123115        if controls[5][1:] == 'm3': controls[5] += 'm'
     3116        if 'P3' in controls[5] or 'P-3' in controls[5]: controls[5] = 'P6/mmm'
    31133117        if 'R' in controls[5]: controls[5] = 'R3-H'
    31143118        controls[6:13] = Cell[1:8]
     
    34703474                Uvec = np.array(numbs[3::4])
    34713475                Trans = np.array([numbs[:3],numbs[4:7],numbs[8:11]]).T         #Bilbao gives transpose
    3472                 invTrans = nl.inv(Trans)
    34733476                phase = G2lat.makeBilbaoPhase(result[:2],Uvec,Trans)
    3474                 phase['Cell'] = G2lat.TransformCell(controls[6:12],Trans)
    3475                 phase['aType'] = atype
    3476                 for matm in magAtms:    #TODO: this is a shortcut - atoms don't include all possible after transformation
    3477                     xyz = G2lat.TransformXYZ(matm[3:6]-Uvec,invTrans.T,np.zeros(3))%1.
    3478                     SytSym,Mul,Nop,dupDir = G2spc.SytSym(xyz,phase['SGData'])
    3479                     CSI = G2spc.GetCSpqinel(phase['SGData']['SpnFlp'],dupDir)
    3480                     if any(CSI[0]): phase['Keep'] = True
     3477
    34813478                RVT = None
    34823479                if keepaxes:
    34833480                    RVT = G2lat.FindNonstandard(phase)
    3484                 if RVT is None:
    3485                     magcells.append(phase)
    3486                 else:
    3487                     Nresult,NUvec,NTrans = RVT
    3488                     newphase = G2lat.makeBilbaoPhase(Nresult,NUvec,NTrans)
    3489                     newphase['Cell'] = G2lat.TransformCell(controls[6:12],NTrans)   
    3490                     magcells.append(newphase)
     3481                if RVT is not None:
     3482                    result,Uvec,Trans = RVT
     3483                invTrans = nl.inv(Trans)
     3484                phase = G2lat.makeBilbaoPhase(result,Uvec,Trans)
     3485                phase['Cell'] = G2lat.TransformCell(controls[6:12],Trans)   
     3486                phase['aType'] = atype
     3487                for matm in magAtms:
     3488                    xyzs = G2spc.GenAtom(matm[3:6],SGData,False,Move=True)
     3489                    for x in xyzs:
     3490                        xyz = G2lat.TransformXYZ(x[0]-Uvec,invTrans.T,np.zeros(3))%1.
     3491                        SytSym,Mul,Nop,dupDir = G2spc.SytSym(xyz,phase['SGData'])
     3492                        CSI = G2spc.GetCSpqinel(phase['SGData']['SpnFlp'],dupDir)
     3493                        if any(CSI[0]):     #found one - can quit looking
     3494                            phase['Keep'] = True
     3495                            break
     3496                    if phase['Keep']:   #found one
     3497                        break
     3498                magcells.append(phase)
    34913499            magcells[0]['Use'] = True
    34923500            SGData = magcells[0]['SGData']
  • trunk/GSASIIspc.py

    r3587 r3589  
    861861            SGData['SGSpin'].append(-1)
    862862    elif '_S' in BNS:
    863         SGData['SGSpin'] += [1,1,1,]
     863        SGData['SGSpin'][-1] = -1
     864        SGData['SGSpin'] += [-1,-1,-1,]
    864865        Tmat *= 2.0
    865866    else:
    866867        return Tmat
    867868    SGData['SGSpin'].append(-1)
    868     if 'P' not in BNS:
    869         SGData['SGSpin'].append(-1)
    870869    C = SGCen+A
    871870    SGData['SGCen'] = np.vstack((SGCen,C))%1.
Note: See TracChangeset for help on using the changeset viewer.