question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

incorrect crystal generation from seed

See original GitHub issue

Dear 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:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
qzhu2017commented, Jan 28, 2021

@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

from pymatgen import Structure
from pymatgen.analysis.structure_matcher import StructureMatcher
from pyxtal import pyxtal
from glob import glob

path = "cif_files/wrong_cif_zeolites/"
path = "cif_files/wrong_cif_mp/"

for f in glob(path+'/*.cif'):
    try:
        s = Structure.from_file(f)
        c = pyxtal()
        c.from_seed(s, tol=1e-6)
        sc = c.to_pymatgen()
        sm = StructureMatcher()
        if not sm.fit(s, sc):
            print(f, c.group.number, sm.fit(s, sc))
    except:
        print(f, "wrong")

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 a P2 symmetry.

This happens to only a few cases. Will check it later.

0reactions
qzhu2017commented, Feb 16, 2021

Checked the failed mp structures. It is highly to be due to decimal issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understand seeding through secondary nucleation ...
Challenges can be seen are the formation of the incorrect solid form being produced as well as the wrong PSD (Particle Size Distribution)....
Read more >
Preventing Crystal Agglomeration of Pharmaceutical ... - MDPI
Preventing Crystal Agglomeration of Pharmaceutical Crystals Using Temperature Cycling and a Novel Membrane Crystallization Procedure for Seed Crystal Generation.
Read more >
SUCCEEDING WITH SEEDING: SOME PRACTICAL ADVICE
Seed quality is dependent on the quality of the parent crystals. Large crystals do not make good seeds because they have accumulated too...
Read more >
Pkmn crystal RNG seed : r/pokemonrng - Reddit
So I have been shiny hunting in crystal these past few days and I want to ... There is not much information regarding...
Read more >
Detect, Correct, Retract: How to manage incorrect structural ...
Most crystal structure models, produced by crystallographers or ... Another means of self-deception leading to biased map generation is the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found