Importing .cif structure files

527 views
Skip to first unread message

Parham Rohani

unread,
May 22, 2017, 7:29:02 PM5/22/17
to diffpy-users
Hi

I'm trying to load a cif structure file I downloaded from ICSD as a new phase in PDFgui but got an error message saying: 
Unable to read file 
Unknown or invalid structure format... 

I attached my CIF file and the error message.
2104737.cif
Error.png

Yu Wang

unread,
May 23, 2017, 2:41:45 PM5/23/17
to diffpy...@googlegroups.com

Parham,

 

You can try with another CIF. Your file is Si. It should have a bunch of Si.

Your file has no space group.

 

yu

--
You received this message because you are subscribed to the Google Groups "diffpy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diffpy-users...@googlegroups.com.
To post to this group, send email to diffpy...@googlegroups.com.
Visit this group at https://groups.google.com/group/diffpy-users.
For more options, visit https://groups.google.com/d/optout.

Pavol Juhas

unread,
May 23, 2017, 2:46:21 PM5/23/17
to diffpy...@googlegroups.com, jamesr...@gmail.com
On Mon, May 22, 2017 at 04:29:02PM -0700, Parham Rohani wrote:
...
Hi Parham,

Your CIF file indeed contains a duplicate entry for
_diffrn_radiation_wavelength_id just as the error
message says. It also has a plenty of extra
information related to Rietveld refinement so it is
not really a database file, but a CIF file exported
from some structure refinement program.

A better choice is to use the original CIF from the database,
which is actually the Crystallography Open Database, not ICSD:
http://www.crystallography.net/cod/cif/2/10/47/2104737.cif.

Importing that file however fails as well with error message

Syntax error in input file: last value parsed was u'kd5037.cif'

The line 62 just below "kd5037.cif" contains a value with
parentheses, which seems to cause the CIF reading failure:

_cod_data_source_block (5Ca2)_Silicon

The CIF file can be loaded after quoting that value as
'(5Ca2)_Silicon' or removing parentheses so it is 5Ca2_Silicon.
You can also remove that line completely, because it
does not provide any structure data.

I don't know enough about the CIF format to tell if these
errors are due to files not following standard format
or if it shows some bug in the PyCifRW package which
we use for parsing CIF files. I am CC-ing James
Hester, the author of PyCifRW, who is much better
positioned to comment on that.

Hope this helps,

Pavol

--
Dr. Pavol Juhas
Computational Science Initiative
Brookhaven National Laboratory
P.O. Box 5000
Upton, NY 11973-5000

Pavol Juhas

unread,
May 24, 2017, 3:38:39 PM5/24/17
to DiffPy users, James Hester
On Wed, May 24, 2017 at 01:47:20AM +0000, James Hester wrote:
...
> This has exposed a bug in PyCifRW that I thought I had fixed many
> years ago. In short, all CIF syntax standards (1.0,1.1 and 2.0)
> allow data values to begin with a round bracket. Unfortunately
> PyCifRW mistakenly excluded round brackets for the most widespread
> (and default) CIF1.1 syntax. I have fixed the latest version in the
> repository. Do I need to make a bugfix release to get this out to
> your users?

Hi James,

Thank you for the explanation. An update release would be nice
especially if it included the bug fix for Python 2.7.3 we worked
on earlier. To my knowledge CIF files with unquoted parenthesis
are quite rare, so I guess that bug is not causing too much hassle.

Regarding the first reported error about duplicate item [see
https://groups.google.com/d/msg/diffpy-users/oMNyXZfHusY/I3R20_dWAAAJ]
- is it correct to say that that one is due to a bad CIF file?

Thank you,

Parham Rohani

unread,
May 30, 2017, 12:45:09 AM5/30/17
to diffpy-users, jamesr...@gmail.com, pju...@bnl.gov
Hi Pavol,

Thanks so much. The problem is solved with the new CIF file. 

Is it possible to save the fitted data and the PDF spectrum in an excel file for plotting?

Parham Rohani

unread,
May 30, 2017, 6:23:29 PM5/30/17
to diffpy-users, pju...@bnl.gov
Hi Pavol,

In the manual, I can see save icon, but not in my version. Please see the attachment.
Please advise me.
Screen Shot 2017-05-30 at 18.09.29.png

Simon Billinge

unread,
May 31, 2017, 2:34:37 AM5/31/17
to diffpy-users, pju...@bnl.gov
Dear Parham,

Right now you are using the evaluation version of the software, which doesn't allow saving of the results.

S
--

Parham Rohani

unread,
May 31, 2017, 11:41:41 AM5/31/17
to diffpy-users, pju...@bnl.gov
Dear Simon,

I purchased the licensed version. Do I need to install it again?

Simon Billinge

unread,
May 31, 2017, 1:52:35 PM5/31/17
to diffpy-users, pju...@bnl.gov
Hi Parham,

Thanks for doing that!  I am sorry I misunderstood.  Looking a bit more carefully I see that there are no plot control buttons on your matplotlib window.  This looks like a bug.  We will have to look into it.  You may have mentioned earlier, but what platform are you using?  Windows?  Pavol, I also saw this on a mac at the Como total scattering school this week.

S

Parham Rohani

unread,
May 31, 2017, 2:17:22 PM5/31/17
to diffpy-users, pju...@bnl.gov
Hi Simon,

I am using a Mac. 

Pavol Juhas

unread,
Jun 2, 2017, 11:51:02 AM6/2/17
to diffpy...@googlegroups.com

On Wed, May 31, 2017 at 11:17:21AM -0700, Parham Rohani wrote:
> On Wednesday, May 31, 2017 at 1:52:35 PM UTC-4, Simon Billinge wrote:
...
> > Thanks for doing that! I am sorry I misunderstood. Looking a bit
> > more carefully I see that there are no plot control buttons on
> > your matplotlib window. This looks like a bug. We will have to
> > look into it. You may have mentioned earlier, but what platform
> > are you using? Windows? Pavol, I also saw this on a mac at the
> > Como total scattering school this week.

Continued under a more on-topic subject
https://groups.google.com/d/msg/diffpy-users/PzdTypbdxAA/6Gn4cz6pAAAJ
Reply all
Reply to author
Forward
0 new messages