Repository navigation
Plugin CP2K Input Generator
CP2K Input Generator creates input files for the Quickstep electronic structure module of CP2K from molecules or periodic systems, featuring automatic basis set and GTH potential pairings, dual SCF strategies, and real-time input preview.
| Repository | moleditpy_cp2k_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 ▸ CP2K Input (Quickstep)... |
| Extra dependencies | None (uses NumPy, PyVista, RDKit from the MoleditPy environment) |
See Official Plugins for the full catalogue.
The plugin supports three structure inputs:
-
Current Molecule: The molecule open in MoleditPy, wrapped in an orthorhombic simulation box with configurable 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. Charge and multiplicity read from the molecule apply only to this source; a crystal from a CIF is written neutral and closed-shell. SettingPERIODIC NONEorXYalso writes a matching&POISSONsection withPSOLVER MT, so the electrostatics follow the cell. - CIF File: Load crystal structures from disk with automatic space-group symmetry expansion.
- CIF Viewer Panel: Directly import geometry from the active CIF Viewer plugin panel without reloading files.
Supports supercell multiplication (
Configures standard &GLOBAL run types:
-
ENERGY_FORCE: Single-point energy and nuclear force calculation. -
GEO_OPT: Geometry optimization of atomic coordinates (&MOTIONsection included). -
CELL_OPT: Full optimization of both atomic coordinates and cell parameters. -
MD: Born-Oppenheimer molecular dynamics (&MDsubsection with thermostat).
The &MOTION section is omitted automatically for single-point calculations.
-
MOLOPT basis sets: Pre-configured standard Gaussian basis sets (
DZVP-MOLOPT-SR-GTH,TZVP-MOLOPT-GTH, etc.). -
Matching GTH pseudopotentials: Automatically pairs basis sets with Goedecker-Teter-Hutter (GTH) pseudopotentials matching the selected exchange-correlation functional (e.g.
GTH-PBE,GTH-BLYP,GTH-PADE). -
Plane-wave multigrid (
&MGRID): Sets cutoff (CUTOFF) and relative cutoff (REL_CUTOFF) for plane-wave expansion of charge density. -
Quickstep precision (
&QS): ConfiguresEPS_DEFAULTfor integral screening.
-
Supported XC functionals: PBE, BLYP, BP86, PADE (LDA), PBE0, B3LYP. For the hybrids the truncated-Coulomb
CUTOFF_RADIUSis capped at half the shortest face-to-face width of the cell (not half the shortest cell vector, which is too long for a skewed cell). -
Dispersion corrections: Grimme DFT-D2, DFT-D3 zero damping, and DFT-D3(BJ) configured via
&PAIR_POTENTIAL. - Spin and charge: Total system charge and spin multiplicity with automatic Unrestricted Kohn-Sham (UKS) activation for open-shell systems.
The plugin provides tailored SCF approaches depending on the electronic characteristics of the system:
-
Orbital Transformation (
&OT):- Highly efficient, guaranteed-convergence minimization using preconditioned conjugate gradients.
- Combined with
&OUTER_SCFfor difficult cases. - Ideal for large insulating systems, semiconductor surfaces, and closed-shell molecules.
-
Traditional Diagonalization:
- Diagonalization with Fermi-Dirac smearing (
&SMEAR), extra molecular orbitals (ADDED_MOS), and Broyden or DIIS mixing. - Essential for metals and zero-bandgap systems where OT cannot be applied due to fractional occupations.
- Diagonalization with Fermi-Dirac smearing (
-
Gamma-only calculations: For large periodic cells or isolated clusters, the
&KPOINTSsection is omitted, executing efficient$\Gamma$ -point Quickstep algorithms. -
Monkhorst-Pack k-mesh: Full k-point sampling (
&KPOINTSsection) for small metallic or semiconducting unit cells. -
Reciprocal spacing target: Automatically computes mesh subdivisions from target reciprocal space spacing (
$\mathrm{\AA}^{-1}$ ). The spacing is given without the$2\pi$ factor,$n_i = \lceil |\mathbf{b}_i| / \Delta k \rceil$ ; VASP'sKSPACINGand pymatgen include$2\pi$ , so their 0.2 corresponds to about 0.032 here.
For reduced periodicity, the Poisson solver is MT for NONE or XY, and ANALYTIC for other reduced-periodicity choices. Smearing requires nonzero ADDED_MOS. Export checks electrostatic boundaries and SCF/state compatibility.
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.
- Official Plugins — the full plugin catalogue
- Plugin: VASP Input Generator — VASP input generator
- Plugin: Quantum ESPRESSO Input Generator — Quantum ESPRESSO input generator
- Plugin: Slab Builder — build slab models for surface DFT
- Plugin: CIF Viewer — visual crystal structure viewer
This page documents CP2K Input Generator v0.12.0, and was last updated on 2026-11-14. See REGISTRY/plugins.json for the current version.