source: trunk/imports/G2phase.py @ 1762

Last change on this file since 1762 was 1762, checked in by vondreele, 8 years ago

fix exports of reflection csv & txt files to work for CW & TOF data as well as
3 & (3+1) symmetries
fix Det-X --> Det-Y
remove a Yield - caused crash
fix c-unique & a-unique monoclinit cell refinement & display
fix cif readers for phase

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Author Revision URL Id
File size: 23.3 KB
Line 
1# -*- coding: utf-8 -*-
2########### SVN repository information ###################
3# $Date: 2015-03-25 20:42:15 +0000 (Wed, 25 Mar 2015) $
4# $Author: vondreele $
5# $Revision: 1762 $
6# $URL: trunk/imports/G2phase.py $
7# $Id: G2phase.py 1762 2015-03-25 20:42:15Z vondreele $
8########### SVN repository information ###################
9#
10'''
11*Module G2phase: PDB, .EXP & JANA m40,m50*
12-------------------------------------------
13
14A set of short routines to read in phases using routines that were
15previously implemented in GSAS-II: PDB, GSAS .EXP and JANA m40-m50 file formats
16
17'''
18
19import sys
20import os.path
21import math
22import random as ran
23import traceback
24import numpy as np
25import wx
26import GSASIIIO as G2IO
27import GSASIIspc as G2spc
28import GSASIIlattice as G2lat
29import GSASIIpath
30GSASIIpath.SetVersionNumber("$Revision: 1762 $")
31
32class PDB_ReaderClass(G2IO.ImportPhase):
33    'Routine to import Phase information from a PDB file'
34    def __init__(self):
35        super(self.__class__,self).__init__( # fancy way to say ImportPhase.__init__
36            extensionlist=('.pdb','.ent','.PDB','.ENT'),
37            strictExtension=True,
38            formatName = 'PDB',
39            longFormatName = 'Original Protein Data Bank (.pdb file) import'
40            )
41    def ContentsValidator(self, filepointer):
42        '''Taking a stab a validating a PDB file
43        (look for cell & at least one atom)
44        '''
45        for i,l in enumerate(filepointer):
46            if l.startswith('CRYST1'):
47                break
48        else:
49            self.errors = 'no CRYST1 record found'
50            return False
51        for i,l in enumerate(filepointer):
52            if l.startswith('ATOM'):
53                return True
54        self.errors = 'no ATOM records found after CRYST1 record'
55        return False
56
57    def Reader(self,filename,filepointer, ParentFrame=None, **unused):
58        'Read a PDF file using :meth:`ReadPDBPhase`'
59        try:
60            self.Phase = self.ReadPDBPhase(filename, ParentFrame)
61            return True
62        except Exception as detail:
63            self.errors += '\n  '+str(detail)
64            print 'PDB read error:',detail # for testing
65            traceback.print_exc(file=sys.stdout)
66            return False
67       
68    def ReadPDBPhase(self,filename,parent=None):
69        '''Read a phase from a PDB file.
70        '''
71        EightPiSq = 8.*math.pi**2
72        self.errors = 'Error opening file'
73        file = open(filename, 'Ur')
74        Phase = {}
75        Title = ''
76        Compnd = ''
77        Atoms = []
78        A = np.zeros(shape=(3,3))
79        S = file.readline()
80        line = 1
81        SGData = None
82        cell = None
83        while S:
84            self.errors = 'Error reading at line '+str(line)
85            Atom = []
86            if 'TITLE' in S[:5]:
87                Title = S[10:72].strip()
88            elif 'COMPND    ' in S[:10]:
89                Compnd = S[10:72].strip()
90            elif 'CRYST' in S[:5]:
91                abc = S[7:34].split()
92                angles = S[34:55].split()
93                cell=[float(abc[0]),float(abc[1]),float(abc[2]),
94                    float(angles[0]),float(angles[1]),float(angles[2])]
95                Volume = G2lat.calc_V(G2lat.cell2A(cell))
96                AA,AB = G2lat.cell2AB(cell)
97                SpGrp = S[55:65]
98                E,SGData = G2spc.SpcGroup(SpGrp)
99                # space group processing failed, try to look up name in table
100                if E:
101                    SpGrpNorm = G2spc.StandardizeSpcName(SpGrp)
102                    if SpGrpNorm:
103                        E,SGData = G2spc.SpcGroup(SpGrpNorm)
104                while E:
105                    print G2spc.SGErrors(E)
106                    dlg = wx.TextEntryDialog(parent,
107                        SpGrp[:-1]+' is invalid \nN.B.: make sure spaces separate axial fields in symbol',
108                        'ERROR in space group symbol','',style=wx.OK)
109                    if dlg.ShowModal() == wx.ID_OK:
110                        SpGrp = dlg.GetValue()
111                        E,SGData = G2spc.SpcGroup(SpGrp)
112                    else:
113                        SGData = G2IO.SGData # P 1
114                        self.warnings += '\nThe space group was not interpreted and has been set to "P 1".'
115                        self.warnings += "Change this in phase's General tab."           
116                    dlg.Destroy()
117                SGlines = G2spc.SGPrint(SGData)
118                for l in SGlines: print l
119            elif 'SCALE' in S[:5]:
120                V = S[10:41].split()
121                A[int(S[5])-1] = [float(V[0]),float(V[1]),float(V[2])]
122            elif 'ATOM' in S[:4] or 'HETATM' in S[:6]:
123                if not SGData:
124                    self.warnings += '\nThe space group was not read before atoms and has been set to "P 1". '
125                    self.warnings += "Change this in phase's General tab."
126                    SGData = G2IO.SGData # P 1
127                XYZ = [float(S[31:39]),float(S[39:47]),float(S[47:55])]
128                XYZ = np.inner(AB,XYZ)
129                XYZ = np.where(abs(XYZ)<0.00001,0,XYZ)
130                SytSym,Mult = G2spc.SytSym(XYZ,SGData)
131                Uiso = float(S[61:67])/EightPiSq
132                Type = S[12:14].lower()
133                if Type[0] in '123456789':
134                    Type = Type[1:]
135                Atom = [S[22:27].strip(),S[17:20].upper(),S[20:22],
136                    S[12:17].strip(),Type.strip().capitalize(),'',XYZ[0],XYZ[1],XYZ[2],
137                    float(S[55:61]),SytSym,Mult,'I',Uiso,0,0,0,0,0,0]
138                S = file.readline()
139                line += 1
140                if 'ANISOU' in S[:6]:
141                    Uij = S[30:72].split()
142                    Uij = [float(Uij[0])/10000.,float(Uij[1])/10000.,float(Uij[2])/10000.,
143                        float(Uij[3])/10000.,float(Uij[4])/10000.,float(Uij[5])/10000.]
144                    Atom = Atom[:14]+Uij
145                    Atom[12] = 'A'
146                Atom.append(ran.randint(0,sys.maxint))
147                Atoms.append(Atom)
148            S = file.readline()
149            line += 1
150        file.close()
151        self.errors = 'Error after read complete'
152        if Title:
153            PhaseName = Title
154        elif Compnd:
155            PhaseName = Compnd
156        else:
157            PhaseName = 'None'
158        if not SGData:
159            raise self.ImportException("No space group (CRYST entry) found")
160        if not cell:
161            raise self.ImportException("No cell (CRYST entry) found")
162        Phase = G2IO.SetNewPhase(Name=PhaseName,SGData=SGData,cell=cell+[Volume,])
163        Phase['General']['Type'] = 'macromolecular'
164        Phase['General']['AtomPtrs'] = [6,4,10,12]
165        Phase['Atoms'] = Atoms
166        return Phase
167
168class EXP_ReaderClass(G2IO.ImportPhase):
169    'Routine to import Phase information from GSAS .EXP files'
170    def __init__(self):
171        super(self.__class__,self).__init__( # fancy way to say ImportPhase.__init__
172            extensionlist=('.EXP','.exp'),
173            strictExtension=True,
174            formatName = 'GSAS .EXP',
175            longFormatName = 'GSAS Experiment (.EXP file) import'
176            )
177       
178    def ContentsValidator(self, filepointer):
179        'Look for a VERSION tag in 1st line' 
180        if filepointer.read(13) == '     VERSION ':
181            return True
182        self.errors = 'File does not begin with VERSION tag'
183        return False
184
185    def Reader(self,filename,filepointer, ParentFrame=None, **unused):
186        'Read a phase from a GSAS .EXP file using :meth:`ReadEXPPhase`'
187        try:
188            self.Phase = self.ReadEXPPhase(ParentFrame, filepointer)
189            return True
190        except Exception as detail:
191            self.errors += '\n  '+str(detail)
192            print 'GSAS .EXP read error:',detail # for testing
193            traceback.print_exc(file=sys.stdout)
194            return False
195
196    def ReadEXPPhase(self, G2frame,filepointer):
197        '''Read a phase from a GSAS .EXP file.
198        '''
199        shModels = ['cylindrical','none','shear - 2/m','rolling - mmm']
200        textureData = {'Order':0,'Model':'cylindrical','Sample omega':[False,0.0],
201            'Sample chi':[False,0.0],'Sample phi':[False,0.0],'SH Coeff':[False,{}],
202            'SHShow':False,'PFhkl':[0,0,1],'PFxyz':[0,0,1],'PlotType':'Pole figure'}
203        shNcof = 0
204        S = 1
205        NPhas = []
206        Expr = [{},{},{},{},{},{},{},{},{}] # GSAS can have at most 9 phases
207        for line,S in enumerate(filepointer):
208            self.errors = 'Error reading at line '+str(line+1)
209            if 'EXPR NPHAS' in S[:12]:
210                Num = S[12:-1].count('0')
211                NPhas = S[12:-1].split()
212            if 'CRS' in S[:3]:
213                N = int(S[3:4])-1
214                Expr[N][S[:12]] = S[12:-1]
215        PNames = []
216        if not NPhas:
217            raise self.ImportException("No EXPR NPHAS record found")
218        self.errors = 'Error interpreting file'
219        for n,N in enumerate(NPhas):
220            if N != '0':
221                result = n
222                key = 'CRS'+str(n+1)+'    PNAM'
223                PNames.append(Expr[n][key])
224        if len(PNames) == 0:
225            raise self.ImportException("No phases found")           
226        elif len(PNames) > 1:
227            dlg = wx.SingleChoiceDialog(G2frame, 'Which phase to read?', 'Read phase data', PNames, wx.CHOICEDLG_STYLE)
228            try:
229                if dlg.ShowModal() == wx.ID_OK:
230                    result = dlg.GetSelection() # I think this breaks is there are skipped phases. Cant this happen?
231            finally:
232                dlg.Destroy()       
233        EXPphase = Expr[result]
234        keyList = EXPphase.keys()
235        keyList.sort()
236        SGData = {}
237        if NPhas[result] == '1':
238            Ptype = 'nuclear'
239        elif NPhas[result] in ['2','3']:
240            Ptype = 'magnetic'
241        elif NPhas[result] == '4':
242            Ptype = 'macromolecular'
243        elif NPhas[result] == '10':
244            Ptype = 'Pawley'
245        else:
246            raise self.ImportException("Phase type not recognized")           
247        for key in keyList:
248            if 'PNAM' in key:
249               PhaseName = EXPphase[key].strip()
250            elif 'ABC   ' in key:
251                abc = [float(EXPphase[key][:10]),float(EXPphase[key][10:20]),float(EXPphase[key][20:30])]                       
252            elif 'ANGLES' in key:
253                angles = [float(EXPphase[key][:10]),float(EXPphase[key][10:20]),float(EXPphase[key][20:30])]                                               
254            elif 'SG SYM' in key:
255                SpGrp = EXPphase[key][:15].strip()
256                E,SGData = G2spc.SpcGroup(SpGrp)
257                if E:
258                    SGData = G2IO.SGData # P 1 -- unlikely to need this!
259                    self.warnings += '\nThe GSAS space group was not interpreted(!) and has been set to "P 1".'
260                    self.warnings += "Change this in phase's General tab."                       
261            elif 'OD    ' in key:
262                SHdata = EXPphase[key].split() # may not have all 9 values
263                SHvals = 9*[0]
264                for i in range(9):
265                    try:
266                        float(SHdata[i])
267                        SHvals[i] = SHdata[i]
268                    except:
269                        pass
270                textureData['Order'] = int(SHvals[0])
271                textureData['Model'] = shModels[int(SHvals[2])]
272                textureData['Sample omega'] = [False,float(SHvals[6])]
273                textureData['Sample chi'] = [False,float(SHvals[7])]
274                textureData['Sample phi'] = [False,float(SHvals[8])]
275                shNcof = int(SHvals[1])
276        Atoms = []
277        if Ptype == 'nuclear':
278            for key in keyList:
279                if 'AT' in key:
280                    if key[11:] == 'A':
281                        S = EXPphase[key]
282                    elif key[11:] == 'B':
283                        S += EXPphase[key]
284                        Atom = [S[50:58].strip(),S[:10].strip().capitalize(),'',
285                            float(S[10:20]),float(S[20:30]),float(S[30:40]),
286                            float(S[40:50]),'',int(S[60:62]),S[130:131]]
287                        if Atom[9] == 'I':
288                            Atom += [float(S[68:78]),0.,0.,0.,0.,0.,0.]
289                        elif Atom[9] == 'A':
290                            Atom += [0.0,float(S[68:78]),float(S[78:88]),
291                                float(S[88:98]),float(S[98:108]),
292                                float(S[108:118]),float(S[118:128])]
293                        XYZ = Atom[3:6]
294                        Atom[7],Atom[8] = G2spc.SytSym(XYZ,SGData)
295                        Atom.append(ran.randint(0,sys.maxint))
296                        Atoms.append(Atom)
297        elif Ptype == 'macromolecular':
298            for key in keyList:
299                if 'AT' in key[6:8]:
300                    S = EXPphase[key]
301                    Atom = [S[56:60],S[50:54].strip().upper(),S[54:56],
302                        S[46:51].strip(),S[:8].strip().capitalize(),'',
303                        float(S[16:24]),float(S[24:32]),float(S[32:40]),
304                        float(S[8:16]),'1',1,'I',float(S[40:46]),0,0,0,0,0,0]
305                    XYZ = Atom[6:9]
306                    Atom[10],Atom[11] = G2spc.SytSym(XYZ,SGData)
307                    Atom.append(ran.randint(0,sys.maxint))
308                    Atoms.append(Atom)
309        Volume = G2lat.calc_V(G2lat.cell2A(abc+angles))
310        if shNcof:
311            shCoef = {}
312            nRec = [i+1 for i in range((shNcof-1)/6+1)]
313            for irec in nRec:
314                ODkey = keyList[0][:6]+'OD'+'%3dA'%(irec)
315                indx = EXPphase[ODkey].split()
316                ODkey = ODkey[:-1]+'B'
317                vals = EXPphase[ODkey].split()
318                for i,val in enumerate(vals):
319                    key = 'C(%s,%s,%s)'%(indx[3*i],indx[3*i+1],indx[3*i+2])
320                    shCoef[key] = float(val)
321            textureData['SH Coeff'] = [False,shCoef]
322        if not SGData:
323            raise self.ImportException("No space group found in phase")
324        if not abc:
325            raise self.ImportException("No cell lengths found in phase")
326        if not angles:
327            raise self.ImportException("No cell angles found in phase")
328        if not Atoms:
329            raise self.ImportException("No atoms found in phase")
330        Phase = G2IO.SetNewPhase(Name=PhaseName,SGData=SGData,cell=abc+angles+[Volume,])
331        general = Phase['General']
332        general['Type'] = Ptype
333        if general['Type'] =='macromolecular':
334            general['AtomPtrs'] = [6,4,10,12]
335        else:
336            general['AtomPtrs'] = [3,1,7,9]   
337        general['SH Texture'] = textureData
338        Phase['Atoms'] = Atoms
339        return Phase
340
341class JANA_ReaderClass(G2IO.ImportPhase):
342    'Routine to import Phase information from a JANA2006 file'
343    def __init__(self):
344        super(self.__class__,self).__init__( # fancy way to say ImportPhase.__init__
345            extensionlist=('.m50','.M50'),
346            strictExtension=True,
347            formatName = 'JANA m50',
348            longFormatName = 'JANA2006 phase import'
349            )
350    def ContentsValidator(self, filepointer):
351        '''Taking a stab a validating a .m50 file
352        (look for cell & at least one atom)
353        '''
354        for i,l in enumerate(filepointer):
355            if l.startswith('cell'):
356                break
357        else:
358            self.errors = 'no cell record found'
359            return False
360        for i,l in enumerate(filepointer):
361            if l.startswith('spgroup'):
362                return True
363        self.errors = 'no spgroup record found after cell record'
364        return False
365       
366    def Reader(self,filename,filepointer, ParentFrame=None, **unused):
367        'Read a m50 file using :meth:`ReadJANAPhase`'
368        try:
369            self.Phase = self.ReadJANAPhase(filename, ParentFrame)
370            return True
371        except Exception as detail:
372            self.errors += '\n  '+str(detail)
373            print 'JANA read error:',detail # for testing
374            traceback.print_exc(file=sys.stdout)
375            return False
376       
377    def ReadJANAPhase(self,filename,parent=None):
378        '''Read a phase from a JANA2006 m50 & m40 files.
379        '''
380        self.errors = 'Error opening file'
381        file = open(filename, 'Ur') #contains only cell & spcgroup
382        Phase = {}
383        Title = os.path.basename(filename)
384        Compnd = ''
385        Type = 'nuclear'
386        Atoms = []
387        Atypes = []
388        SuperVec = [[0,0,.1],False,4]
389        S = file.readline()
390        line = 1
391        SGData = None
392        SuperSg = ''
393        cell = None
394        nqi = 0
395        while S:
396            self.errors = 'Error reading at line '+str(line)
397            if 'title' in S and S != 'title\n':
398                Title = S.split()[1]
399            elif 'cell' in S[:4]:
400                cell = S[5:].split()
401                cell=[float(cell[0]),float(cell[1]),float(cell[2]),
402                    float(cell[3]),float(cell[4]),float(cell[5])]
403                Volume = G2lat.calc_V(G2lat.cell2A(cell))
404            elif 'spgroup' in S:
405                if 'X' in S:
406                    raise self.ImportException("Supersymmetry "+S+" too high; GSAS-II limited to (3+1) supersymmetry")           
407                SpGrp = S.split()[1]
408                SuperSg = ''
409                if '(' in SpGrp:    #supercell symmetry - split in 2
410                    SuperStr = SpGrp.split('(')
411                    SpGrp = SuperStr[0]
412                    SuperSg = '('+SuperStr[1]
413                SpGrpNorm = G2spc.StandardizeSpcName(SpGrp)
414                E,SGData = G2spc.SpcGroup(SpGrpNorm)
415                # space group processing failed, try to look up name in table
416                while E:
417                    print G2spc.SGErrors(E)
418                    dlg = wx.TextEntryDialog(parent,
419                        SpGrp[:-1]+' is invalid \nN.B.: make sure spaces separate axial fields in symbol',
420                        'ERROR in space group symbol','',style=wx.OK)
421                    if dlg.ShowModal() == wx.ID_OK:
422                        SpGrp = dlg.GetValue()
423                        E,SGData = G2spc.SpcGroup(SpGrp)
424                    else:
425                        SGData = G2IO.SGData # P 1
426                        self.warnings += '\nThe space group was not interpreted and has been set to "P 1".'
427                        self.warnings += "Change this in phase's General tab."           
428                    dlg.Destroy()
429                SGlines = G2spc.SGPrint(SGData)
430            elif 'qi' in S[:2]:
431                if nqi:
432                    raise self.ImportException("Supersymmetry too high; GSAS-II limited to (3+1) supersymmetry")           
433                Type = 'modulated'
434                vec = S.split()[1:]
435                SuperVec = [[float(vec[i]) for i in range(3)],False,4]
436                nqi += 1
437            elif 'atom' in S[:4]:
438                Atypes.append(S.split()[1])
439            S = file.readline()
440            line += 1
441        file.close()
442        #read atoms from m40 file
443        if not SGData:
444            self.warnings += '\nThe space group was not read before atoms and has been set to "P 1". '
445            self.warnings += "Change this in phase's General tab."
446            SGData = G2IO.SGData # P 1
447        waveTypes = ['Fourier','Sawtooth','ZigZag',]
448        filename2 = os.path.splitext(filename)[0]+'.m40'
449        file2 = open(filename2,'Ur')
450        S = file2.readline()
451        line = 1
452        self.errors = 'Error reading at line '+str(line)
453        nAtoms = int(S.split()[0])
454        for i in range(4):
455            S = file2.readline()           
456        for i in range(nAtoms):
457            S1 = file2.readline()
458            S1N = S1.split()[-3:]   # no. occ, no. pos waves, no. ADP waves
459            S1N = [int(i) for i in S1N]
460            S1T = list(S1[60:63])
461            waveType = waveTypes[int(S1T[1])]
462            crenelType = ''
463            Spos = []
464            Sadp = []
465            Sfrac = []
466            Smag = []
467            XYZ = [float(S1[27:36]),float(S1[36:45]),float(S1[45:54])]
468            SytSym,Mult = G2spc.SytSym(XYZ,SGData)
469            aType = Atypes[int(S1[9:11])-1]
470            Name = S1[:8].strip()
471            if S1[11:15].strip() == '1':
472                S2 = file2.readline()
473                Uiso = float(S2[:9])
474                Uij = [0,0,0,0,0,0]
475                IA = 'I'
476            elif S1[11:15].strip() == '2':
477                S2 = file2.readline()
478                IA = 'A'
479                Uiso = 0.
480                Uij = [float(S2[:9]),float(S2[9:18]),float(S2[18:27]),
481                    float(S2[27:36]),float(S2[36:45]),float(S2[45:54])]
482            for i in range(S1N[0]):
483                if not i:
484                    FS = file2.readline()
485                    Sfrac.append(FS[:9])    #'O' or 'delta' = 'length' for crenel
486                    if int(S1T[0]):  #"", "Legendre" or "Xharm" in 18:27 for "crenel"!
487                        waveType = 'Crenel/Fourier' #all waves 'Fourier' no other choice
488                        crenelType = FS[18:27]
489                Sfrac.append(file2.readline()[:18]) #if not crenel = Osin & Ocos
490                # else Osin & Ocos except last one is X40 = 'Center'
491            for i in range(S1N[1]): 
492                Spos.append(file2.readline()[:54])
493            for i in range(S1N[2]):
494                Sadp.append(file2.readline()[:54]+file2.readline())
495            if sum(S1N):    #if any waves: skip mystery line?
496                file2.readline()
497            for i,it in enumerate(Sfrac):
498                print i,it
499                if not i:
500                    if 'Crenel' in waveType:
501                        vals = [float(it),float(Sfrac[-1][:9])]
502                    else:
503                        vals = [float(it),]
504                else:
505                    vals = [float(it[:9]),float(it[9:18])]
506                if 'Crenel' in waveType and i == len(Sfrac)-1:
507                    del Sfrac[-1]
508                    break               
509                Sfrac[i] = [vals,False]
510                print Sfrac[i]
511            for i,it in enumerate(Spos):
512                if waveType in ['ZigZag','Sawtooth'] and not i:
513                    vals = [float(it[:9]),float(it[9:18]),float(it[18:27]),float(it[27:36])]
514                else:
515                    vals = [float(it[:9]),float(it[9:18]),float(it[18:27]),float(it[27:36]),float(it[36:45]),float(it[45:54])]
516                Spos[i] = [vals,False]
517            for i,it in enumerate(Sadp):
518                vals = [float(it[:9]),float(it[9:18]),float(it[18:27]),float(it[27:36]),float(it[36:45]),float(it[45:54]),
519                    float(it[54:63]),float(it[63:72]),float(it[72:81]),float(it[81:90]),float(it[90:99]),float(it[99:108])]               
520                Sadp[i] = [vals,False]
521            Atom = [Name,aType,'',XYZ[0],XYZ[1],XYZ[2],1.0,SytSym,Mult,IA,Uiso]
522            Atom += Uij
523            Atom.append(ran.randint(0,sys.maxint))
524            Atom.append([])
525            Atom.append([])
526            Atom.append({'SS1':{'waveType':waveType,'crenelType':crenelType,'Sfrac':Sfrac,'Spos':Spos,'Sadp':Sadp,'Smag':Smag}})    #SS2 is for (3+2), etc.
527            Atoms.append(Atom)
528        file2.close()
529        self.errors = 'Error after read complete'
530        if not SGData:
531            raise self.ImportException("No space group (spcgroup entry) found")
532        if not cell:
533            raise self.ImportException("No cell found")
534        Phase = G2IO.SetNewPhase(Name=Title,SGData=SGData,cell=cell+[Volume,])
535        Phase['General']['Type'] = Type
536        Phase['General']['Super'] = nqi
537        Phase['General']['SuperVec'] = SuperVec
538        Phase['General']['SuperSg'] = SuperSg
539        if SuperSg:
540            Phase['General']['SSGData'] = G2spc.SSpcGroup(SGData,SuperSg)[1]
541        Phase['General']['AtomPtrs'] = [3,1,7,9]
542        Phase['Atoms'] = Atoms
543        return Phase
Note: See TracBrowser for help on using the repository browser.