Skip to content
Johannes Voss edited this page Feb 22, 2016 · 16 revisions

Running espresso

  • How do I initialize a self-consistent calculation with the Kohn-Sham potential from a previous calculation?
    Store the charge density with calc.save_chg(filename) and reload it for the new calculator with othercalc.load_chg(filename). Use startingpot='file' in the new calculator definition to initialize the Kohn-Sham potential from the loaded charge density.

  • How do I initialize a non-self-consistent calculation with the Kohn-Sham potential from a previous calculation?
    Preferably use save_flev_chg/load_flev_chg so that the Fermi level EF is stored in addition to the charge density, and band structure or density of states can be plotted with respect to EF. See the Band structure calculation example.

  • Is the symmetry of the system conserved when using the ASE-optimizer and activating the use of symmetry, which is the default (nosym=False)? No, the ASE-optimizer may break the symmetry if ASE-imposed constraints don't obey it and you will then end up with a system with lower symmetry. Furthermore, if that is the case, the energy of this asymmetric structure will be wrong, because Quantum Espresso will still apply the initial symmetry to the current structure. Unless you are absolutely sure that your system will stay in the initial symmetry because it is the most stable geometry, you should set nosym=True when using the ASE-optimizer. Activating the dipole-correction will also disable the use of symmetry.

Things to consider when switching from Dacapo to Espresso

  • Density cut-offs are defined differently in Dacapo and Espresso; when using ultrasofts the rule of thumb for Espresso is dw=10pw (when only norm-conserving pseudopotentials are used dw must be 4pw.)
  • Dacapo will turn on k-point parallelization automatically, use parflags='-npool number_of_nodes' to turn on k-point-/spin-parallelization in Espresso (make sure you have enough k-points to distribute (evenly)).
  • With equivalent parameters and when using the same ultrasofts, total energies from Dacapo and Espresso can be compared. Note, however, that the default MP k-point grids of the form n1xn2xn3 with any ni even are different because Espresso centers at Γ (unless a non-zero kptshift is specified), while Dacapo does not perform centering.
  • Espresso's default charge-density mixing parameter is large (70%). Espresso's mixer is actually able to handle this and it generally works well for bulk systems, but for slab calculations 30% is a safer choice (convergence={'mixing':0.3}; adding a preconditioner via 'mixing_mode':'local-TF' can further improve convergence for slab calculations).
  • While the same pseudopotentials used in Dacapo can be used with Quantum Espresso, too, newer pseudopotentials are often harder; make sure to check the minimum recommended cutoffs and run convergence tests accordingly.

Using the interface to only create input for pw.x to run pw.x separately without the ase-espresso interface

  • The following snippet will setup a simple pw.inp file (with most parameters at their default values)
from espresso import espresso
from ase.lattice import bulk
atoms = bulk('Pt','fcc',4.0)
calc = espresso(pw=400,nbands=24,kpts=(12,12,12),mode='scf',
    onlycreatepwinp='pwscf.inp')
calc.initialize(atoms)
  • Constraints on coordinates supported by Quantum Espresso are translated from ase constraints.
  • More complex contraints require pw.x to be run by ase-espresso, which requires espsite.py to be configured for the computers used (there are examples for this file for several schedulers in the git checkout).

Miscellaneous

  • In calc_pdos, setting the option add_higher_channels to True yields better PDOS (default since c91b4c2).