Skip to content

Pre-processing and post-processing FAQs

This page collects FAQs related to pre-processing and post-processing tools as well as tricks to be more productive when preparing ABINIT input files.

Can I use a xyx file to specify the unit cell?

Yes, see xyzfile

Can I use a cif file to specify the unit cell?

ABINIT does not accept cif files in input but it is possible to convert cif to a format that ABINIT understands. Perhaps, the easiest solution is to use the AbiPy script: convert CIF_FILE

It is also possible to generate a cif file at the end of the GS calculation with the prtcif variable, although it is much easier to use AbiPy to perform such task with the command line interface. convert FILE -f cif

where FILE is any file with a structural info such as the, the DDB file, an ABINIT input file, etc.


In the cif format, the lattice is usually specified in terms of the three angles formed by the direct lattice vectors (\alpha, \beta, \gamma and their lengths). Note that these six parameters are not enough to specify the nine entries of the lattice matrix %rprimd expected by Abinit since any rigid rotation of the lattice will give the same angles and the lengths reported in the CIF file. The CIF parser implemented in pymatgen fixed this arbitrariness using some conventions.

This can lead to unexpected behaviour if one tries to convert an Abinit structure to CIF format and then reuse this CIF file to reconstruct the structure since you are not guranteed to get that same orientation of the lattice. Vectors or tensors components expressed in the reduced coordinates obviously depend on the value of %rprimd used in the calculation. Obviously one can always transform from one lattice to the other one but, in order to be on the safe side, we suggest using CIF files only when specifying the initial lattice and then rely on the ABINIT usual variables.

Can I use POSCAR files with ABINIT?

Yes, please consult the documentation of the structure variable. Note that it is also possible to convert a POSCAR to the Abinit format with: convert POSCAR

How can I convert a structure to primitive?

Use abipy : primitive FILE

Wyckoff positions and site symmetries

Use abipy : wyckoff FILE

How can I compare my structure with the materials project database?

Use abipy : mp_match FILE

How can I visualize a structure?

With abitk, one can read a DEN/WFK file and produce an xsf file visualize FILE -a vesta visualize --help


  -a APPNAME, --appname APPNAME
                        Application name. Possible options: avogadro, ovito, v_sim, vesta, xcrysden, mpl
                        (matplotlib), mayavi, vtk

Can I include external files in the input?

Sure you can. Abinit supports the include statement that can be used to include external files. In your input file, add a line with the syntax:

include "name_of_file_to_be_included_in_the_input_file"

where you must obviously change the argument name_of_file… but keep the quotation marks.


include is not a standard variable thus it not listed in the variables page.

Is there an easy way to print the warnings/comments in the log file?

Warnings, Comments and Errors are written in Yaml format. LOG_FILE --print   # or -p

Is there an easy way to obtain a high-symmetry k-path?

Use abipy : kpath FILE

Is there an easy way to plot an electronic band structure?

The most important results of a GS run, including the KS energies, are stored in the output file. To plot the band structure with matplotlib, use the script and the syntax: GSR_FILE --expose  # or -e

Other options are available. See --help.

To generate an xmgrace file with electron bands, use and the command: ebands --xmgrace

How can I visualize the evolution of the cell during a structural relaxation run.

The lattice paramenters, atomic positions, forces at each relaxation step are stored in the output file.

To print HIST_FILE -p

To visualize the results with matplotlib, use: HIST_FILE -e

To visualize the results with matplotlib, use: hist -a ovito     ==> Visualize relaxation/molecular dynamics results with ovito. hist --xdatcar    ==> Convert into XDATCAR format (caveat: assume fixed unit