MaXrd: Mathematica X-ray diffraction package
A comprehensive Mathematica package for crystallographic computations,
MaXrd, has been developed. It comprises space group representations based on International Tables for Crystallography, volume A together with scattering factors from XOP and cross sections from xraylib.
Featured functionalities include calculation of structure factors, linear absorption coefficients and crystallographic transformations. The crystal data used by
MaXrd is normally generated from external cif files.
The package comes with a dynamic documentation seamlessly integrated with the Mathematica system, including code, examples, details and options. From the onset, minimal Mathematica experience is required to make use of the package. It may be a helpful supplement in research and teaching where crystallography and X-ray diffraction are essential. Although Mathematica is a proprietary software, all the code of this package is open source. It may easily be extended to cover user-specific applications.
The article Using Mathematica as a platform for crystallographic computing was published in the Journal of Applied Crystallography in February 2019 (Ramsnes, S., Larsen, H. B. & Thorkildsen, G. (2019). J. Appl. Cryst. 52, 214–218).
Clone or download the repository if you want to develop on the package.
If you want to use the package, download the latest (or desired) release (
In the file menu in Mathematica, select
File -> Install.... In the pop-up window select Application as the type of item to install and From File ... as the source. Select the downloaded zip file and click on OK. Wait for the extraction of files to be completed and restart Mathematica.
Load the package with:
If you want MaXrd to launch automatically on startup, first open the Wolfram Language Documentation Center. This can be done from the file menu:
Help -> Wolfram Documentation. Scroll to the bottom and click on Add-ons and Packages. Click on the triangle next to MaXrd to open the cell and then the same for Manage. Make sure the option Startup is selected.
To access the package documentation, open the Wolfram Documentation in Mathematica after installing it and search for «MaXrd» or any related content.
Note on version compatibility
The latest version of MaXrd is 1.4.0 which is compatible with Mathematica version 11.3.
It is technically compatible with Mathematica version 10.3 with regards to functionallity, but the documentation will appear broken.