Changeset 4888 for trunk


Ignore:
Timestamp:
Apr 22, 2021 3:21:03 PM (5 months ago)
Author:
vondreele
Message:

define Uani as 1/3 trace of diagonalized U matrix in export cif

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4875 r4888  
    7878import GSASIIrestrGUI as G2restG
    7979import GSASIIobj as G2obj
    80 #import GSASIIexprGUI as G2exG
    8180import GSASIIlog as log
    8281import GSASIIctrlGUI as G2G
  • trunk/exports/G2export_CIF.py

    r4886 r4888  
    5656import GSASIImath as G2mth
    5757import GSASIIspc as G2spc
     58import GSASIIlattice as G2lat
    5859import GSASIIstrMain as G2stMn
    5960import GSASIIstrIO as G2strIO       
     
    105106    General = phasedict['General']
    106107    cx,ct,cs,cia = General['AtomPtrs']
     108    GS = G2lat.cell2GS(General['Cell'][1:7])
     109    Amat = G2lat.cell2AB(General['Cell'][1:7])[0]
    107110    Atoms = phasedict['Atoms']
    108111    cfrac = cx+3
     
    152155            adp = 'Uani '
    153156            naniso += 1
    154             # compute Uequiv crudely
    155             # correct: Defined as "1/3 trace of diagonalized U matrix".
    156             # SEE cell2GS & Uij2Ueqv to GSASIIlattice. Former is needed to make the GS matrix used by the latter.
    157             t = 0.0
     157            t = G2lat.Uij2Ueqv(at[cia+2:cia+8],GS,Amat)[0]
    158158            for j in (2,3,4):
    159159                var = pfx+varnames[cia+j]+":"+str(i)
    160                 t += parmDict.get(var,at[cia+j])
    161160        for j in (cx,cx+1,cx+2,cx+3,cia,cia+1):
    162161            if j in (cx,cx+1,cx+2):
     
    165164            else:
    166165                dig = 10
    167                 sigdig = -0.009
     166                sigdig = -0.0009
    168167            if j == cia:
    169168                s += adp
     
    174173                    dvar = var
    175174                if j == cia+1 and adp == 'Uani ':
    176                     val = t/3.
    177175                    sig = sigdig
     176                    val = t
    178177                else:
    179178                    #print var,(var in parmDict),(var in sigDict)
     
    623622        for h in phasedict['Histograms']:
    624623            if not phasedict['Histograms'][h]['Use']: continue
     624            if 'Flack' in phasedict['Histograms'][h].keys():       #single crystal data
     625                return False
    625626            T = self.Histograms[h]['Sample Parameters']['Temperature']
    626627            if np.any(abs(np.array(phasedict['Histograms'][h]['HStrain'][0])) > 1e-8):
     
    653654        for h in phasedict['Histograms']:
    654655            if not phasedict['Histograms'][h]['Use']: continue
     656            if 'Flack' in phasedict['Histograms'][h].keys():       #single crystal data
     657                return (300,None)
    655658            T = self.Histograms[h]['Sample Parameters']['Temperature']
    656659            if np.any(abs(np.array(phasedict['Histograms'][h]['HStrain'][0])) > 1e-8):
Note: See TracChangeset for help on using the changeset viewer.