Electronic and ionic structure calculations are performed by program pw.x.
The input data is organized as several namelists, followed by other fields introduced by keywords.
The namelists are
&CONTROL: general variables controlling the run &SYSTEM: structural information on the system under investigation &ELECTRONS: electronic variables: self-consistency, smearing &IONS (optional): ionic variables: relaxation, dynamics &CELL (optional): variable-cell dynamics &EE (optional): for density counter charge electrostatic correctionsOptional namelist may be omitted if the calculation to be performed does not require them. This depends on the value of variable calculation in namelist &CONTROL. Most variables in namelists have default values. Only the following variables in &SYSTEM must always be specified:
ibrav (integer): bravais-lattice index celldm (real, dimension 6): crystallographic constants nat (integer): number of atoms in the unit cell ntyp (integer): number of types of atoms in the unit cell ecutwfc (real): kinetic energy cutoff (Ry) for wavefunctions.For metallic systems, you have to specify how metallicity is treated by setting variable occupations. If you choose occupations='smearing', you have to specify the smearing width degauss and optionally the smearing type smearing. If you choose occupations='tetrahedra', you need to specify a suitable uniform k-point grid (card K_POINTS with option automatic). Spin-polarized systems must be treated as metallic system, except the special case of a single k-point, for which occupation numbers can be fixed (occupations='from input' and card OCCUPATIONS).
Explanations for the meaning of variables ibrav and celldm are in file INPUT_PW. Please read them carefully. There is a large number of other variables, having default values, which may or may not fit your needs.
After the namelists, you have several fields introduced by keywords with self-explanatory names:
ATOMIC_SPECIES ATOMIC_POSITIONS K_POINTS CELL_PARAMETERS (optional) OCCUPATIONS (optional) CLIMBING_IMAGES (optional)The keywords may be followed on the same line by an option. Unknown fields (including some that are specific to CP package) are ignored by PWscf. See file Doc/INPUT_PW for a detailed explanation of the meaning and format of the various fields.
Note about k points: The k-point grid can be either automatically generated or manually provided as a list of k-points and a weight in the Irreducible Brillouin Zone only of the Bravais lattice of the crystal. The code will generate (unless instructed not to do so: see variable nosym) all required k-point and weights if the symmetry of the system is lower than the symmetry of the Bravais lattice. The automatic generation of k-points follows the convention of Monkhorst and Pack.
Important: until v.4.0, atomic positions for a non scf calculations were read from input, while the scf potential was read from the data file of the scf calculation. Since v.4.1, both atomic positions and the scf potential are read from the data file so that consistency is guaranteed.
All options for a single SCF calculation apply, plus a few others. You
may follow a structural optimization with a non-SCF band-structure
calculation (since v.4.1, you do not need any longer to update the
atomic positions in the input file for non scf calculation).
See Example 03.
Use variable ion dynamics in namelist &IONS for a fine-grained control
of the kind of dynamics. Other options for setting the initial
temperature and for thermalization using velocity rescaling are
available. Remember: this is MD on the electronic ground state, not
Car-Parrinello MD.
See Example 04.
All options for a single SCF calculation apply, plus a few others. In the namelist &IONS the number of images used to discretize the elastic band must be specified. All other variables have a default value. Coordinates of the initial and final image of the elastic band have to be specified in the ATOMIC POSITIONS card. A detailed description of all input variables is contained in the file Doc/INPUT PW. See also Example 17.
The output data files are written in the directory specified by variable outdir, with names specified by variable prefix (a string that is prepended to all file names, whose default value is: prefix='pwscf'). The ''iotk'' toolkit is used to write the file in a XML format, whose definition can be found in the Developer Manual. In order to use the data directory on a different machine, you need to convert the binary files to formatted and back, using the ''bin/iotk'' script.
The execution stops if you create a file "prefix.EXIT" in the working directory. IMPORTANT NOTE: this is the directory where the program is executed, NOT the directory "outdir" defined in input, where files are written. Note that with some versions of MPI, the "working directory" is the directory where the pw.x executable is! The advantage of this procedure is that all files are properly closed, whereas just killing the process may leave data and output files in unusable state.