incorrect crystal generation from seed
See original GitHub issueDear developers, I have been trying to perform some analysis on a structure and apparently pyxtal fails to import it correctly. Here is the structure: https://gist.github.com/gpetretto/8f9849426b8eb465f89cf883b036fd98 and here is a piece of code demonstrating the issue.
from pymatgen import Structure
from pymatgen.analysis.structure_matcher import StructureMatcher
from pyxtal import pyxtal
s = Structure.from_file("FAU.cif")
c = pyxtal()
c.from_seed(s)
sc = c.to_pymatgen()
sc.to(filename="conv.cif")
sm = StructureMatcher()
print(sm.fit(s, sc))
Aside from the StructureMatcher failing, just looking at the final Structure is enough to tell that it is completely different from the original one.
I tried to check the code, but it seems that there is no problem in the conversion to/from pymatgen and the issue seems to happen when the instances of atom_site
are generated. More precisely when the sym_ops are applied in the search_position
and update
method, but I could not identify the exact source of the issue. I am not sure if this will be of much help…
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
@gpetretto I have fixed most of the issues as discussed in (spglib/spglib#114).
In my test, all zeolites return the same structures after symmetrization. Most of mp structures work as well. You can try the following code
I checked some structures which return mismatch. However, it seems that they are somewhat due to numerical issues.
One remaining issue, spglib sometime detects a wrong symmetry. For instance, the structure
LTN.cif
has a space group symmetry Fd-3m, but spglib returns aP2
symmetry.This happens to only a few cases. Will check it later.
Checked the failed mp structures. It is highly to be due to decimal issue.