Ignore:
Timestamp:
Dec 8, 2016 1:11:10 PM (5 years ago)
Author:
vondreele
Message:

fix to export CIF sym. op. problem
use ValidatedTxtctrl? for all values in PDF Controls, Background & RDFDialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_CIF.py

    r2543 r2567  
    3535import GSASIIgrid as G2gd
    3636import GSASIIctrls as G2G
    37 import GSASIIstrIO as G2stIO
    3837import GSASIImath as G2mth
    39 import GSASIIlattice as G2lat
    4038import GSASIIspc as G2spc
    41 import GSASIIphsGUI as G2pg
    4239import GSASIIstrMain as G2stMn
    43 import GSASIIctrls as G2G
    4440
    4541DEBUG = False    #True to skip printing of reflection/powder profile lists
     
    751747            DisAglData['OrigAtoms'] = xyz
    752748            DisAglData['TargAtoms'] = xyz
    753             SymOpList,offsetList,symOpList,G2oprList = G2spc.AllOps(
     749            SymOpList,offsetList,symOpList,G2oprList,G2opcodes = G2spc.AllOps(
    754750                generalData['SGData'])
    755751
    756             xpandSGdata = generalData['SGData'].copy()
    757             xpandSGdata.update({'SGOps':symOpList,
    758                                 'SGInv':False,
    759                                 'SGLatt':'P',
    760                                 'SGCen':np.array([[0, 0, 0]]),})
    761             DisAglData['SGData'] = xpandSGdata
     752#            xpandSGdata = generalData['SGData'].copy()
     753#            xpandSGdata.update({'SGOps':symOpList,
     754#                                'SGInv':False,
     755#                                'SGLatt':'P',
     756#                                'SGCen':np.array([[0, 0, 0]]),})
     757#            DisAglData['SGData'] = xpandSGdata
     758            DisAglData['SGData'] = generalData['SGData'].copy()
    762759
    763760            DisAglData['Cell'] = generalData['Cell'][1:] #+ volume
     
    790787                    line += PutInCol(G2mth.ValEsd(D[3],sig,True),10)
    791788                    line += "  1_555 "
    792                     line += " {:3d}_".format(D[2])
     789                    line += " {:3d}_".format(G2opcodes.index(D[2])+1)
    793790                    for d in D[1]:
    794791                        line += "{:1d}".format(d+5)
     
    819816                    if sig == 0: sig = -0.009
    820817                    line += PutInCol(G2mth.ValEsd(tup[0],sig,True),10)
    821                     line += " {:3d}_".format(Dj[2])
     818                    line += " {:3d}_".format(G2opcodes.index(Dj[2])+1)
    822819                    for d in Dj[1]:
    823820                        line += "{:1d}".format(d+5)
    824821                    line += "  1_555 "
    825                     line += " {:3d}_".format(Dk[2])
     822                    line += " {:3d}_".format(G2opcodes.index(Dk[2])+1)
    826823                    for d in Dk[1]:
    827824                        line += "{:1d}".format(d+5)
     
    861858
    862859            # generate symmetry operations including centering and center of symmetry
    863             SymOpList,offsetList,symOpList,G2oprList = G2spc.AllOps(
     860            SymOpList,offsetList,symOpList,G2oprList,G2opcodes = G2spc.AllOps(
    864861                phasedict['General']['SGData'])
    865862            WriteCIFitem('loop_\n    _space_group_symop_id\n    _space_group_symop_operation_xyz')
     
    12441241                    hklmin[i] = min(hkl,hklmin[i])
    12451242                    s += PutInCol(int(hkl),4)
    1246                 import sys
    12471243                if ref[5] == 0.0:
    12481244                    s += PutInCol(G2mth.ValEsd(ref[8],0),12)
     
    14711467            phasenam = event.GetEventObject().phase
    14721468            phasedict = self.Phases[phasenam]
    1473             SymOpList,offsetList,symOpList,G2oprList = G2spc.AllOps(phasedict['General']['SGData'])
     1469            SymOpList,offsetList,symOpList,G2oprList,G2opcodes = G2spc.AllOps(phasedict['General']['SGData'])
    14741470            generalData = phasedict['General']
    14751471            # create a dict for storing Pub flag for bonds/angles, if needed
     
    15151511            DisAglData['OrigAtoms'] = xyz
    15161512            DisAglData['TargAtoms'] = xyz
    1517             SymOpList,offsetList,symOpList,G2oprList = G2spc.AllOps(
     1513            SymOpList,offsetList,symOpList,G2oprList,G2opcodes = G2spc.AllOps(
    15181514                generalData['SGData'])
    15191515
    1520             xpandSGdata = generalData['SGData'].copy()
    1521             xpandSGdata.update({'SGOps':symOpList,
    1522                                 'SGInv':False,
    1523                                 'SGLatt':'P',
    1524                                 'SGCen':np.array([[0, 0, 0]]),})
    1525             DisAglData['SGData'] = xpandSGdata
     1516#            xpandSGdata = generalData['SGData'].copy()
     1517#            xpandSGdata.update({'SGOps':symOpList,
     1518#                                'SGInv':False,
     1519#                                'SGLatt':'P',
     1520#                                'SGCen':np.array([[0, 0, 0]]),})
     1521#            DisAglData['SGData'] = xpandSGdata
     1522            DisAglData['SGData'] = generalData['SGData'].copy()
    15261523
    15271524            DisAglData['Cell'] = generalData['Cell'][1:] #+ volume
Note: See TracChangeset for help on using the changeset viewer.