[ase-users] reading cif files

Ingo Opahle ingo.opahle at rub.de
Thu Sep 15 16:48:35 CEST 2011


Hallo,

I have problems reading the attached cif file (ase revision 2303). 
The error message I get is

Traceback (most recent call last):
  File "cifview.py", line 2, in <module>
    casi=read('1001067.cif')
  File "/home/users/opahlivs/ase/ase/io/__init__.py", line 173, in read
    return read_cif(filename, index)
  File "/home/users/opahlivs/ase/ase/io/cif.py", line 267, in read_cif
    return tags2atoms(tags, **kwargs)
  File "/home/users/opahlivs/ase/ase/io/cif.py", line 228, in tags2atoms
    sitesym=sitesym)
  File "/home/users/opahlivs/ase/ase/lattice/spacegroup/spacegroup.py", line 679, in spacegroup_from_data
    spg._rotations, spg._translations = parse_sitesym(sitesym)
  File "/home/users/opahlivs/ase/ase/lattice/spacegroup/spacegroup.py", line 650, in parse_sitesym
    'invalid site symmetry: %s' % sym)
ase.lattice.spacegroup.spacegroup.SpacegroupValueError: invalid site symmetry: -x, y, 0.5-z

The problem seems to be that ase expects 1/2 instead of 0.5 (which is frequently used in the cif files),
I think this could be fixed by modifying line 639 in spacegroup.py from
while n < len(s) and (s[n].isdigit() or s[n] == '/'):
to
while n < len(s) and ((s[n].isdigit()) or (s[n] == '.') or (s[n] == '/')):

Best regards
Ingo

---------------------------------
Dr. Ingo Opahle
ICAMS
Ruhr-Universität Bochum
Stiepeler Straße 129
44801 Bochum
Tel. +49 234 32 29316
email: ingo.opahle at rub.de
---------------------------------


-------------- next part --------------
##############################################################################
#                                                                            #
# Ca-Si            # Ca5Si3                                        # 1001067 #
#                                                                            #
##############################################################################
#                                                                            #
#    Copyright (c) 2008 ASM International & Material Phases Data System.     #
#                           All rights reserved.                             #
#    This copy of Pearson's Crystal Data is licensed to:                     #
#    ICAMS Ruhr Universitaet Bochum                                          #
#                                                                            #
##############################################################################

data_1001067
_audit_creation_date                     2010-02-25
_audit_creation_method
;
Pearson's Crystal Data browser
;
#_database_code_PCD                      1001067

# Entry summary

_chemical_formula_structural             Ca5Si3
_chemical_formula_sum                    Ca5Si3
_chemical_name_mineral                   ?
_chemical_compound_source                ?
_chemical_name_structure_type            Cr5B3,tI32,140
_chemical_formula_weight                 284.7
_chemical_melting_point                  ?

# Bibliographic data

_publ_section_title
;
Hydrogen Impurity Effects. A5Tt3 Intermetallic Compounds between A= Ca, Sr, Ba, Eu and Tt= Si, Ge, Sn with Cr5B3-like Structures that are Stable Both as Binary and as Ternary Hydride and Fluoride Phases
;
_journal_coden_ASTM                      JSSCBI
_journal_year                            2001
_journal_volume                          159
_journal_page_first                      149
_journal_page_last                       162
_journal_language                        English
loop_
 _publ_author_name
 _publ_author_address
'Leon Escamilla E.A.'
;
Iowa State University
Department of Chemistry
Ames
U.S.A. Iowa
;
'Corbett J.D.'
;
Iowa State University
Department of Chemistry
Ames
U.S.A. Iowa
;

# Standardized crystallographic data

_cell_length_a                           7.6495
_cell_length_b                           7.6495
_cell_length_c                           14.835
_cell_angle_alpha                        90
_cell_angle_beta                         90
_cell_angle_gamma                        90
_cell_volume                             868.1
_cell_formula_units_Z                    4
_symmetry_Int_Tables_number              140
_symmetry_space_group_name_H-M           I4/mcm
loop_
 _symmetry_equiv_pos_site_id
 _symmetry_equiv_pos_as_xyz
 1 'x, y, z'
 2 '-x, -y, -z'
 3 '-x, -y, z'
 4 '-x, y, 0.5-z'
 5 '-x, y, 0.5+z'
 6 '-y, -x, 0.5-z'
 7 '-y, -x, 0.5+z'
 8 '-y, x, -z'
 9 '-y, x, z'
 10 'x, -y, 0.5-z'
 11 'x, -y, 0.5+z'
 12 'x, y, -z'
 13 'y, -x, -z'
 14 'y, -x, z'
 15 'y, x, 0.5-z'
 16 'y, x, 0.5+z'
 17 '0.5+x, 0.5+y, 0.5+z'
 18 '0.5-x, 0.5-y, 0.5-z'
 19 '0.5-x, 0.5-y, 0.5+z'
 20 '0.5-x, 0.5+y, 1-z'
 21 '0.5-x, 0.5+y, 1+z'
 22 '0.5-y, 0.5-x, 1-z'
 23 '0.5-y, 0.5-x, 1+z'
 24 '0.5-y, 0.5+x, 0.5-z'
 25 '0.5-y, 0.5+x, 0.5+z'
 26 '0.5+x, 0.5-y, 1-z'
 27 '0.5+x, 0.5-y, 1+z'
 28 '0.5+x, 0.5+y, 0.5-z'
 29 '0.5+y, 0.5-x, 0.5-z'
 30 '0.5+y, 0.5-x, 0.5+z'
 31 '0.5+y, 0.5+x, 1-z'
 32 '0.5+y, 0.5+x, 1+z'
loop_
 _atom_site_label
 _atom_site_type_symbol
 _atom_site_Wyckoff_symbol
 _atom_site_symmetry_multiplicity
 _atom_site_fract_x
 _atom_site_fract_y
 _atom_site_fract_z
 _atom_site_occupancy
 Ca2 Ca l 16 0.17978 0.67978 0.13986 1
 Si2 Si h 8 0.61307 0.11307 0 1
 Ca1 Ca c 4 0 0 0 1
 Si1 Si a 4 0 0 0.25 1


_exptl_crystal_colour                    ?
_exptl_crystal_density_meas              ?
_cell_measurement_temperature            ?
_cell_measurement_radiation              'X-rays, Cu Ka1'
_cell_measurement_wavelength             1.54056
_cell_measurement_reflns_used            ?
_diffrn_ambient_temperature              ?
_diffrn_measurement_device               'automatic diffractometer'
_diffrn_measurement_device_type          'Enraf-Nonius CAD4'
_diffrn_radiation_type                   X-rays
_diffrn_reflns_number                    2182
_exptl_absorpt_coefficient_mu            3.33
_exptl_absorpt_correction_type           empirical
_computing_structure_solution            'starting values from the literature'
_refine_ls_number_parameters             16
_refine_ls_number_reflns                 275
_refine_ls_R_factor_all                  0.015
_refine_ls_wR_factor_all                 0.019
_computing_structure_refinement          'DIFABS; TEXSAN package'

# End of data set 1001067


More information about the ase-users mailing list