Changeset 2158


Ignore:
Timestamp:
Feb 26, 2016 12:05:09 PM (6 years ago)
Author:
vondreele
Message:

Add C1 to Bravais lattice tables - future use
some replacement of ibrav lookups with Bravais symbols - for clarity
done in Set Lattice, SetCellValue?, & CellPrint? in G2pwdGUI

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r2156 r2158  
    24612461    UnitCellsId = G2gd.GetPatternTreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List')
    24622462    SPGlist = G2spc.spglist
    2463     bravaisSymb = ['Fm3m','Im3m','Pm3m','R3-H','P6/mmm','I4/mmm',
    2464         'P4/mmm','Fmmm','Immm','Cmmm','Pmmm','C2/m','P2/m','P1']
     2463    bravaisSymb = ['Fm3m','Im3m','Pm3m','R3-H','P6/mmm','I4/mmm','P4/mmm',
     2464        'Fmmm','Immm','Cmmm','Pmmm','C2/m','P2/m','P1']
    24652465    spaceGroups = ['F m 3 m','I m 3 m','P m 3 m','R 3 m','P 6/m m m','I 4/m m m',
    24662466        'P 4/m m m','F m m m','I m m m','C m m m','P m m m','C 2/m','P 2/m','P -1']
     
    24762476    def SetLattice(controls):
    24772477        ibrav = bravaisSymb.index(controls[5])
    2478         if ibrav in [0,1,2]:
     2478        if controls[5] in ['Fm3m','Im3m','Pm3m']:
    24792479            controls[7] = controls[8] = controls[6]
    24802480            controls[9] = controls[10] = controls[11] = 90.
    2481         elif ibrav in [3,4,5,6]:
     2481        elif controls[5] in ['R 3 m','P 6/m m m','I 4/m m m','P 4/m m m']:
    24822482            controls[7] = controls[6]
    24832483            controls[9] = controls[10] = controls[11] = 90.
    2484             if ibrav in [3,4]:
     2484            if controls[5] in ['R3-H','P6/mmm']:
    24852485                controls[11] = 120.
    2486         elif ibrav in [7,8,9,10]:
     2486        elif controls[5] in ['F m m m','I m m m','C m m m','P m m m']:
    24872487            controls[9] = controls[10] = controls[11] = 90.
    2488         elif ibrav in [11,12]:
     2488        elif controls[5] in ['C 2/m','P 2/m']:
    24892489            controls[9] = controls[11] = 90.  # b unique
    24902490        if len(controls) < 13: controls.append(0)
     
    25982598    def SetCellValue(Obj,ObjId,value):
    25992599        ibrav = bravaisSymb.index(controls[5])
    2600         if ibrav in [0,1,2]:
     2600        if controls[5] in ['Fm3m','Im3m','Pm3m']:
    26012601            controls[6] = controls[7] = controls[8] = value
    26022602            controls[9] = controls[10] = controls[11] = 90.0
    26032603            Obj.SetValue("%.5f"%(controls[6]))
    2604         elif ibrav in [3,4,5,6]:
     2604        elif controls[5] in ['R3-H','P6/mmm','I4/mmm','P4/mmm']:
    26052605            if ObjId == 0:
    26062606                controls[6] = controls[7] = value
     
    26102610                Obj.SetValue("%.5f"%(controls[8]))
    26112611            controls[9] = controls[10] = controls[11] = 90.0
    2612             if ibrav in [3,4]:
     2612            if controls[5] in ['R3-H','P6/mmm']:
    26132613                controls[11] = 120.
    2614         elif ibrav in [7,8,9,10]:
     2614        elif controls[5] in ['F m m m','I m m m','C m m m','P m m m']:
    26152615            controls[6+ObjId] = value
    26162616            Obj.SetValue("%.5f"%(controls[6+ObjId]))
    26172617            controls[9] = controls[10] = controls[11] = 90.0
    2618         elif ibrav in [11,12]:
     2618        elif controls[5] in ['C 2/m','P 2/m']:
    26192619            controls[9] = controls[11] = 90.0
    26202620            if ObjId != 3:
     
    26842684        cell = controls[6:12]
    26852685        A = G2lat.cell2A(cell)
    2686         ibrav = bravaisSymb.index(controls[5])
     2686#        ibrav = bravaisSymb.index(controls[5])
    26872687        spc = controls[13]
    26882688        SGData = G2spc.SpcGroup(spc)[1]
     
    27472747            cell = G2lat.A2cell(A)
    27482748            Vol = G2lat.calc_V(A)
    2749             if ibrav in [0,1,2]:
     2749            if ibrav in ['Fm3m','Im3m','Pm3m']:
    27502750                print " %s%10.6f" % ('a =',cell[0])
    2751             elif ibrav in [3,4,5,6]:
     2751            elif ibrav in ['R3-H','P6/mmm','I4/mmm','P4/mmm']:
    27522752                print " %s%10.6f %s%10.6f %s%12.3f" % ('a =',cell[0],' c =',cell[2],' volume =',Vol)
    2753             elif ibrav in [7,8,9,10]:
     2753            elif ibrav in ['P 4/m m m','F m m m','I m m m','C m m m','P m m m']:
    27542754                print " %s%10.6f %s%10.6f %s%10.6f %s%12.3f" % ('a =',cell[0],'b =',cell[1],'c =',cell[2],' volume =',Vol)
    2755             elif ibrav in [11,12]:
     2755            elif ibrav in ['C 2/m','P 2/m']:
    27562756                print " %s%10.6f %s%10.6f %s%10.6f %s%8.3f %s%12.3f" % ('a =',cell[0],'b =',cell[1],'c =',cell[2],'beta =',cell[4],' volume =',Vol)
    27572757            else:
     
    27862786                peaks = [G2indx.IndexPeaks(peaks[0],G2frame.HKL)[1],peaks[1]]   #put peak fit esds back in peaks
    27872787                Lhkl,M20,X20,Aref,Zero = G2indx.refinePeaksZ(peaks[0],wave,ibrav,A,controls[1],controls[0])
    2788         else:   #'T'OF - doesn't seem to work
     2788        else:   
    27892789            if ssopt.get('Use',False):
    27902790                vecFlags = [True if x in ssopt['ssSymb'] else False for x in ['a','b','g']]
     
    28152815        print " %s%10.3f" % ('refinement M20 = ',M20)
    28162816        print ' unindexed lines = ',X20
    2817         cellPrint(ibrav,Aref)
     2817        cellPrint(controls[5],Aref)
    28182818        ip = 4
    28192819        if ssopt.get('Use',False):
     
    30233023    mainSizer.Add((5,5),0)
    30243024   
    3025     mainSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Cell Refinement: '),0,WACV)
     3025    mainSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Cell Test & Refinement: '),0,WACV)
    30263026    mainSizer.Add((5,5),0)
    30273027    littleSizer = wx.BoxSizer(wx.HORIZONTAL)
  • trunk/GSASIIspc.py

    r2136 r2158  
    22252225spglist = {
    22262226    'P1' : ('P 1','P -1',), # 1-2
     2227    'C1' : ('C 1','C -1',),
    22272228    'P2/m': ('P 2','P 21','P m','P a','P c','P n',
    22282229        'P 2/m','P 21/m','P 2/c','P 2/a','P 2/n','P 21/c','P 21/a','P 21/n',), #3-15
     
    23112312#1,2
    23122313    'P 1':['(abg)',],'P -1':['(abg)',],
     2314    'C 1':['(abg)',],'C -1':['(abg)',],
    23132315#monoclinic - done
    23142316#3
Note: See TracChangeset for help on using the changeset viewer.