# How can I get xyz coordinates of atoms of a unit cell structure from CIF format files?

I'm trying to run DFT or other 1st principle simulation of Pyrope ($$\ce{Mg3Al2Si3O12)}$$ and Grossular $$\ce{(Ca3Al2[SiO4]3)}$$ unit cell structure. So, I'm looking for unit cell xyz periodic box structure of Pyrope and Grossular.

I found some data from several places (here, here and here)

CIF format files from those databases do not give me proper atomic coordinates of unit cell. I downloaded CIF files for Pyrope from those databases, and converted with Open Babel, and even visualized with VEGA ZZ.

However, it displays only 4 atoms in the periodic box, while Pyrope or Grossular should have 20 atoms in the periodic box based on their formula (Pyrope ($$\ce{Mg3Al2Si3O12)}$$ and Grossular $$\ce{(Ca3Al2[SiO4]3)}$$).

This means either CIF of database is wrong, or I am. Or the software is unable to read CIF properly. I think I'm doing something wrong, but I'm not sure what is wrong with my CIF conversion.

If anyone knows how to retrieve the unitcell structure of crystals from CIF from those databases, please help me.

• CIFs typically contain just the independent part. – Ivan Neretin Apr 24 '19 at 15:46
• thank you for your comment. Could you explain a bit more if possible? Is this means I cant get unit cell structure from CIF? Then how can we get xyz coordinates of atoms of unitcell for crystals? – exsonic01 Apr 24 '19 at 16:00
• Have you tried Mercury from CCDC? I use it to convert crystal structures of molecules to the Xmol format. – Martin - マーチン Apr 24 '19 at 16:24
• @Martin-マーチン thank you, I installed Mercury and opened CIFs from Mercury. The results look much more promising, but I also see numerous number atoms are placed outside of the periodic box, and converted structure (xyz and pdb) is not the unit cell... Do the CCDC and Mercury provide their own database of unitcell for Mercury? – exsonic01 Apr 24 '19 at 17:09

CIF contains coordinates for the atoms in asymmetric unit only (what Ivan called "the independent part" in the comments), plus the set of symmetry operation to fill the remaining space with those atoms. What you want to do is to open CIF in any viewer supporting that format, make sure the unit cell is packed, e.g. the symmetry operations are applied along all three crystallographic axes $$a, b, c$$ from $$0$$ to $$1$$ and export the data to *.xyz format. There are several programs that are capable of doing this. For consistency I suggest using crystallographic data by Meagher [1] for both minerals at 25 °C from AMCSD:

### CSD Mercury

As Martin suggested, Mercury (Free, available on Windows, Linux, MacOS) is one of the most user-friendly and reliable crystallographic viewers.

1. Open the program and load CIF (I loaded pyrope.cif). An asymmetric unit pops up:

1. Go to Calculate → Packing/Slicing… and under Packing area tick Pack option, and under Include Atoms area select … that Fit.

1. Now you have the content of the entire unit cell:

1. Save the data as XYZ by clicking File → Save As… → Save as type: XMol files (*.xyz). This produces a file with the coordinates of all atoms of the unit cell.

Unfortunately, I'm not aware of a good method to eliminate atoms located on the periodic boundary with Mercury as packing coordinates can only be changed by a 0.1 Å step, which is rather crude. However, there is a workaround I'm aware of with another program, VESTA.

### VESTA

VESTA (free, available on Windows, Linux, MacOS) is yet another functional crystallographic viewer.

1. Open the program and load CIF (again, I loaded pyrope.cif). By default VESTA not only recognizes atomic connectivity, but also populates the unit cell and the first coordination spheres of all atoms on top of that.

1. Since the goal is to cut off the content of neighboring unit cells and the boundary atoms, the interatomic bonds should be removed. Go to Edit → Bonds… and delete all [three] bonds from the list.

1. Now we have the same atomic set as in Mercury after packing with all the boundary atoms present.

1. To eliminate the boundary atoms, you can decrease the boundary box by a tiny fraction. On Style tab click Boundary… button and adjust upper and lower limits for all three axes ($$x_\mathrm{min}$$, $$x_\mathrm{max}$$, $$y_\mathrm{min}$$, $$y_\mathrm{max}$$, $$z_\mathrm{min}$$, $$z_\mathrm{max}$$) making the box smaller by 0.001 Å on each margin.

1. After applying new boundaries you get the unit cell content without boundary atoms.

1. Save the data as XYZ by clicking File → Save As… → Save as type: XYZ file (*.xyz).

### References

1. Meagher, E. P. The Crystal Structures of Pyrope and Grossularite at Elevated Temperatures. American Mineralogist 1975, 60 (3–4), 218–228.
• Thank you so much!!! Looks like 1.0 packing also includes the atoms in periodic boundary, which I think is not a proper unit cell, but I will read more manual to check the periodicity of unit cell. Thank you! – exsonic01 Apr 24 '19 at 21:13
• @exsonic01 No prob, the thing with Mercury is that I don't know how to change the packing box more precisely. I added a workaround for VESTA as an alternative though, which, if I understood you correctly, does precisely what you asked for. – andselisk Apr 24 '19 at 21:48
• Thank you so much. For my purpose, range of fraction should be 0 to 0.999 for 3 directions, because I need to include atoms of periodic boundary at only 3 surfaces, not 6 surfaces neither 0 surfaces. This gave me 160 atom unit cell, I may able to decrease the unit cell size even more by tweaking fractional coord range. But I need to calculate the unit cell size carefully in this case. Thank you to let me know about VESTA. – exsonic01 Apr 24 '19 at 22:08
• @exsonic01 Ah, I see now. Yep, then you need to use 0, not 0.001 for the lower limit. – andselisk Apr 24 '19 at 22:10

Possibly Avogadro may deserve a test complementary to the suggestions by @andselisk, too. Similar as @andselisk, I accessed the 25 degC *.cif data set about Pyrope by Meagher1975 at AMCSD. Already the very first automatic display of the data was the one about an unit cell depicted below:

The program may be of interest for you since it allows to save this packed cell both as *.xyz, as well *.gamin / GAMESS input, *.gau / Gaussian cartesian input, or *.gzmat / Gaussian Z-matrix input. Perhaps equally of interest for you is the entry "Slab builder" in the section of crystallography, where you may define (and eventually export) little "islets" of the structure of predefined dimension oriented along the Miller indices.

For this test, I used Avogadro 1.2.0 in an instance of Linux Xubuntu 18.04.2 LTS.

• That's a great one, I totally forgot about Avogadro! For some reason I always think of it as of molecular editor and I forget to mention it when it comes to crystalline matter. – andselisk Apr 24 '19 at 23:10
• @andselisk Using Avogadro more often than Mercury often is by mere "infection" / "seeding" in a mixed ecosystem of chemists and physicists with Xray *.cif and computational results on the desk. Maybe the newer branch (Avogadro2) allows to pack crystallographic cells in a range ]0...1[ as shown in your example with Vesta I should look at. – Buttonwood Apr 24 '19 at 23:28
• Just in case, VESTA works just fine on Xubuntu 18.04 (screenshot) ;) – andselisk Apr 24 '19 at 23:41
• Thank you!! I heard about Avogadro before, but I didn't know it has such options. I will check this out too! – exsonic01 Apr 25 '19 at 0:15
• @andselisk To prevent potential misunderstanding: a) I meant that I did not see (yet) the newer branch Avogadro2 listed in the default repositories of Xubuntu 18.04 or Debian testing (but Fedora, for example, offers it for multiple years). b) Vesta's developers and potential users might find your findings valuable since currently the list of Linuxes known to work with it stops at Ubuntu 16.04, justifying a note to vesta.dev(at)gmail.com. – Buttonwood Apr 25 '19 at 22:34