Ignore:
Timestamp:
Jun 29, 2015 9:06:28 AM (7 years ago)
Author:
vondreele
Message:

more twin stuff - nonmerohedral mods
refl[3] now twin id not mul.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2sfact.py

    r1910 r1912  
    117117                sigFo = float(sigFo)
    118118                # h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...
    119                 self.RefDict['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0])
     119                self.RefDict['RefList'].append([h,k,l,1,0,Fo,sigFo,0,Fo,0,0,0])
    120120                #self.RefDict['FF'].append({}) # now done in OnImportSfact
    121121            self.errors = 'Error after reading reflections (unexpected!)'
     
    150150    def ContentsValidator(self, filepointer):
    151151        'Discover how many characters are in the SHELX file - could be 32-44 depending on satellites'
    152         numCols = 0
     152        numCols = 0     #this needs to be done differently
    153153        for i,line in enumerate(filepointer):
    154154            numCols = max(numCols,len(line.split()))
     
    175175                    h,k,l,m1 = [int(h),int(k),int(l),int(m1)]
    176176                Tw = Tw.strip()
    177                 if not any([h,k,l]):
    178                     break
    179                 if Tw not in ['','0','1']:
     177                if Tw in ['','0']:
     178                    Tw = '1'
     179                if not any([h,k,l]):
     180                    break
     181                if '-' in Tw:
    180182                    TwId = -int(Tw)-1
    181183                    TwMax = max(TwMax,TwId)
     
    189191                    # h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...
    190192                    if self.Super == 0:
    191                         self.RefDict['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0])
     193                        self.RefDict['RefList'].append([h,k,l,int(Tw),0,Fo,sigFo,0,Fo,0,0,0])
    192194                    elif self.Super == 1:
    193                         self.RefDict['RefList'].append([h,k,l,m1,0,0,Fo,sigFo,0,Fo,0,0,0])
     195                        self.RefDict['RefList'].append([h,k,l,m1,int(Tw),0,Fo,sigFo,0,Fo,0,0,0])
    194196            self.errors = 'Error after reading reflections (unexpected!)'
    195197            self.RefDict['RefList'] = np.array(self.RefDict['RefList'])
Note: See TracChangeset for help on using the changeset viewer.