Skip to content
Converts (most) CIF files to VASP's POSCAR format


This script converts a file from the CIF format to VASP's POSCAR format. It does not support fractional occupancies. There may also be other limitations not yet discovered.


$ cif2vasp [-v] [-f] [-e gulp|ase|cctbx] filename.cif


The first version of this script was inspired by the procedure found at, but I added a better CIF parsing routine using the PyCifRW library. While this version of the script (to be referred to as the GULP backend) still works great, it has very many dependencies. In order to simplify things, I first looked into CCTBX, and later ASE, both powerful Python packages, with ASE being the simplest one to install and use.


The excellent ASE package, available from, almost eliminates the need for this script, since converting a file actually is done with just three lines of code:

from ase import io
atoms ='.cif')
atoms.write('POSCAR', format = 'vasp')

Using other backends is recommended if you run into problems with ASE's CIF parsing, or want direct coordinates directly (ASE writes cartesian).


This backend will give slightly more feedback during the conversion, and will provide a warning if fractional occupancies are found, but the numerical noise is about 1e-10, compared to 1e-16 for ASE because of the intermediate XYZ file with only 10 digits. The GULP process will write direct coordinates.



  1. prepareGulpInput: Read CIF file using the PyCifRW library and write GULP in file.
  2. runGulp: Run GULP to generate all unit cell coordinates based on the spacegroup symmetry operations.
  3. runConvasp: Write XYZ file from GULP out file, then use ACONVASP to convert the cartesian coordinates in the XYZ file into fractional coordinates.

I also experimented with ATAT (ezvasp) from . You may try modifying the script to run cif2vaspUsingGULP(jobname, ezvasp = True)


I looked into using the Computational Crystallography Toolbox (CCTBX), which is a powerful Python package available from I did however run into some problems getting CCTBX to play nicely with my current Python installation. The CCTBX support is therefore experimental.

Something went wrong with that request. Please try again.