Closed AinomN closed 3 years ago
The code fails to identify the charge state of your oxygen atom. It seems to me that at the moment only the element name "O1-" is understood. If you put that instead to your cif-file it should work.
But I agree that this should be more flexible and also recognize "O-". I will fix this in future versions
Thank you for the help and the quick answer
I only now had time to test this. Actually you already had as name "O1-" in the CIF-file. I overlooked this. I can not reproduce your problem with xrayutilities master branch.
So I think the question is if you are running the latest version of xrayutilities?
Or is the code you execute here:
# Read cif file
ZnO = mg.Structure.from_file("ICSD_CollCode60763.cif")
# ZnO
temp_cif = NamedTemporaryFile(delete=False)
ZnO.to("cif", temp_cif.name)
changing the CIF file?
For the purpose of xrayutilities you could just do
xu_crystal_ZnO = Crystal.fromCIF("ICSD_CollCode60763.cif")
and safe some lines of code.
I still shall make the parsing of the atom type more flexible because the CIF syntax explicitly allows "O-" https://www.iucr.org/__data/iucr/cifdic_html/1/cif_core.dic/Iatom_site_type_symbol.html
The mentioned commit should fix the reported issue. @AinomN could you test if that also fixes it for you?
It is now tested, and the solution mentioned in the comment fixed the issue. Thanks.
I am trying to simulate the powder x-ray pattern from a cif file.
My python code is grab from internet, LaScCoO3_xrd.py
My cif file is from the ISCD database:
This gives an output error:
I am sorry, but I don't really understand the error. Any help trying to understand this is very much appreciated. And thanks for the great work.