# CIF handling should be optimized (I)

**URL:** <https://discuss.avogadro.cc/t/cif-handling-should-be-optimized-i/7287>\
**Category:** Support\
**Created:** [January 27, 2026, 5:37pm UTC](https://discuss.avogadro.cc/t/cif-handling-should-be-optimized-i/7287 "2026-01-27T17:37:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [January 27, 2026, 6:03pm UTC](https://discuss.avogadro.cc/t/cif-handling-should-be-optimized-i/7287/2 "2026-01-27T18:03:36Z")

</div>

You can find ample discussion of this on the forum (e.g. from @Thomas in particular) . I welcome suggestions.. there are a few requests on the [GitHub issues](https://github.com/OpenChemistry/avogadrolibs/issues) as well.

> [@anon86203829](#):
>
> I think most users would expect that when loading a CIF, the entire unit cell content would be displayed, not just the asymmetric unit as is currently the case.

The problem is that some CIF are molecules (i.e., give me just the asymmetric unit) and some are solids, in which case people want the primitive cell.

I welcome [heuristics](https://discuss.avogadro.cc/t/heuristic-for-reading-cif-crystal-structures-v2/5340/) to differentiate these use cases. Using the asymmetric unit, with the ability to generate the primitive cell easily is the current default.

If you have a good suggestion for “this CIF should show the primitive cell instead of the asymmetric unit” I’d be happy to implement it (e.g. how to detect a molecule vs. a solid)

> [@anon86203829](#):
>
> The “Fill unit cell…” command does not work properly, see image of an NaCl crystal.

I’m not sure what you want it to do. That’s the primitive unit cell. Do you want it to include the redundant edge and corner atoms?

The catch of course with that is exporting to other formats (e.g., calculations) in which primitive is needed and the edge and corner atoms are duplicates.

We can certainly add some command like “Fill Edges and Corners” or something.. Suggestions for wording would be helpful.

> [@anon86203829](#):
>
> It is unclear to me what the “Wrap Atoms to Unit Cell” command means – perhaps that only atoms with coordinates between 0.001 and 0.999 are displayed?

It takes any atoms outside of [0, 1] and wraps them into the base unit cell. Perhaps that’s a documentation thing, but I’m not sure why you think that isn’t working?

Please don’t take this as critical - I definitely want to see improvements in how we handle crystal structures, solids and materials.

> [@anon86203829](#):
>
> The “Plot Theoretical XRD Pattern” command does not work for me (“Could not find genXrdPetern executable”).

Hmm. I’ll see why that’s missing. You should be able to download it from [https://github.com/psavery/genXrdPattern/releases/download/1.0-static/win64-genXrdPattern.exe](https://github.com/psavery/genXrdPattern/releases/download/1.0-static/win64-genXrdPattern.exe)

---

_[View the full topic](https://discuss.avogadro.cc/t/cif-handling-should-be-optimized-i/7287)._
