Pymatgen supports reading of most common file formats, including the Crystallographic Information File and various input and output files of computational codes like VASP. However, it is often easier and quicker to directly query for structures from online sources. Though private databases such as the Inorganic Crystal Structure Database are not open, there are open sources such as the Materials Project and the Crystallographic Open Database (COD) where one can obtain crystal structures.

Written using:

Materials Project

Pymatgen contains a high-level interface to the Materials Project, which can be used to query for structures very easily.


To obtain structures from COD by the COD id, you just need to know the id. However, most sophisticated searches require that you have installed mysql given that the COD does not support a proper REST API at this time.