Message Boards Message Boards


[WSS20]Design & Implementation of Data Structure of Crystalline Atomic Data

Posted 1 year ago
6 Replies
34 Total Likes


Goal: One problem is to represent mineral crystals in a computable way using Wolfram Language and to develop an analogous representation for crystals as there is for molecules. The goal is to develop and implement a data structure that contains the necessary data for the construction of computational 3D models of crystals and to compute geometrical properties. To do this, we first obtain examples of crystal data to determine the scope that needs to be supported, then design a data structure, implement examples of structural data that were obtained in step one, and lastly demonstrate the usability of the implementation by 3D representation of the crystalline structure and computation of geometric properties of minerals and crystals of organic molecules.

Main Results: The project successfully demonstrated the feasibility of interpreting crystallographic data from minerals and organic crystals, by recreating crystalline networks and their representations both in the form of data and 3D graphics. For that, specialized functions were developed using Wolfram Language for this task, they are: CrystalLattice, CrystalLatticeValue, CrystalLatticeModify and CrystalLatticePlot3D. A new type of computable object, the CrystalLattice object, was developed along with it, which contains information from the .CIF files originating from the real experiments carried out with electron diffraction on minerals and organic crystals.

Future Work: This is only the first version of this innovative project, which can be improved and added to in future implementations, such as options, features and even performance of functions already developed. There is a large field of study where this project can be used, including, in the future, the possibility of editing crystalline molecules that will enable developers of new materials to view and test different properties of their work.

6 Replies


  • A new form of carbon allotrope was developed (30 June 2020 - link at the end of this post), harder and lighter than diamond; the pentadiamond! And I decided to update my work to demonstrate the use of the functions already developed, CrystalLattice, CrystalLatticeModify, CrystalLatticePlot3D.., for the visualization of this new crystal.


  • First, the CrystalLattice object is created, and the symmetry group is checked:

An attached notebook contains the pentadiamond object!



  • The symmetry group is the same as in the article (as expected!):


There are only 3 unequal carbons in position:


  • Using CrystalLatticeModify with "UnitCellCopy" {0,0,0} we obtain the symmetries together:

    pentadiamondSymmetry = 
     CrystalLatticeModify[pentadiamond, {"UnitCellCopy", {0, 0, 0}}]


  • Then CrystalLatticeModify is used again with the argument "UnitCellGather" to have the same display as the article of "pentadiamond":

    pentadiamondGather = 
      CrystalLatticeModify[pentadiamondSymmetry, "UnitCellGather"];


The article is: from Yasumaru Fujii, Mina Maruyama, Nguyen Thanh Cuong, and Susumu Okada Phys. Rev. Lett. 125, 016001 – Published 30 June 2020

I would like to point out that Robert Nachbar (Wolfram), my mentor, who provided the fundamental pieces to obtain the coordinates of this allotrope. Thank you!

Thank you all!


It should be emphasized that the data for the structure of pentadiamond are from an electronic structure calculation (reference above) for this theoretical carbon allotrope. Its properties are therefore predicted and yet to be confirmed experimentally.

Moreover, the data were not in the form of a CIF file and were compiled from information in the article and manually encoded as a CrystalLattice object in Wolfram Language. Additional coding was required to generate the 192 symmetry equivalent positions of the F m -3 m space group, which were critical for the construction of the theoretical crystalline network.

The central cavity of the structure shown in the third figure is composed of 24 5-membered rings and 6 8-membered rings, and has a total of 56 carbon atoms. Its point group symmetry is Oh. While the overall shape is spherical, it's best visualized as a cube with an 8-membered ring on each face (shown below), a triquinacene moiety at each vertex (shown below), and a pentalene moiety on each edge (shown below) of the cube. The diameter of the cavity is 6.50 Angstroms from pentalene to pentalene, and are large enough to contain a helium atom. These cavities are interconnected by cubic chambers composed solely of six 8-membered rings. The diameter of the chamber is 5.15 Angstroms.

Face view: enter image description here

Vertex view: enter image description here

Edge view: enter image description here


  • Ewingite: Earth’s most complex mineral

Ewingite is the most complex mineral on Earth, so I thought it would be interesting to use the CrystalLattice function to reproduce it’s visualization.

But there is still no Ewingite .CIF file available. So to make it possible, I manually edited and developed a .CIF file with the Ewingite information (this .CIF is attached for those interested). The information on this mineral was extracted from few articles (the links are at the end of this Update 2 and in the attach).

Image 1 (basic information - see link 1):


Image 2 (place of discovery - see link 1):


Image 3 (real image of the mineral - golden yellow):


  • Codes (.CIF + using CrystalLattice function):

First, what the .CIF of the mineral Ewingite looks like without taking into account the mineral's natural water molecules (NW – No Water):


ewNW = CrystalLattice[
  "C:\\Users\\quimi\\OneDrive\\Área de \


After creating Ewingite's CrystalLattice object, we apply CrystalLatticeModify to perform spatial symmetry in a unit cell:

ewNWsym = CrystalLatticeModify[ewNW, {"UnitCellCopy", {0, 0, 0}}]


After that, we check the density of the object with the density of the X-ray crystallography (note that the value is very close to that of the article):

valueD = CrystalLatticeValue[ewNWsym, 
  "CellDensity"]; UnitConvert[valueD, {"Grams"/"Centimeters"^3}]


So, we generated the 3D graph using CrystalLatticePlot3D, note that even without the water molecules this seems to be a very complex mineral:



Refining the visualization using the CrystalLatticeModify function in conjunction with the “UnitCellGather” argument. We can better see its structure inside the unit cell:

ewNWsymGather = 
  "UnitCellGather"]; CrystalLatticePlot3D[ewNWsymGather]


Now, comparing with the symmetry given in the article (we can see that the information proceeds):

Image 4 (Space Group symmetry - in attachment 1):


Finally, to have a glimpse of the real complexity, the coordinates of the oxygen atoms from the water molecules found in the mineral Ewingite were inserted in the .CIF file. Even so, the visualization still lacks the +3500 hydrogen atoms of this water that was not added due to difficulties in the data information:

ew = CrystalLattice[
  "C:\\Users\\quimi\\OneDrive\\Área de \
Trabalho\\Ewingite\\Ewingite.cif"]; ewSym = 
 CrystalLatticeModify[ew, {"UnitCellCopy", {0, 0, 0}}]; plot1 = 
 CrystalLatticePlot3D[ewSym]; ewSymGather = 
 CrystalLatticeModify[ewSym, "UnitCellGather"]; plot2 = 
 CrystalLatticePlot3D[ewSymGather]; {ewSym, plot1, plot2} // Column


  • Links:

Ewingite: Earth’s most complex mineral Travis A. Olds1 , Jakub Plasil2 , Anthony R. Kampf3 , Antonio Simonetti1 , Luke R. Sadergaski1 , Yu-Sheng Chen4 and Peter C. Burns1,5: file in attach*. (images 1 and 2)

Thank you.

enter image description here -- you have earned Featured Contributor Badge enter image description here

Your exceptional post has been selected for our editorial column Staff Picks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

Could this be used to make the plesiohedra?

No, the fractional lattice coordinates of the atoms and the symmetry elements of the space group are part of the input data in the CIF file. It could be adapted to tile 3D space with plesiohedra given the coordinates of their vertices, lists of vertices comprising the faces, and the elements of the corresponding space group.

For those not familiar with plesiohedra, see also the Wikipedia page.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract