Back to main menu

Format: PW

Name: Quantum Espresso PWscf format

Extension: pw

Specification: Quantum Espresso documentation

Visualization programs: VESTA, XCrySDen

Restrictions

Atomsk can read Quantum Espresso PWscf files (*.pw). If coordinates are reduced (i.e. if they appear after ATOMIC_POSITIONS crystal) then Atomsk will immediately convert them to cartesian coordinates. To convert back to reduced coordinates one can use the option -frac. If atom positions are given in lattice coordinates (i.e. if they appear after ATOMIC_POSITIONS alat) then Atomsk will also immediately convert them to cartesian coordinates.

By default in the Quantum Espresso PW file format, all quantities whose dimensions are not explicitly specified are in Rydberg atomic units, in particular cell dimensions and atom positions are in units of Bohr radius. So, if cell dimensions and atom coordinates are all expressed in the same units (e.g. all in Bohr, or all in anstroms), then Atomsk conserves this unit (i.e. coordinates are NOT converted to angstroms or any other particular unit). However, if no unit is specified for the cell (meaning it is in Bohr), while the atom coordinates are specified in angstroms, then the cell vectors are converted to angströms for consistency. To convert units, one can also use the option -unit.

Note that in this format the cell vectors and atom positions can be specified in Bohrs (if ATOMIC_POSITIONS bohr is used), however Atomsk does not automatically convert them to Angströms (nor to any other arbitrary unit). If needed, one can use the option -unit to perform the conversion before writing or after reading a PW file.

When writing a file in the PW format, Atomsk will use a format similar to the following:

example.pw

&CONTROL
title = '<comment>'
pseudo_dir = '/your/path/to/pseudo/'
calculation = 'scf'
/

&SYSTEM
nat= <NP>
ntyp= <Nspecies>
ibrav= 0
ecutwfc= 20.0
/

&ELECTRONS
mixing_beta = 0.7
conv_thr = 1.0d-8
/

&IONS
/

&CELL
/

ATOMIC_SPECIES
<sp1> <mass1> sp1.fixme.upf
...
<spN> <massN> spN.fixme.upf

CELL_PARAMETERS angstrom
<H(1,1)> <H(1,2)> <H(1,3)>
<H(2,1)> <H(2,2)> <H(2,3)>
<H(3,1)> <H(3,2)> <H(3,3)>

ATOMIC_POSITIONS angstrom
<atom1> <x1> <y1> <z1> [<fixx1> <fixy1> <fixz1>]
<atom2> <x2> <y2> <z2> [<fixx2> <fixy2> <fixz2>]
... ... ...
<atomN> <xN> <yN> <zN> [<fixxN> <fixyN> <fixzN>]

K_POINTS automatic
2 2 2 0 0 0

ATOMIC_FORCES
<atom1> <fx1> <fy1> <fz1>
<atom2> <fx2> <fy2> <fz2>
... ... ...
<atomN> <fxN> <fyN> <fzN>

That file is just a draft and will have to be edited, it is NOT fully set for a simulation.

First, the path to the pseudopotentials (i.e. "pseudo_dir") corresponds to the environment variable "$ESPRESSO_PSEUDO". If this variable is undefined, then "pseudo_dir" is set to the default value "$HOME/espresso/pseudo/". It is up to the user to check that this path is correct.

Second, to fill the section "ATOMIC_SPECIES", Atomsk looks for pseudopotential files in the folder "pseudo_dir" as defined above. For each chemical element present in the system, Atomsk uses the first file whose name starts with that element symbol. That means that, if the path "pseudo_dir" is correctly specified, and it contains only one file for each chemical element, then this file name is written in the *.pw file by Atomsk. If that folder contains several pseudopotentials for the same element, then the name of the first file will be used (this may not be what you want). If no pseudopotential is found for a given element, a dummy name will be written, containing the string "fixme". In any case, it is up to the user to verify that these file names are correct and suit his purposes.

Third, the parameters for the DFT calculation are set to some default values: calculation='scf', ecutwfc=20, k-points grid 2x2x2, and so on. These values are arbitrary and should not be used as such! It is up to the user to modify these parameters and use values that correspond to his purposes.

Finally, if atom forces are defined then they will be written in the section "ATOMIC_FORCES". Otherwise this section will not exist.

By default Atomsk uses ATOMIC_POSITIONS crystal if atom coordinates are reduced (e.g. if the option -frac was used), or ATOMIC_POSITIONS angstrom if coordinates are cartesian. Therefore, if coordinates and cell parameters are actually in Bohrs, then the lines ATOMIC_POSITIONS angstrom and CELL_PARAMETERS angstrom will be wrong and will have to be modified manually; the tool qepw_bohr.sh can fix these lines.

If auxiliary properties exist, then only the fixed coordinates (fixx, fixy, fixz) are written for each atom.

Examples

Back to main menu