pyiron_atomistics
pyiron_atomistics copied to clipboard
Unexpected behaviour when writing out files from pyiron
- I have a structure as a conventional cell (this is the root of the problem)
- I generate the primitive cell (using either .get_symmetry().primitive_cell or .get_primitive_cell() give the same results)
- I print out the generated primitive cell to be used outside pyiron (tested different formats: xyz/cif). (here I see the effect of the bug)
-
When I generate the structure using pyiron (such as .create.structure.bulk) the printed-out files are as expected (in terms of atoms labels and arrangements).
-
When I read the conventional cell structure using ase_to_pyiron(), generate the primitive cell, and write out the primitive cell, all the atoms are labeled as the first atom. This happens even though atoms labels are correct in the structure object, .get_chemical_formula(), and .get_chemical_symbols().
-
The attached notebook compare the two method: writing out a pyiron-generated conventional cell (NaCl) that is then transformed into a primitive cell and also a pyiron-read conventional cell (Fe2O3) (the other attached file) that is also then transformed into a primitive cell.
-
In the first working case, I expect (and find) the primitive cell is of two atoms: 1 Na and then 1 Cl.
-
In the second and problematic case, I expect the primitive cell to be of 10 atoms: 4 Fe and then 6 O. What happens is that all printed atoms are labeled Fe. fe2o3_conv_strucs.9000139.txt writing_primitive_cell_bug.txt *Please change the extension from .txt to .ipynb for the writing_primitive_cell_bug file to load the notebook. github wont upload .ipynb files
This might be related to https://github.com/pyiron/pyiron_atomistics/issues/743 @jan-janssen I am not sure whether this is the correct problem you mentioned that might be related to this, please mention the correct one if it is not.