Closed jywu20 closed 1 year ago
Hi @jywu20, this is a known behavior (See this comment). The Python code did remove extra information contained in atoms
, but I think it is better we recover this information. Please see if #152 solves your problem. I have added some tests so I suppose it should work.
The CI did not work because I introduced some breaking changes into the main
branch. Please use the 150
branch directly and test.
I guess I will just release a patch version for you to test. That's easier. I have tested it on my machine so it should work.
Describe the bug I don't know whether it's a bug or a feature, but
standardize_cell
erases off the atomic number information of the cell passed to it: thus suppose we haveand we get
To Reproduce Steps to reproduce the behavior:
Cell
standardize_cell(cell).atoms
, and you will find it's an array consisting of numbers 1, 2, 3, etc. which distinguish different atoms but tell us nothing about what these atoms actually are.Expected behavior
Additional context The cause of the behavior is that at the end of
standardize_cell(cell::AbstractCell, symprec=1e-5; to_primitive=false, no_idealize=false)
, theatoms
field of the return value is set toatoms[1:num_atom_std]
. The definition ofatoms
isAnd if we go to the function
_expand_cell
, we find the following lines:So indeed
_atoms
(hencestandardize_cell(cell).atoms
) instandardize_cell
contains the aforementioned indices 1, 2, 3, etc. which distinguish different atoms but tell us nothing about what these atoms actually are.I don't know if there is any reason to not set
standardize_cell(cell).atoms
tocell.atoms
aftrer everything is finished.