MolDraw › Chemistry tools › CIF to XYZ and POSCAR Converter

CIF to XYZ and POSCAR Converter

In short: Paste a crystal CIF or open one. The tool applies the space-group symmetry to fill the unit cell, builds a supercell if you want one, and writes XYZ and a VASP POSCAR. It is free, runs in your web browser and needs no download.

Works with CIF files from the COD, ICSD, the Materials Project and most crystallography programs. Nothing is uploaded.

Quick answer: Press NaCl example. The CIF lists 2 sites (Na and Cl) and 192 symmetry operations of Fm-3m. They expand to the conventional cell with 4 Na + 4 Cl = 8 atoms, a = 5.6402 Å. Set the repeats to 2 × 2 × 2 for a 64-atom supercell.

1 × 1 × 1 is the unit cell. Larger numbers build an n × m × k supercell.

Ready.

XYZ (extended XYZ with lattice)

VASP POSCAR

How to convert CIF to XYZ or POSCAR

  1. Paste the CIF text or press Open .cif file.
  2. Set Repeat along a, b, c for a supercell, or keep 1 × 1 × 1 for the unit cell.
  3. Press Convert to XYZ and POSCAR.
  4. Check the space group, the number of atoms in the cell and the cell contents.
  5. Press Download .xyz or Download POSCAR.

From CIF to a full unit cell

A CIF (Crystallographic Information File) gives the cell lengths a, b, c and angles α, β, γ, the space group and its symmetry operations (such as -x, y+1/2, -z), and only the symmetry-unique atom sites, in fractional coordinates. To get every atom in the cell, each operation is applied to each site, the result is wrapped into the cell (0 ≤ x < 1), and copies closer than 0.1 Å are merged.

The reader is the same one MolDraw's Crystal View uses. It handles CIF 1.1 and the common CIF 2 tag names, Cartesian sites, oxidation states in type symbols and numbered symmetry operations. It was checked against ASE on rock salt, rutile, SiC, cristobalite (SiO2), MoS2 (R3m) and a triclinic mineral.

The two output formats

XYZVASP POSCAR
CoordinatesCartesian, ÅDirect (fractional)
CellIn the comment line (extended XYZ)Three lattice vectors, scale 1.0
Atom orderGrouped by element, in the order the elements first appear in the CIF
Used byViewers, ASE, molecular programsVASP and most plane-wave codes

The lattice is written in the standard setting: a along x, b in the xy plane, c completing a right-handed set. For more on CIF files, see the Crystal View guide.

Limitations

Want to see the crystal in 3D? Open the CIF in MolDraw's Crystal View to look at the unit cell, bonds and polyhedra.

Open MolDraw editor

Frequently asked questions

How do I convert a CIF file to POSCAR for VASP?

Open the .cif file or paste its text and press Convert. The tool applies the symmetry operations to the atom sites to fill the unit cell, then writes a VASP 5 POSCAR with the lattice vectors in ångström, an element line, the atom counts and Direct (fractional) coordinates. Press Download POSCAR.

How many atoms should the NaCl unit cell have?

Eight. Rock salt has space group Fm-3m with Z = 4, so the conventional cubic cell (a = 5.64 Å) holds 4 Na and 4 Cl. The CIF lists only one Na and one Cl site; the 192 symmetry operations generate the rest. The tool merges copies that land on the same spot (within 0.1 Å).

How do I make a supercell?

Set Repeat along a, b and c, for example 2, 2 and 2, and convert. The lattice vectors are multiplied by the repeats and the atoms are copied into each new cell. A 2 × 2 × 2 NaCl supercell has 64 atoms.

Why does the XYZ file have a Lattice line?

The comment line uses the extended XYZ style: Lattice="…" with the three lattice vectors and pbc="T T T". ASE, OVITO and similar programs read it as a periodic cell; plain XYZ readers simply ignore the comment.

What about partial occupancy and missing hydrogens?

XYZ and POSCAR cannot store occupancy, so every partly occupied site is written as a full atom and the tool warns you. Many X-ray CIFs also leave out hydrogens. Fix both before a calculation.

Last updated: