Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading the site-occupancy data from CIF files #3

Closed
azkhadiev opened this issue Jun 12, 2020 · 5 comments
Closed

Reading the site-occupancy data from CIF files #3

azkhadiev opened this issue Jun 12, 2020 · 5 comments

Comments

@azkhadiev
Copy link

Looks like "crystals" package is not able to read a site-occupancy data from the CIF files.
I tried to load the CIF file and read the occupancy of the atom by the lines:
arb_crystal = crystals.Crystal.from_cif('Arb_cry.cif')
list(arb_crystal)[0].occupancy

It shows 1.0 occupancy of all atoms in unit cell, whereas several of them have occupancy smaller than 1.0. How one can fix that?

@LaurentRDC
Copy link
Owner

Hello!

As of version 1.1.1, the occupancy of each site defaults to 1 (as you saw). I wrote the CIF parser a while ago, and never updated it.

I can update the parser today. Can you point me to a CIF file which has occupancies that are not 1.0?

@azkhadiev
Copy link
Author

Thank you for the fast answer! Iy would be good to have this parser. Please, find in attached the CIF file (just change the .docx
NiMnCoO4.docx
to .cif)

@LaurentRDC
Copy link
Owner

LaurentRDC commented Jun 12, 2020

Thank you for this file!

Is it yours? If so, do you give me permission to include it in crystals' test suite?

Otherwise I will create an artificial CIF file.

Edit: Don't worry about it, I used an artificially-modified file.

@LaurentRDC
Copy link
Owner

Allright, I have released a new version (1.1.2) that addresses your concerns. It will be available via conda tomorrow. If you prefer to use pip, you can already install it:

pip install --upgrade crystals

Let me know if it works for you.

@azkhadiev
Copy link
Author

azkhadiev commented Jun 14, 2020

Dear Laurent,

Thank you for your corrections. Unfortunately, I took this CIF file from ICSD database (https://icsd.fiz-karlsruhe.de/) and I am not sure that this file could be used freely without ICSD permission. But there are several open databases, where CIF files are absolutely available. Here is an example of Anorthite CIF file (http://rruff.geo.arizona.edu/AMS/CIF_text_files/00012_cif.txt) where occupancies are also presented. I am not absolutely sure, but maybe somebody will also ask you to include the possibility of parsing "anisotropic atomic displacement parameters" from CIF files.

Everything is working now, "crystals" takes occupancies from CIF files.

Thank you again for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants