Skip to content

Plugin VASP Input Generator

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

Plugin: VASP Input Generator

VASP Input Generator writes POSCAR, INCAR, and KPOINTS files for Vienna Ab initio Simulation Package (VASP) calculations directly from a molecular structure or crystal geometry, complete with live previews and sanity checks.

Repository moleditpy_vasp_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 ▸ VASP Input (POSCAR/INCAR)...
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 geometry inputs:

  1. Current Molecule: The molecule currently open in MoleditPy's editor, placed into an orthorhombic vacuum box with user-configurable dimensions or automatic margins. 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.
  2. CIF File: Load a .cif file directly from disk. Asymmetric units are expanded into the full unit cell using the space-group symmetry operations defined in the CIF.
  3. CIF Viewer Panel: Directly copies the structure currently active in MoleditPy's CIF Viewer plugin panel without needing to re-open or reload the file.

Surfaces and slabs can be prepared using the companion Slab Builder plugin, which outputs a CIF that loads seamlessly here.


2. Supercells and vacuum control

  • Supercell repeats: Apply independent integer multipliers along the lattice vectors ($a \times b \times c$) to expand the unit cell.
  • Directional vacuum padding: Instead of a uniform bounding box, apply vacuum padding along specific axes (e.g., adding vacuum along $c$ only for surface slab calculations while maintaining periodic $a$ and $b$ boundaries).
  • Fractional / Cartesian coordinates: Switch between fractional (Direct) and Cartesian coordinates in POSCAR generation.

3. Calculation presets and INCAR control

Pre-configured task presets configure standard INCAR parameters for common calculation types:

  • Single point energy (NSW = 0, IBRION = -1)
  • Ionic relaxation (IBRION = 2, ISIF = 2, conjugate gradient relaxation of internal coordinates)
  • Ionic + Cell relaxation (IBRION = 2, ISIF = 3, full geometry and cell optimization)
  • Density of States (DOS) (ICHARG = 11, static calculation with dense k-point mesh)
  • Band Structure (non-SCF calculation with high-symmetry k-path)
  • Molecular Dynamics (NVT) (IBRION = 0, MDALGO = 2, Nosé-Hoover thermostat)

Key INCAR settings

  • XC Functional: PBE, PBEsol, RPBE, LDA (GGA = PE / PS / RP / --). For LDA the POTCAR command points at the LDA set (potpaw_LDA), not the PBE one.
  • Plane-wave cutoff (ENCUT): User-defined or auto-recommended based on elements present.
  • Convergence criteria: Electronic convergence (EDIFF) and ionic force convergence (EDIFFG).
  • Smearing: Gaussian (ISMEAR = 0), Fermi-Dirac (ISMEAR = -1), Methfessel-Paxton (ISMEAR = 1), or Tetrahedron method (ISMEAR = -5), with configurable SIGMA.
  • Spin Polarization (ISPIN = 2): Automatically sets initial magnetic moment guesses (MAGMOM) based on total charge and spin multiplicity.
  • Van der Waals dispersion: DFT-D2 (IVDW = 1), DFT-D3 zero damping (IVDW = 11), DFT-D3(BJ) (IVDW = 12), or Tkatchenko-Scheffler (IVDW = 2).
  • Performance parameters: PREC, ALGO, LREAL, NELM, NCORE.
  • Custom INCAR tags: Free-form text area to supply site-specific or advanced tags appended directly to the INCAR file.

4. K-Points configuration

Generates a standard KPOINTS file using one of several schemes:

  • Automatic reciprocal spacing: Calculates an appropriate $k_a \times k_b \times k_c$ grid given a target resolution in reciprocal space ($\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.
  • Monkhorst-Pack / Gamma-centered mesh: Explicit grid subdivisions with optional coordinate shifts.
  • Gamma-only: Single $\Gamma$-point calculation ($1 \times 1 \times 1$) for large supercells or isolated molecules.
  • Slab-aware mesh: Automatically sets $k_z = 1$ when an isolated slab with vacuum padding along $c$ is detected.

5. Selective dynamics

Freeze specific atomic coordinates during geometric relaxation:

  • Select atoms in the 3D or 2D editor.
  • Check Selective Dynamics to mark the selected atoms with F F F (fixed in $x, y, z$) in the POSCAR header and coordinate block, allowing surface relaxation above a frozen substrate.

6. POTCAR guidance

Because VASP pseudopotentials (POTCAR files) are proprietary licensed data, the plugin does not ship or generate pseudopotential files.

Instead, the plugin inspects the elements present and provides a copyable cat command matching the VASP-recommended PAW PBE datasets in the exact element order of the generated POSCAR:

cat /path/to/potcar/PAW_PBE/C/POTCAR \
    /path/to/potcar/PAW_PBE/H/POTCAR \
    /path/to/potcar/PAW_PBE/O/POTCAR > POTCAR

7. Input validation and warnings

The plugin includes an active warning banner that alerts you to common pitfalls:

  • Too little vacuum in an isolated molecule or slab (risking artificial dipole interactions).
  • Dense k-point sampling along a non-periodic vacuum axis.
  • High k-point density for an isolated molecule in a large supercell (wasting compute).
  • Incompatible smearing choices for semiconductor or insulating systems.

Usage notes

DOS tasks use the selected smearing. Valid additional INCAR tags override generated values, and validation uses the effective ISMEAR. Tetrahedron settings require a suitable k-point mesh. Additional tags must have unique, valid top-level definitions.

With Job Manager installed, Submit to Cluster... appears beside Save. It writes INCAR, KPOINTS, POSCAR and POTCAR.readme to a directory you choose (skipping the write when they are already current) and hands the four files to Job Manager as one job named after the directory, then closes the dialog. Without Job Manager the button is not shown.


8. See also


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

Clone this wiki locally