Pages

Quantum Espresso Output to CIF Format

Recently, I found myself needing to convert the results of some structure relaxations from Quantum Espresso to CIF format and was a little surprised not to find any convenient, pre-existing tools for doing so in the Quantum Espresso distribution or elsewhere online. Fortunately, there is a simple solution in the ASE Python package. In fact, this solution applies to many other format conversions as well.

To convert QE output to CIF format, install the ASE module and use the following code in the Python command line. The ".pwo" extension stands for "plane-wave output", the output from a plane-wave structural relaxation.

from ase.io import read,write

out = read("file.pwo", format="espresso-out")
write("struct.cif", out, format="cif")