Skip to content

Plugin Quantum ESPRESSO Input Generator

Hiromichi Yokoyama edited this page Nov 14, 2026 · 9 revisions

Plugin: Quantum ESPRESSO Input Generator

Quantum ESPRESSO Input Generator generates input files for the pw.x program of the Quantum ESPRESSO suite from molecules or crystal structures, featuring live input file preview, automatic pseudopotential filename resolution, and comprehensive calculation controls.

Repository moleditpy_quantum_espresso_input_generator
Author HiroYokoyama
Supported OS Windows, macOS, Linux, WSL
Supported Python >=3.9, <3.15
Supported MoleditPy >=5.0.0, <6.0.0
First-party plugin license LGPL-3.0-or-later
Menu location File ▸ Export ▸ Quantum ESPRESSO Input (pw.x)...
Extra dependencies None (uses NumPy, PyVista, RDKit from the MoleditPy environment)

See Official Plugins for the full catalogue.


1. Structure sources

The plugin supports three structural inputs:

  1. Current Molecule: The molecule currently drawn in MoleditPy, wrapped in an orthorhombic cell with customizable vacuum padding. Ghost and dummy atoms (Bq, H: NICS probes, *) are left out and counted in a warning: the plane-wave codes have no ghost atoms, and writing them would add real atoms. Reading the charge from the molecule applies only to this source; a crystal from a CIF is written neutral.
  2. CIF File: Load crystal structures directly from .cif files with full space-group symmetry expansion.
  3. CIF Viewer Panel: Seamlessly import crystal geometry from the active CIF Viewer panel without reopening files.

Surface slabs created with the Slab Builder plugin can be imported directly for heterogeneous catalysis and surface science calculations.


2. Calculation types

Supports all primary pw.x run types (calculation parameter in &CONTROL):

  • scf: Self-consistent field single-point energy calculation.
  • nscf: Non-self-consistent calculation with fixed potential (for DOS calculations).
  • bands: Band structure calculation along specified k-paths.
  • relax: Ionic position optimization (&IONS namelist included).
  • vc-relax: Variable-cell relaxation optimizing both cell parameters and atomic coordinates (&IONS and &CELL namelists included).
  • md: Born-Oppenheimer molecular dynamics.
  • vc-md: Variable-cell molecular dynamics. It is written with ion_dynamics = 'beeman', the only choice pw.x accepts for it.

Namelists &IONS and &CELL are dynamically included only when required by the chosen calculation type.


3. Physical settings and namelists

&SYSTEM settings

  • Plane-wave cutoffs: Set kinetic energy cutoff for wavefunctions (ecutwfc) with an automatic recommendation for charge density cutoff (ecutrho = 8 × ecutwfc for ultrasoft/PAW or 4 × ecutwfc for norm-conserving).
  • Occupations and smearing: Fixed occupations for insulators/molecules, or smearing (smearing = 'gaussian', 'marzari-vanderbilt', 'methfessel-paxton', 'fermi-dirac') with user-specified degauss.
  • Spin and magnetization: Support for spin-polarized calculations (nspin = 2) with per-species starting_magnetization.
  • DFT functional override: Specify input_dft to override functional definitions in pseudopotentials.
  • Dispersion correction (vdw_corr): Grimme-D2 ('grimme-d2'), Grimme-D3 zero damping ('dft-d3'), Grimme-D3(BJ) ('dft-d3bj'), XDM ('xdm'), or Tkatchenko-Scheffler ('ts').

&ELECTRONS settings

  • Convergence criteria: Self-consistency threshold conv_thr.
  • Mixing: Charge density mixing factor mixing_beta and mixing mode (mixing_mode = 'plain', 'TF', 'local-TF').
  • Iteration limit: electron_maxstep.
  • Diagonalization method: Davidson or conjugate gradient.

Any other keyword or card (Advanced tab)

  • Free keywords per namelist: one editor each for &CONTROL, &SYSTEM, &ELECTRONS, &IONS and &CELL takes keyword = value lines (commas also separate pairs, ! starts a comment). Values are written exactly as typed, so quote strings: mixing_mode = 'local-TF', Hubbard_U(1) = 4.0.
  • No duplicates: a keyword the other tabs already write (for example conv_thr) is replaced in place, since pw.x stops when a keyword appears twice. Case and spaces in indices do not matter.
  • Extra cards: HUBBARD, CONSTRAINTS, OCCUPATIONS, ADDITIONAL_K_POINTS, SOLVENTS and the rest are appended after the generated cards. A card the plugin writes itself is replaced: a K_POINTS crystal_b path typed here takes the place of the mesh, which is what a bands run needs.
  • Checks: unreadable lines, &IONS or &CELL keywords for a run type that has no such namelist, text outside any card, and a replaced structure card are all flagged in the warning strip.

4. Pseudopotentials and ATOMIC_SPECIES

The plugin provides smart pseudopotential handling:

  • Local directory scanning: Point the plugin to your local UPF pseudopotential repository (e.g. SSSP or PseudoDojo); it automatically scans the directory and matches filenames to each element present.
  • Pattern fallback: If a matching file is not found locally, uses an editable template pattern (e.g. {El}.pbe-n-kjpaw_psl.1.0.0.UPF).
  • Atomic masses: Automatically populated with standard IUPAC atomic weights.

5. K_POINTS grid options

  • Automatic grid: Calculates a uniform Monkhorst-Pack grid with user-defined coordinate shifts (0 or 1).
  • Reciprocal spacing target: Automatically computes grid divisions based on a desired spacing (in $\mathrm{\AA}^{-1}$). The spacing is given without the $2\pi$ factor, $n_i = \lceil |\mathbf{b}_i| / \Delta k \rceil$; VASP's KSPACING and pymatgen include $2\pi$, so their 0.2 corresponds to about 0.032 here.
  • Gamma-point: Generates K_POINTS gamma for isolated molecular calculations or large supercells.
  • Slab adaptation: Automatically constrains k-points along the vacuum dimension to 1.

Usage notes

Additional namelist/card text is validated before export. Tetrahedron occupations require an automatic uniform k-point mesh. Diagonalization choices are david, cg, paro, rmm-davidson and rmm-paro.

With Job Manager installed, Submit to Cluster... appears beside Save. It saves the input file (asking for a name only when it has not been saved yet or the settings have changed since), hands it to Job Manager under the file's name, then closes the dialog. Without Job Manager the button is not shown.


6. See also


This page documents Quantum ESPRESSO Input Generator v0.14.0, and was last updated on 2026-11-14. See REGISTRY/plugins.json for the current version.

Clone this wiki locally