next up previous contents
Next: 4.2 Phonon calculations Up: 4 Using PWscf Previous: 4 Using PWscf Contents

Subsections

4.1 Electronic and ionic structure calculations

Electronic and ionic structure calculations are performed by program pw.x.

4.1.0.1 Input data

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 corrections
Optional 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.

4.1.1 Typical cases

We may distinguish the following typical cases for pw.x:

4.1.1.1 Single-point (fixed-ion) SCF calculation

Set calculation='scf'. Namelists &IONS and &CELL need not to be present (this is the default).
See Example 01.

4.1.1.2 Band structure calculation

First perform a SCF calculation as above; then do a non-SCF calculation by specifying calculation='bands' or calculation='nscf', with the desired k-point grid and number nbnd of bands. If you are interested in calculating only the Kohn-Sham states for the given set of k-points, use calculation='bands'. If you are interested in further processing of the results of non-SCF calculations (for instance, in DOS calculations) use calculations='nscf'. Specify nosym=.true. to avoid generation of additional k-points in low symmetry cases. Variables prefix and outdir, which determine the names of input or output files, should be the same in the two runs.
See Example 01.

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.

4.1.1.3 Structural optimization

Specify calculation='relax' and add namelist &IONS.

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.

4.1.1.4 Molecular Dynamics

Specify calculation='md' and time step dt.

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.

4.1.1.5 Polarization via Berry Phase

See Example 10, its README, and the documentation in the header of PW/bp_c_phase.f90.

4.1.1.6 Nudged Elastic Band calculation

Specify calculation='neb' and add namelist &IONS.

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.

4.1.2 Data files

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.


next up previous contents
Next: 4.2 Phonon calculations Up: 4 Using PWscf Previous: 4 Using PWscf Contents
Paolo Giannozzi 2009-10-01