Back to main menu

## Format: POSCAR

Name: atomic positions for the Vienna Ab initio Simulation Package (VASP)

Extension: none (the file must be named POSCAR for use with VASP)

Specification: VASP documentation

Visualization programs: Jmol, OVITO, VESTA, VMD

#### Restrictions

Atomsk can read files in the POSCAR format as specified in VASP versions 4.x and 5.x. This also includes the output files CONTCAR, CHG, CHGCAR generated by VASP. If atomic species are defined in the file (as should be the case for VASP 5.x), then Atomsk will use them. If they are not (VASP 4.x and earlier), then Atomsk will search for a POTCAR file in the current directory, and if it exists read the atom species from it. Otherwise, dummy numbers will be used (first element will have atomic number=1, second =2, etc.). It is possible afterwards to use the option `-substitute` to replace each dummy number by the appropriate atom number. If the keyword "Selective dynamics" is used, then Atomsk will look for the frozen coordinates of atoms, and save them as auxiliary properties.

Note that when reading CHG or CHGCAR files, then Atomsk only reads box vectors and atom positions, and totally ignores the electron charge densities.

When writing a POSCAR file, Atomsk will use the VASP 5.x specification, i.e. atomic species will be written in the file. To convert this file for VASP 4.x, the line containing atomic species can simply be deleted. In addition, in POSCAR files the atoms of same species should be contiguous; if it is not the case Atomsk will propose to pack them (this is identical to `-sort species pack`). By default atom positions are written in cartesian coordinates; the option `-frac` can be used to produce a file with reduced ("Direct") coordinates. If some atoms are frozen (either as defined in the input file, or by using the option `-freeze`) then the keyword "`Selective dynamics`" will automatically be added, and the corresponding flags will be appened to the atom positions.

#### Examples

- `atomsk unitcell.xsf -duplicate 1 1 4 -sort species pack POSCAR`

  This will read the file `unitcell.xsf`, duplicate it to form a 1x1x4 supercell, then sort atoms according to their species, and write the final result to the VASP file `POSCAR`.

- `atomsk CONTCAR -sub 1 Fe -sub 2 C final.xsf`

  This will read the VASP restart file `CONTCAR`, substitute atoms of type 1 with iron and those of type 2 with carbon, and write the final result to `final.xsf`.

Back to main menu