Changeset 1985
- Timestamp:
- Oct 5, 2015 2:05:04 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r1971 r1985 284 284 except AttributeError: 285 285 print 'Import_'+errprefix+': Attribute Error '+str(filename) 286 pass 287 except ImportError: 288 print 'Import_'+errprefix+': Error importing file '+str(filename) 289 pass 286 #except ImportError: 287 # print 'Import_'+errprefix+': Error importing file '+str(filename) 288 except Exception,errmsg: 289 print('\nImport_'+errprefix+': Error importing file '+str(filename)) 290 print('Error message: '+str(errmsg)+'\n') 290 291 if fp: fp.close() 291 292 -
trunk/imports/G2phase_CIF.py
r1982 r1985 178 178 anisoloop = blk.GetLoop('_atom_site_aniso_label') 179 179 anisokeys = [i.lower() for i in anisoloop.keys()] 180 anisolabels = blk.get('_atom_site_aniso_label') 180 181 else: 181 182 anisoloop = None 182 183 anisokeys = [] 184 anisolabels = [] 183 185 self.Phase['Atoms'] = [] 184 186 G2AtomDict = { '_atom_site_type_symbol' : 1, … … 204 206 if col >= 3: 205 207 atomlist[col] = cif.get_number_with_esd(val)[0] 208 if col >= 11: atomlist[9] = 'A' # if any Aniso term is defined, set flag 206 209 elif col is not None: 207 210 atomlist[col] = val … … 211 214 atomlist[9] = 'A' 212 215 elif key == '_atom_site_u_iso_or_equiv': 213 atomlist[10] =cif.get_number_with_esd(val)[0] 216 uisoval =cif.get_number_with_esd(val)[0] 217 if uisoval is not None: atomlist[10] = uisoval 214 218 if not atomlist[1] and atomlist[0]: 215 219 typ = atomlist[0].rstrip('0123456789-+') … … 219 223 atomlist[1] = 'Xe' 220 224 self.warnings += ' Atom type '+typ+' not recognized; Xe assumed\n' 221 ulbl = '_atom_site_aniso_label' 222 if atomlist[9] == 'A' and atomlist[0] in blk.get(ulbl): 223 for val,key in zip(anisoloop.GetKeyedPacket(ulbl,atomlist[0]), 224 anisokeys): 225 if atomlist[0] in anisolabels: # does this atom have aniso values in separate loop? 226 atomlist[9] = 'A' # set the aniso flag 227 for val,key in zip( # load the values 228 anisoloop.GetKeyedPacket('_atom_site_aniso_label',atomlist[0]), 229 anisokeys): 225 230 col = G2AtomDict.get(key) 226 231 if col:
Note: See TracChangeset
for help on using the changeset viewer.