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.
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
- Paste the CIF text or press Open .cif file.
- Set Repeat along a, b, c for a supercell, or keep 1 × 1 × 1 for the unit cell.
- Press Convert to XYZ and POSCAR.
- Check the space group, the number of atoms in the cell and the cell contents.
- 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
| XYZ | VASP POSCAR | |
|---|---|---|
| Coordinates | Cartesian, Å | Direct (fractional) |
| Cell | In the comment line (extended XYZ) | Three lattice vectors, scale 1.0 |
| Atom order | Grouped by element, in the order the elements first appear in the CIF | |
| Used by | Viewers, ASE, molecular programs | VASP 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
- Partial occupancy and disorder cannot be stored in XYZ or POSCAR; every listed site becomes a full atom.
- Hydrogens missing from the CIF are not added.
- The conventional cell is written; the tool does not reduce it to a primitive cell or change the setting.
- Atoms on the cell faces appear once (wrapped into the cell), not on every face, so the XYZ is suited to calculations rather than to ball-and-stick pictures of a closed box.
- Only the first data block with a cell and atom sites is read. Magnetic and modulated CIFs are not supported.
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 editorFrequently 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: