Changeset 3200


Ignore:
Timestamp:
Dec 21, 2017 11:50:09 AM (4 years ago)
Author:
vondreele
Message:

fix bugs in various exporters for cif & pdb files.
allow for missing SGDataSGFixed? parameter in SGPrint

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIspc.py

    r3197 r3200  
    372372        SGTable - list of strings for each of the operations
    373373    '''
    374     if SGData['SGFixed']:       #inverses included in ops for cif fixed
     374    if SGData.get('SGFixed',False):       #inverses included in ops for cif fixed
    375375        Mult = len(SGData['SGCen'])*len(SGData['SGOps'])
    376376    else:
  • trunk/exports/G2export_CIF.py

    r3136 r3200  
    393393                controls = self.OverallParms['Controls']
    394394                if controls['F**2']:
    395                     thresh = 'F**2>%.1fu(F**2)'%(controls['minF/sig'])
     395                    thresh = 'F**2>%.1fu(F**2)'%(controls['UsrReject']['minF/sig'])
    396396                else:
    397                     thresh = 'F>%.1fu(F)'%(controls['minF/sig'])
     397                    thresh = 'F>%.1fu(F)'%(controls['UsrReject']['minF/sig'])
    398398                WriteCIFitem(self.fp, '_reflns_threshold_expression', thresh)
    399399            try:
     
    19611961            #    FormatInstProfile(histblk["Instrument Parameters"],histblk['hId'])
    19621962            #        +'\n'+FormatPhaseProfile(phasenam))
    1963             histblk = self.Histograms[hist]["Sample Parameters"]
     1963            if hist.startswith("PWDR"):
     1964                histblk = self.Histograms[hist]["Sample Parameters"]
     1965                WritePowderData(hist)
     1966            elif hist.startswith("HKLF"):
     1967                WriteSingleXtalData(hist)
    19641968            #writeCIFtemplate(histblk,'powder',histblk['InstrName']) # write powder template
    1965             WritePowderData(hist)
    19661969            #self.CloseFile()
    19671970            return
     
    23952398            AskFile='ask' # get a file name/directory to save in
    23962399            ): return
     2400        self.OpenFile()
    23972401        self._Exporter(event=event,histOnly=self.histnam[0])
    23982402
     
    24412445            AskFile='ask' # get a file name/directory to save in
    24422446            ): return
     2447        self.OpenFile()
    24432448        self._Exporter(event=event,histOnly=self.histnam[0])
    24442449
  • trunk/exports/G2export_PDB.py

    r3136 r3200  
    106106            for chain in chains:
    107107                nres = len(seqList[chain])
    108                 nrec = (nres-1)/13+1
     108                nrec = (nres-1)//13+1
    109109                iB = 0
    110110                for irec in range(nrec):
     
    231231            if len(self.phasenam) > 1: # if more than one filename is included, add a phase #
    232232                self.filename = os.path.splitext(filename)[1] + "_" + str(i) + self.extension
    233             fp = self.OpenFile()
    234233            cx,ct,cs,cia = General['AtomPtrs']
    235234            Cell = General['Cell'][1:7]
Note: See TracChangeset for help on using the changeset viewer.