Changeset 3282


Ignore:
Timestamp:
Feb 13, 2018 3:31:01 PM (4 years ago)
Author:
vondreele
Message:

proper handling of gray group supersymmetry symbols, fix special position info for modulation waves

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r3278 r3282  
    16491649            sop,ssop,icent,cent,unit = G2spc.OpsfromStringOps(opr,SGData,SSGData)
    16501650            drxyz = (np.inner(sop[0],atxyz)+sop[1])*icent+cent+np.array(unit)
    1651             sdet,ssdet,dtau,dT,tauT = G2spc.getTauT(tau,sop,ssop,drxyz,modul)
     1651            tauT = G2spc.getTauT(tau,sop,ssop,drxyz,modul)[-1]
    16521652            tauT *= icent       #invert wave on -1
    16531653            wave = np.zeros(3)
  • trunk/GSASIIphsGUI.py

    r3281 r3282  
    46784678                    item = Indx[Obj.GetId()]
    46794679                    nt = numVals[Stype]
    4680                     if not len(atm[-1]['SS1'][item]) and waveTyp in ['ZigZag','Block','Crenel','SawTooth']:
    4681                         nt = numVals[waveTyp]
     4680                    if not len(atm[-1]['SS1'][item]):
     4681                        if waveTyp in ['ZigZag','Block','Crenel','SawTooth']:
     4682                            nt = numVals[waveTyp]                       
     4683                        atm[-1]['SS1'][item] = [0,]
     4684                        atm[-1]['SS1'][item][0] = waveType.GetValue()
    46824685                    atm[-1]['SS1'][item].append([[0.0 for i in range(nt)],False])
    46834686                    wx.CallAfter(RepaintAtomInfo,G2frame.waveData.GetScrollPos(wx.VERTICAL))
  • trunk/GSASIIspc.py

    r3276 r3282  
    13761376    elif SGData['SGLaue'] in ['3R','3mR']:
    13771377        return '(3+1) superlattices not defined for rhombohedral settings - use hexagonal setting',None
     1378    if SGData['SGGray'] and SSymbol[-1] == 's':
     1379        SSymbol = SSymbol[:-1]
    13781380    try:
    13791381        modsym,gensym = splitSSsym(SSymbol)
     
    14491451            '31m':['','t00','0ss'],
    14501452            '6/m':['','h','t','s','s0'],
    1451             '6/mmm':['h00','t00','s00','ss0','0ss','s0s','s0s0','00ss','s00s']}
     1453            '6/mmm':['','h00','t00','s00','ss0','0ss','s0s','s0s0','00ss','s00s']}
    14521454    laue = SGData['SGLaue']
    14531455    SSChoice = []
     
    21272129    dT = 1.0
    21282130    if np.any(dtau%.5):
    2129         dT = np.tan(np.pi*np.sum(dtau%.5))
     2131        sumdtau = np.sum(dtau%.5)
     2132        dT = 0.
     2133        if np.abs(sumdtau-.5) > 1.e-4:
     2134            dT = np.tan(np.pi*sumdtau)
    21302135    tauT = np.inner(mst,XYZ-sop[1])+epsinv*(tau-ssop[1][3]+phase)
    21312136    return sdet,ssdet,dtau,dT,tauT
     
    22302235                    if np.any(dtau%.5) and ('1/2' in SSGData['modSymb'] or '1' in SSGData['modSymb']):
    22312236                        fsc = [1,1]
    2232                         CSI = [[[1,0],[1,0]],[[1.,0.],[1/dT,0.]]]
     2237                        if dT:
     2238                            CSI = [[[1,0],[1,0]],[[1.,0.],[1/dT,0.]]]
     2239                        else:
     2240                            CSI = [[[1,0],[0,0]],[[1.,0.],[0.,0.]]]
    22332241                        FSC = np.zeros(2,dtype='i')
    22342242                        return CSI,dF,dFTP
     
    23032311                        xsc[3:6] = 0
    23042312                        CSI = [[[1,0,0],[2,0,0],[3,0,0], [1,0,0],[2,0,0],[3,0,0]],
    2305                             [[1.,0.,0.],[1.,0.,0.],[1.,0.,0.], [1.,0.,0.],[1.,0.,0.],[1.,0.,0.]]]                   
    2306                         if '(x)' in siteSym:
    2307                             CSI[1][3:] = [1./dT,0.,0.],[-dT,0.,0.],[-dT,0.,0.]
    2308                             if 'm' in siteSym and len(SdIndx) == 1:
    2309                                 CSI[1][3:] = [-dT,0.,0.],[1./dT,0.,0.],[1./dT,0.,0.]
    2310                         elif '(y)' in siteSym:
    2311                             CSI[1][3:] = [-dT,0.,0.],[1./dT,0.,0.],[-dT,0.,0.]
    2312                             if 'm' in siteSym and len(SdIndx) == 1:
    2313                                 CSI[1][3:] = [1./dT,0.,0.],[-dT,0.,0.],[1./dT,0.,0.]
    2314                         elif '(z)' in siteSym:
    2315                             CSI[1][3:] = [-dT,0.,0.],[-dT,0.,0.],[1./dT,0.,0.]
    2316                             if 'm' in siteSym and len(SdIndx) == 1:
    2317                                 CSI[1][3:] = [1./dT,0.,0.],[1./dT,0.,0.],[-dT,0.,0.]
     2313                            [[1.,0.,0.],[1.,0.,0.],[1.,0.,0.], [1.,0.,0.],[1.,0.,0.],[1.,0.,0.]]]
     2314                        if dT:
     2315                            if '(x)' in siteSym:
     2316                                CSI[1][3:] = [1./dT,0.,0.],[-dT,0.,0.],[-dT,0.,0.]
     2317                                if 'm' in siteSym and len(SdIndx) == 1:
     2318                                    CSI[1][3:] = [-dT,0.,0.],[1./dT,0.,0.],[1./dT,0.,0.]
     2319                            elif '(y)' in siteSym:
     2320                                CSI[1][3:] = [-dT,0.,0.],[1./dT,0.,0.],[-dT,0.,0.]
     2321                                if 'm' in siteSym and len(SdIndx) == 1:
     2322                                    CSI[1][3:] = [1./dT,0.,0.],[-dT,0.,0.],[1./dT,0.,0.]
     2323                            elif '(z)' in siteSym:
     2324                                CSI[1][3:] = [-dT,0.,0.],[-dT,0.,0.],[1./dT,0.,0.]
     2325                                if 'm' in siteSym and len(SdIndx) == 1:
     2326                                    CSI[1][3:] = [1./dT,0.,0.],[1./dT,0.,0.],[-dT,0.,0.]
     2327                        else:
     2328                            CSI[1][3:] = [0.,0.,0.],[0.,0.,0.],[0.,0.,0.]
    23182329                    if '4/mmm' in laue:
    23192330                        if np.any(dtau%.5) and '1/2' in SSGData['modSymb']:
    23202331                            if '(xy)' in siteSym:
    23212332                                CSI[0] = [[1,0,0],[1,0,0],[2,0,0], [1,0,0],[1,0,0],[2,0,0]]
    2322                                 CSI[1][3:] = [[1./dT,0.,0.],[1./dT,0.,0.],[-dT,0.,0.]]
     2333                                if dT:
     2334                                    CSI[1][3:] = [[1./dT,0.,0.],[1./dT,0.,0.],[-dT,0.,0.]]
     2335                                else:
     2336                                    CSI[1][3:] = [0.,0.,0.],[0.,0.,0.],[0.,0.,0.]
    23232337                        if '(xy)' in siteSym or '(+-0)' in siteSym:
    23242338                            mul = 1
     
    23602374            USC = np.ones(12,dtype='i')
    23612375            dUTP = []
     2376            dtau = 0.
    23622377            for i in SdIndx:
    23632378                sop = Sop[i]
     
    23732388                dUTP.append(dUT)
    23742389                if np.any(dtau%.5) and ('1/2' in SSGData['modSymb'] or '1' in SSGData['modSymb']):
    2375                     CSI = [[[1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0],[6,0,0],
    2376                     [1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0],[6,0,0]],
    2377                     [[1.,0.,0.],[1.,0.,0.],[1.,0.,0.], [1.,0.,0.],[1.,0.,0.],[1.,0.,0.],
    2378                     [1./dT,0.,0.],[1./dT,0.,0.],[1./dT,0.,0.], [1.,0.,0.],[1.,0.,0.],[1.,0.,0.]]]
    2379                     if 'mm2(x)' in siteSym:
     2390                    if dT:
     2391                        CSI = [[[1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0],[6,0,0],
     2392                        [1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0],[6,0,0]],
     2393                        [[1.,0.,0.],[1.,0.,0.],[1.,0.,0.], [1.,0.,0.],[1.,0.,0.],[1.,0.,0.],
     2394                        [1./dT,0.,0.],[1./dT,0.,0.],[1./dT,0.,0.], [1.,0.,0.],[1.,0.,0.],[1.,0.,0.]]]
     2395                    else:
     2396                        CSI = [[[1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0],[6,0,0],
     2397                        [1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0],[6,0,0]],
     2398                        [[1.,0.,0.],[1.,0.,0.],[1.,0.,0.], [1.,0.,0.],[1.,0.,0.],[1.,0.,0.],
     2399                        [0.,0.,0.],[0.,0.,0.],[0.,0.,0.], [1.,0.,0.],[1.,0.,0.],[1.,0.,0.]]]
     2400                    if 'mm2(x)' in siteSym and dT:
    23802401                        CSI[1][9:] = [0.,0.,0.],[-dT,0.,0.],[0.,0.,0.]
    23812402                        USC = [1,1,1,0,1,0,1,1,1,0,1,0]
    2382                     elif '(xy)' in siteSym:
     2403                    elif '(xy)' in siteSym and dT:
    23832404                        CSI[0] = [[1,0,0],[1,0,0],[2,0,0],[3,0,0],[4,0,0],[4,0,0],
    23842405                            [1,0,0],[1,0,0],[2,0,0],[3,0,0],[4,0,0],[4,0,0]]
    23852406                        CSI[1][9:] = [[1./dT,0.,0.],[-dT,0.,0.],[-dT,0.,0.]]
    23862407                        USC = [1,1,1,1,1,1,1,1,1,1,1,1]                             
    2387                     elif '(x)' in siteSym:
     2408                    elif '(x)' in siteSym and dT:
    23882409                        CSI[1][9:] = [-dT,0.,0.],[-dT,0.,0.],[1./dT,0.,0.]
    2389                     elif '(y)' in siteSym:
     2410                    elif '(y)' in siteSym and dT:
    23902411                        CSI[1][9:] = [-dT,0.,0.],[1./dT,0.,0.],[-dT,0.,0.]
    2391                     elif '(z)' in siteSym:
     2412                    elif '(z)' in siteSym and dT:
    23922413                        CSI[1][9:] = [1./dT,0.,0.],[-dT,0.,0.],[-dT,0.,0.]
    23932414                    for i in range(6):
     
    24522473   
    24532474    def DoMag():
    2454         CSI = [[1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0],[6,0,0]]
     2475        CSI = [[1,0,0],[2,0,0],[3,0,0], [4,0,0],[5,0,0],[6,0,0]],[6*[1.,0.,0.]]
     2476        if siteSym == '1':
     2477            CSI = [[1,0,0],[2,0,0],[3,0,0], [4,0,0],[5,0,0],[6,0,0]],[6*[1.,0.,0.]]
     2478        elif siteSym == '-1':
     2479            CSI = [[1,0,0],[2,0,0],[3,0,0], [0,0,0],[0,0,0],[0,0,0]],[3*[1.,0.,0.],3*[0.,0.,0.]]
    24552480        return CSI,None,None
    24562481       
Note: See TracChangeset for help on using the changeset viewer.