[ase-users] Bug: ase.io.cif.write_cif() produces syntactically incorrect CIF files

Andrius andrius.merkys at gmail.com
Thu Nov 20 11:52:14 CET 2014


Dear all,

I have noticed that ase.io.cif.write_cif() produces syntactically
incorrect CIF files as of 3.8.1. The bug is still present in the code
of 3914 revision of ASE source.

To reproduce the bug one has to execute the following script (also
attached to this letter):

#!/usr/bin/python

import urllib2
import tempfile
import ase.io.cif
import StringIO

cif_url = 'http://www.crystallography.net/cod/3000000.cif'

cif_string = urllib2.urlopen(cif_url).read()
ase_obj = ase.io.cif.read_cif(StringIO.StringIO(cif_string))
output = StringIO.StringIO()
ase.io.cif.write_cif(output,ase_obj)
print output.getvalue()

The produced CIF file contains following line:

_symmetry_space_group_name_H-M    P 1

which is syntactically incorrect according to
http://www.iucr.org/resources/cif/spec/version1.1/cifsyntax ('P 1'
should be enclosed by single or double quotes). The fix should be
trivial.

Best wishes,
Andrius Merkys
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.sh
Type: application/x-sh
Size: 340 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20141120/ac4eaf0f/attachment.sh>


More information about the ase-users mailing list