Changeset 4616 for trunk


Ignore:
Timestamp:
Oct 22, 2020 10:49:02 AM (13 months ago)
Author:
vondreele
Message:

fix a bunch of escape sequence '\' to '
' in G2obj
Add display of sitesym, mult for RB Model display after RB has been added. Will respond to origin shifts.
Change atom frac to be origin mult/max mult 9i.e. for a general position) when RB is added to structure
Fix plotting bug for balls & sticks default - BondRadii? needed to be global

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIobj.py

    r4615 r4616  
    1616as provides misc. support routines.
    1717
    18 .. Next command allows \AA to be used in HTML
     18.. Next command allows \\AA to be used in HTML
    1919
    2020.. only:: html
     
    14541454    (from James Hester).
    14551455    The open routine gets confused with DOS names that begin with a letter and colon
    1456     "C:\dir\" so this routine will try to open the passed name as a file and if that
     1456    "C:\\dir\" so this routine will try to open the passed name as a file and if that
    14571457    fails, try it as a URL
    14581458
     
    18371837        'Displace([XY])' : ('Debye-Scherrer sample displacement \\1',0.1),
    18381838        'Lam' : ('Wavelength',1e-6),
    1839         'I\(L2\)\/I\(L1\)' : ('Ka2/Ka1 intensity ratio',0.001),
    1840         'Polariz\.' : ('Polarization correction',1e-3),
     1839        'I\\(L2\\)\\/I\\(L1\\)' : ('Ka2/Ka1 intensity ratio',0.001),
     1840        'Polariz\\.' : ('Polarization correction',1e-3),
    18411841        'SH/L' : ('FCJ peak asymmetry correction',1e-4),
    18421842        '([UVW])$' : ('Gaussian instrument broadening \\1',1e-5),
     
    19121912        'sig-[012q]':'TOF profile term',
    19131913        'dif[ABC]':'TOF to d-space calibration',
    1914         'C\([0-9]*,[0-9]*\)' : 'spherical harmonics preferred orientation coef.',
     1914        'C\\([0-9]*,[0-9]*\\)' : 'spherical harmonics preferred orientation coef.',
    19151915        }.items():
    19161916        if len(value) == 2:
     
    20252025
    20262026    :param str varname: a G2 variable name containing a wildcard
    2027       (such as \*::var)
     2027      (such as \\*::var)
    20282028    :param list varlist: the list of all variable names used in
    20292029      the current project
  • trunk/GSASIIphsGUI.py

    r4615 r4616  
    11191119    Amat,Bmat = G2lat.cell2AB(generalData['Cell'][1:7])
    11201120    SGData = generalData['SGData']
    1121     deftype = G2obj.validateAtomDrawType(
    1122         GSASIIpath.GetConfigValue('DrawAtoms_default'),generalData)
     1121    deftype = G2obj.validateAtomDrawType(GSASIIpath.GetConfigValue('DrawAtoms_default'),generalData)
    11231122    if generalData['Type'] in ['nuclear','faulted',]:
    11241123        if oldatom:
     
    99339932                    data['Atoms'][AtLookUp[Id]][cx:cx+3] = newXYZ[i]
    99349933                data['Drawing']['Atoms'] = []
     9934                Sytsym,Mult = G2spc.SytSym(rbObj['Orig'][0],data['General']['SGData'])[:2]
     9935                sytsymtxt.SetLabel('Origin site symmetry: %s, multiplicity: %d '%(Sytsym,Mult))
    99359936                UpdateDrawAtoms(atomStyle)
    99369937                G2plt.PlotStructure(G2frame,data)
     
    99899990            Qcheck.SetValue(RBObj['Orient'][1])
    99909991            topSizer.Add(Qcheck,0,WACV)
     9992            Sytsym,Mult = G2spc.SytSym(rbObj['Orig'][0],data['General']['SGData'])[:2]
     9993            sytsymtxt = wx.StaticText(RigidBodies,label='Origin site symmetry: %s, multiplicity: %d '%(Sytsym,Mult))
     9994            topSizer.Add(sytsymtxt)
    99919995            return topSizer
    99929996                         
     
    1002910033            symAxis = RBObj.get('symAxis')
    1003010034            if np.any(symAxis):
    10031                 if symAxis[0] == symAxis[1] == symAxis[2]:
     10035                if np.all(symAxis):
    1003210036                    lbl = 'x+y+z'
    10033                 elif symAxis[0] == symAxis[1] != symAxis[2]:
     10037                elif np.all(symAxis[:2]):
    1003410038                    lbl = 'x+y'
    1003510039                elif symAxis[0]:
     
    1035810362                        return
    1035910363                    dlg.Destroy()
    10360                 Mult = G2spc.SytSym(rbObj['Orig'][0],data['General']['SGData'])[1]
     10364                SGData = data['General']['SGData']
     10365                maxMult = len(SGData['SGOps'])*len(SGData['SGCen'])
     10366                if SGData['SGInv']: maxMult *= 2
     10367                Mult = G2spc.SytSym(rbObj['Orig'][0],SGData)[1]
    1036110368                Ids = []
    1036210369                updateNeeded = False
     
    1036810375                        x,y,z = line[2:5]
    1036910376                        AtomAdd(x,y,z,El=elem,Name=lbl,update=False)
    10370                         atomData[nextNum][6] = Mult/atomData[nextNum][8]
     10377                        atomData[nextNum][6] = Mult/maxMult
    1037110378                        Ids.append(atomData[nextNum][-1])
    1037210379                        updateNeeded = True
    1037310380                    else:
    1037410381                        atomData[line[5]][cx:cx+3] = line[2:5]
    10375                         atomData[line[5]][6] = Mult/atomData[line[5]][8]
     10382                        atomData[line[5]][6] = Mult/maxMult
    1037610383                        Ids.append(line[11])
    1037710384                if updateNeeded:
  • trunk/GSASIIplot.py

    r4611 r4616  
    94429442    # PlotStructure starts here
    94439443    global mcsaXYZ,mcsaTypes,mcsaBonds,txID,contourSet,Zslice
    9444     global cell, Vol, Amat, Bmat, A4mat, B4mat
     9444    global cell, Vol, Amat, Bmat, A4mat, B4mat, BondRadii
    94459445    txID = 0
    94469446    ForthirdPI = 4.0*math.pi/3.0
Note: See TracChangeset for help on using the changeset viewer.