In mixed valence compounds, such as Fe3O4, where Fe2+ and Fe3+ ions fully occupy different Wyckoff sites, the oxidation numbers stored in atomdata seems faulty for one of the ions. Tested with ICSD #2013. charges in atomdata returns 3.0 for all Fe.
You are probably seeing the intended behaviour, but I need some more information.
What version of cif2cell are you using and can you post the offending cif file? ICSD currently has no #2013.
If you run the cif2cell program with --print-charge-state, does the program correctly print out 2+/3+ as the charge states for the Fe's?
atomdata.charge is a dictionary that contains ALL charge states of Fe's throughout the crystal. This may seem like a stupid way to handle it, but it solved the problem that I had at the time I wrote it (which involved mixtures/alloys of different charge states at the same site). I just wanted to store the charge information for printing to screen, since I mostly work with DFT codes (where the charge is expected to be output rather than input). If you tell me more about how you want to use the charge information I can probably think up a better design.
Torbjörn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2013-08-15
Thanks for the response! Sorry about replying late and giving the wrong ICSD number. The ICSD listing # is 43001. And regarding your questions:
I think I have version 1.0.12.
Yes, it finds Fe2+/Fe3+ when I run cif2cell. What I need was trying to know which Fe-ion is on which site.
Anyway, when I check the contents of "charges" I see 'Fe' as 3+ only as follows, where 2 iron atoms are supposed to be 2+ (this is what I get):
{'Fe': 3.0}
{'Fe': 3.0}
{'Fe': 3.0}
{'Fe': 3.0}
{'Fe': 3.0}
{'Fe': 3.0}
{'O': -2.0}
{'O': -2.0}
{'O': -2.0}
{'O': -2.0}
{'O': -2.0}
{'O': -2.0}
{'O': -2.0}
{'O': -2.0}
I also use your code to convert cif files to poscar and I should say it works much better than anything out there! This is just a minor issue I have encountered, I kind of need to know the oxidation state of the metal prior to calculation, without checking structures manually. But I got my work-around, I read the atom_site_type_symbol sequence in advance, and pass it to the chargedict to find the charges on an atom at a Wyckoff position while getting the coordinates. Maybe there is a simpler way already embedded in cif2cell but I couldn't figure it out myself.
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are probably seeing the intended behaviour, but I need some more information.
What version of cif2cell are you using and can you post the offending cif file? ICSD currently has no #2013.
If you run the cif2cell program with --print-charge-state, does the program correctly print out 2+/3+ as the charge states for the Fe's?
atomdata.charge is a dictionary that contains ALL charge states of Fe's throughout the crystal. This may seem like a stupid way to handle it, but it solved the problem that I had at the time I wrote it (which involved mixtures/alloys of different charge states at the same site). I just wanted to store the charge information for printing to screen, since I mostly work with DFT codes (where the charge is expected to be output rather than input). If you tell me more about how you want to use the charge information I can probably think up a better design.
Torbjörn
Thanks for the response! Sorry about replying late and giving the wrong ICSD number. The ICSD listing # is 43001. And regarding your questions:
Anyway, when I check the contents of "charges" I see 'Fe' as 3+ only as follows, where 2 iron atoms are supposed to be 2+ (this is what I get):
{'Fe': 3.0}
{'Fe': 3.0}
{'Fe': 3.0}
{'Fe': 3.0}
{'Fe': 3.0}
{'Fe': 3.0}
{'O': -2.0}
{'O': -2.0}
{'O': -2.0}
{'O': -2.0}
{'O': -2.0}
{'O': -2.0}
{'O': -2.0}
{'O': -2.0}
I also use your code to convert cif files to poscar and I should say it works much better than anything out there! This is just a minor issue I have encountered, I kind of need to know the oxidation state of the metal prior to calculation, without checking structures manually. But I got my work-around, I read the atom_site_type_symbol sequence in advance, and pass it to the chargedict to find the charges on an atom at a Wyckoff position while getting the coordinates. Maybe there is a simpler way already embedded in cif2cell but I couldn't figure it out myself.
Thanks!