Skip to content
Johannes Voss edited this page Jul 28, 2015 · 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.

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).
  • Default pseudopotentials are not all identical to Dacapo ones; 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).
Clone this wiki locally