OpenChemistry/avogadrolibs

CIF files with space group other than P1 are not correctly loaded

Opened this issue · 7 comments

Avogadro version: (please complete the following information from the About box):

  • Avogadrolibs: 1.99.0
  • Qt: 5.15.8

Desktop version: (please complete the following information):

  • OS: macOS 14.3.1
  • Version: 1.99.0

Describe the bug
CIF file with non-P1 symmetry is incorrectly loaded.

To Reproduce
Steps to reproduce the behavior:

  1. Download this valid CIF file https://gist.github.com/fxcoudert/71f75c57c2f86024e19eca12be39f92c
  2. Load it into Avogadro
  3. Observe a very partial structure (see below for the screenshot).

Expected behavior
The structure should show 576 atoms.

Screenshots

Capture d’écran 2024-03-02 à 16 43 26

This happens even with the CIF files inside Avogadro itself:

Capture d’écran 2024-03-02 à 21 22 33

It's loaded just fine. It's showing the primitive unit cell. If you want the whole thing, go to Crystal => Fill Unit Cell

(Looks like the French translation needs some work unfortunately.)

I welcome heuristics for knowing when people want the primitive vs. a filled cell. We had one in Avogadro 1.2 and lots of complaints.

Happy to continue the discussion: https://discuss.avogadro.cc/

But it thinks the system is P1:

Capture d’écran 2024-03-02 à 22 07 21

And if I fill the cell, then it can't find the space group anymore:

Capture d’écran 2024-03-02 à 22 08 53

I can change the tolerance but it still fails, even though it filled the cell itself.


Something else I tried: make a supercell (but that only duplicates the asymmetric unit). If you make a supercell THEN fill the cell, it generates something plain wrong.

Did you "perceive space group" before filling the unit cell? I did "fill unit cell" and it worked fine. If I did "perceive space group" just now, for some reason, it's saying "P1" which is for sure a bug (e.g., if the space group is already set, don't override it.)

What I don't understand is: it definitely read the space group and associated information, but it doesn't seem to display it anywhere? I can't find it.

Also, it's allowing to edit cell parameters inconsistently with the space group.

This issue has been mentioned on Avogadro Discussion. There might be relevant details there:

https://discuss.avogadro.cc/t/heuristic-for-reading-cif-crystal-structures-v2/5340/1