[ase-users] reading cif files

Jesper Friis jesper.friis at sintef.no
Fri Sep 16 21:05:28 CEST 2011


Hi, I have committed your suggested fix.
/Jesper

>-----Original Message-----
>From: ase-users-bounces at listserv.fysik.dtu.dk [mailto:ase-users-
>bounces at listserv.fysik.dtu.dk] On Behalf Of Ingo Opahle
>Sent: 15. september 2011 16:49
>To: ase-users at listserv.fysik.dtu.dk
>Subject: [ase-users] reading cif files
>
>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
>---------------------------------
>





More information about the ase-users mailing list