[ase-users] Error reading cif file - out of memory.

Peter Bjerre Jensen pbjen at dtu.dk
Thu Jan 24 13:52:29 CET 2013


Dear Gaël

Thank you for spotting the error - correcting as suggested works!

However, I do certainly agree with you, that such a programming error 
should be fixed.

I am not an expert in the cif format at all, but as I wrote this file 
was obtained from a huge database (ICSD), so I hoped that the format was 
OK (I have not been able to find the syntax specifications, regarding 
the references).

But again thank you for the help.

/Peter

Peter Bjerre Jensen
PhD Student
DTU Energy Conversion

Technical University of Denmark

	
Department of Energy Conversion and Storage
Fysikvej, Building 307
2800 Kgs. Lyngby
Direct +45 45253204
pbjen at dtu.dk <mailto:pbjen at dtu.dk>
www.dtu.dk <http://www.dtu.dk>

Den 23-01-2013 12:00, ase-users-request at listserv.fysik.dtu.dk skrev:
> ------------------------------
>
> Message: 2
> Date: Tue, 22 Jan 2013 20:50:48 +0100
> From: Ga?l DONVAL <gael.donval at cnrs-imn.fr>
> Subject: Re: [ase-users] Error reading cif file - out of memory.
> To: ase-users at listserv.fysik.dtu.dk
> Message-ID: <1358884248.28297.22.camel at p76-nom-gd.cnrs-imn.fr>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi,
>
> Ill-formatted file l.26:
>          ; 1925 62 255 259 ZEKGAX
> should be:
>          1925 62 255 259 ZEKGAX
>          ;
>          
> But I must admit that a piece of code beginning by "while True" is
> usually not a bright idea (in cif.py l.68) :)
>
> Cheers,
> Ga?l
>
> Le mardi 22 janvier 2013 ? 17:47 +0100, Peter Bjerre Jensen a ?crit :
>> Hi
>>
>> Can anyone tell me why, reading the attached cif file is not working and
>> uses A LOT of memory (I used ~10 GB before it was killed).
>>
>> The cif file is from the ICSD database.
>>
>> I try the following:
>>
>> Python 2.4.3 (#1, Jan  9 2013, 06:47:03)
>> [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>   >>> from ase.io import *
>>   >>> atoms = read('Zr_RT_53785.cif')
>> Traceback (most recent call last):
>>     File "<stdin>", line 1, in ?
>>     File "/home/camp/pbjen/bin/ase_2686/ase/io/__init__.py", line 201, in
>> read
>>       return read_cif(filename, index)
>>     File "/home/camp/pbjen/bin/ase_2686/ase/io/cif.py", line 276, in read_cif
>>       blocks = parse_cif(fileobj)
>>     File "/home/camp/pbjen/bin/ase_2686/ase/io/cif.py", line 185, in
>> parse_cif
>>       blocks.append(parse_block(fileobj, line))
>>     File "/home/camp/pbjen/bin/ase_2686/ase/io/cif.py", line 167, in
>> parse_block
>>       tags = parse_items(fileobj, line)
>>     File "/home/camp/pbjen/bin/ase_2686/ase/io/cif.py", line 155, in
>> parse_items
>>       temp = parse_multiline_string(fileobj, line)
>>     File "/home/camp/pbjen/bin/ase_2686/ase/io/cif.py", line 72, in
>> parse_multiline_string
>>       lines.append(line)
>> MemoryError
>>   >>>
>>
>> /Peter
>>
>> PS. I think the solution for now for me will be to manually build the
>> unit cell, by entering the parameters; but I do not think this should be
>> necessary?
>>
>> _______________________________________________
>> ase-users mailing list
>> ase-users at listserv.fysik.dtu.dk
>> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20130124/62560a28/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DTU_email_logo_01.gif
Type: image/gif
Size: 1055 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20130124/62560a28/attachment.gif>


More information about the ase-users mailing list