Ignore:
Timestamp:
Oct 22, 2018 8:58:53 AM (3 years ago)
Author:
vondreele
Message:

install new use of Bilbao site - call SUBGROUPS for making subgroup phase selections from parent structure
some modifications to mag subgroup stuff to accommodate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r3685 r3686  
    389389    Uvec = Phase['Uvec']
    390390    SGData = Phase['SGData']
    391     MSG = SGData['MagSpGrp'].split(' ',1)
     391    MSG = SGData.get('MagSpGrp',SGData['SpGrp']).split(' ',1)
    392392    MSG[0] += ' '
    393393    bns = ''
    394394    if '_' in MSG[0]:
    395395        bns = MSG[0][2]
    396     spn = SGData['SGSpin']
     396    spn = SGData.get('SGSpin',[])
    397397    if 'ortho' in SGData['SGSys']:
    398398        lattSym = G2spc.getlattSym(Trans)
    399399        SpGrp = SGData['SpGrp']
    400400        NTrans = np.inner(Mats[lattSym].T,Trans.T)        #ok
    401         spn[1:4] = np.inner(np.abs(nl.inv(Mats[lattSym])),spn[1:4])         #ok
     401        if len(spn): spn[1:4] = np.inner(np.abs(nl.inv(Mats[lattSym])),spn[1:4])         #ok
    402402        SGsym = G2spc.getlattSym(nl.inv(Mats[lattSym]))
    403403       
     
    414414                Bns = BNS[bns][lattSym]
    415415                NSG[0] += '_'+Bns+' '
    416             else:
     416            elif len(spn):
    417417                for ifld in [1,2,3]:
    418418                    if spn[ifld] < 0:
     
    450450    return None
    451451       
    452 def makeBilbaoPhase(result,uvec,trans):
     452def makeBilbaoPhase(result,uvec,trans,ifMag=False):
    453453    phase = {}
    454454    phase['Name'] = result[0].strip()
     
    461461    SpGrp = G2spc.StandardizeSpcName(SpGp)
    462462    phase['SGData'] = G2spc.SpcGroup(SpGrp)[1]
    463     BNSlatt = phase['SGData']['SGLatt']
    464     if not result[1]:
    465         phase['SGData']['SGSpin'] = G2spc.GetSGSpin(phase['SGData'],result[0])
    466     phase['SGData']['GenSym'],phase['SGData']['GenFlg'],BNSsym = G2spc.GetGenSym(phase['SGData'])
    467     if result[1]:
    468         BNSlatt += '_'+result[1]
    469         phase['SGData']['BNSlattsym'] = [BNSlatt,BNSsym[BNSlatt]]
    470         G2spc.ApplyBNSlatt(phase['SGData'],phase['SGData']['BNSlattsym'])
    471     phase['SGData']['SpnFlp'] = G2spc.GenMagOps(phase['SGData'])[1]
    472     phase['SGData']['MagSpGrp'] = G2spc.MagSGSym(phase['SGData'])
     463    if ifMag:
     464        BNSlatt = phase['SGData']['SGLatt']
     465        if not result[1]:
     466            phase['SGData']['SGSpin'] = G2spc.GetSGSpin(phase['SGData'],result[0])
     467        phase['SGData']['GenSym'],phase['SGData']['GenFlg'],BNSsym = G2spc.GetGenSym(phase['SGData'])
     468        if result[1]:
     469            BNSlatt += '_'+result[1]
     470            phase['SGData']['BNSlattsym'] = [BNSlatt,BNSsym[BNSlatt]]
     471            G2spc.ApplyBNSlatt(phase['SGData'],phase['SGData']['BNSlattsym'])
     472        phase['SGData']['SpnFlp'] = G2spc.GenMagOps(phase['SGData'])[1]
     473        phase['SGData']['MagSpGrp'] = G2spc.MagSGSym(phase['SGData'])
    473474    return phase
    474475
Note: See TracChangeset for help on using the changeset viewer.