xtal2png: A Python package for representing crystal structure

Sterling G. Baird, Kevin M. Jablonka, Michael D. Alverson, Hasan M. Sayeed, Mohammed Faris Khan, Colton Seegmiller, Berend Smit, and T. D. Sparks, xtal2png: A Python package for representing crystal structure as PNG files J. Open Source Softw. 7 (76), 4528 (2022) doi: 10.21105/joss.04528

Abstract: The latest advances in machine learning are often in natural language processing such as with long short-term memory networks (LSTMs) and Transformers, or image processing such as with generative adversarial networks (GANs), variational autoencoders (VAEs), and guided diffusion models. xtal2png encodes and decodes crystal structures via PNG images by writing and reading the necessary information for crystal reconstruction (unit cell, atomic elements, atomic coordinates) as a square matrix of numbers. This is akin to making/reading a QR code for crystal structures, where the xtal2png representation is an invertible representation. The ability to feed these images directly into image-based pipelines allows you, as a materials informatics practitioner, to get streamlined results for new state-of-the-art image-based machine learning models applied to crystal structures.