cp2k-workflow

cp2k-workflow is a skill for Claude Code, Codex from SFETNI/Deep-Matter-Chem-Skills. It costs 5 tokens per session (13,792 once invoked), scanned A, original, MIT.

A guide for electronic-structure and atom-level simulations with CP2K, an open-source program used to study molecules, liquids, and materials.

In plain words
What is it for?
Use it for density-functional theory calculations, ab initio molecular dynamics, and generating reference data for machine-learning potentials.
Why use it?
It helps build reliable calculations by covering input setup, convergence testing, geometry optimisation, molecular dynamics, and common self-consistent-field failures.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for density-functional theory calculations, ab initio molecular dynamics, and generating reference data for machine-learning potentials.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sfetni/deep-matter-chem-skills/cp2k-workflow
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SFETNI/Deep-Matter-Chem-Skills --skill cp2k-workflow
Clone the repo
git clone --depth 1 https://github.com/SFETNI/Deep-Matter-Chem-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cp2k-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/sfetni/deep-matter-chem-skills/cp2k-workflow/github.svg)](https://agentmods.dev/skills/sfetni/deep-matter-chem-skills/cp2k-workflow)
Your own site
<a href="https://agentmods.dev/skills/sfetni/deep-matter-chem-skills/cp2k-workflow"><img src="https://agentmods.dev/badge/skills/sfetni/deep-matter-chem-skills/cp2k-workflow/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cp2k-workflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/sfetni/deep-matter-chem-skills/cp2k-workflow"><img src="https://agentmods.dev/badge/skills/sfetni/deep-matter-chem-skills/cp2k-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 13,792 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00005 $0.13792
Opus 5 $0.00003 $0.06896
Sonnet 5 $0.00001 $0.02758
Haiku 4.5 $0.00001 $0.01379

Measured 11d ago against content hash 989cc943d300, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

cp2k-workflow scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.run(
skills/electronic-structure/cp2k-workflow/SKILL.md · 943 lines

How it starts

The opening of the file, as written. The whole thing — 943 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CP2K Workflow

Description

This skill covers end-to-end DFT, AIMD, and atomistic simulation workflows using CP2K, from input file construction through convergence testing, geometry optimization, and ab initio molecular dynamics. CP2K uses the Gaussian and Plane Waves (GPW) method, which combines a Gaussian-type orbital (GTO) basis with an auxiliary plane-wave density grid, making it efficient for large systems, liquid-phase simulations, and condensed-phase AIMD. Invoke this skill when setting up CP2K calculations, selecting basis sets and GTH pseudopotentials, converging CUTOFF and REL_CUTOFF parameters, diagnosing SCF convergence failures, generating AIMD trajectories, or producing DFT reference data for ML potential training with an open-source code.

Domain Context

CP2K solves the Kohn-Sham DFT equations using the GPW (Gaussian and Plane Waves) or GAPW (Gaussian Augmented Plane Waves) method. The key idea is a dual representation of the electron density: the wavefunction and density matrix are represented in a localized Gaussian basis, while the Hartree potential is evaluated on an auxiliary plane-wave grid using fast Fourier transforms. This avoids the O(N³) cost of dielectric screening in pure plane-wave codes for very large systems, and enables linear-scaling DFT (LS-DFT) via the linear-scaling module.

Physical approximations and structural concepts that must be understood before using this workflow:

  • GPW method: The total electron density is expanded as a sum of atom-centered Gaussian functions, then mapped onto a regular real-space grid at a grid spacing controlled by CUTOFF (in Ry). The Hartree energy is evaluated in reciprocal space via FFT. The accuracy of this mapping depends on both CUTOFF and REL_CUTOFF — both must be converged explicitly. Unlike VASP or QE, a high CUTOFF alone is insufficient if REL_CUTOFF is too low.
  • GAPW method: Augments GPW with atom-centered hard and soft auxiliary density expansions near nuclei (analogous to PAW), allowing all-electron calculations or harder core regions without increasing the plane-wave grid cost. Used for core-level spectroscopy (XPS, XANES) and when soft pseudopotentials are insufficient. Higher cost than GPW for the same basis.
  • GTH pseudopotentials: Goedecker-Teter-Hutter norm-conserving pseudopotentials are the standard for CP2K. They are available for LDA, PBE, BLYP, PBE0, and several other functionals. The pseudopotential and basis set must be generated for and matched to the same XC functional — using a GTH-PBE pseudopotential with a BLYP functional is inconsistent and produces wrong results.
  • Gaussian basis sets: CP2K ships MOLOPT-optimized basis sets (short-range SR variants for solids, standard for molecules). Quality tiers: SZV (minimal, screening only), DZVP (double-ζ + polarization, standard production), TZV2P (triple-ζ, higher accuracy), TZV2PX (extended). Short-range SR basis sets are preferred for periodic solids because they minimize linear dependence and basis set superposition error in condensed phases.
  • CUTOFF (Ry): Controls the plane-wave grid density for the auxiliary density. Analogous to ecutrho in QE but expressed per-calculation, not per-element. Higher CUTOFF increases grid density and accuracy of the Hartree term. Typical production values: 400–800 Ry for most GTH basis sets.
  • REL_CUTOFF (Ry): Controls the accuracy of the Gaussian-to-grid mapping for each atom type. Each Gaussian is mapped onto a subgrid whose fineness is determined by REL_CUTOFF. If REL_CUTOFF is too small, Gaussian functions are mapped poorly regardless of CUTOFF. Default: 60 Ry; recommended production: 60–100 Ry. Converge by scanning REL_CUTOFF at fixed CUTOFF.
  • OT (Orbital Transformation) method: An iterative direct minimization approach for finding the ground-state wavefunction without diagonalizing the Kohn-Sham matrix. Efficient and stable for insulators and semiconductors with a band gap. Requires a good preconditioner. Cannot handle fractional occupations and must not be used for metallic systems. OUTER_SCF is required alongside OT to converge the total energy, not just the orbital gradient.
  • Diagonalization + smearing for metals: For metallic systems, OT must be replaced with standard diagonalization (&DIAGONALIZATION ON) plus ADDED_MOS (extra molecular orbitals above the HOMO) and Fermi-Dirac or Gaussian smearing. Broyden or Pulay mixing is then required for charge density convergence.
  • Periodic boundary conditions and Poisson solver: CP2K supports fully periodic (3D), slab (2D), wire (1D), and isolated (0D) boundary conditions via the POISSON section. The correct Poisson solver must match the periodicity: PERIODIC for bulk, Martyna-Tuckerman (MT) for isolated molecules or charged slabs, and wavelet-based WAVELET for general non-orthorhombic cells with mixed periodicity.
  • AIMD integration: CP2K uses the Verlet algorithm for NVE, and thermostat-augmented integrators for NVT (CSVR, NOSE) and NPT (BAROSTAT + thermostat). The timestep must be ≤ 1/10 of the period of the fastest vibrational mode — typically 0.5 fs for hydrogen-containing systems, 1–2 fs for heavy-element systems.

Read the full file on GitHub · 943 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 943 lines · 5 tokens per session scan A 989cc943d300

Subscribe to this mod's changes

cp2k-workflow is a skill published in the GitHub repository SFETNI/Deep-Matter-Chem-Skills (6 stars, last pushed 1mo ago), licensed MIT. It adds 5 tokens to every session and 13,792 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

datamol

Pythonic wrapper around RDKit with simplified interface and sensible defaults. Preferred for standard drug discovery including SMILES parsing, standardization, descriptors, fingerprints, clustering, 3D conformers, parallel processing. Returns native rdkit.Chem.Mol objects. For advanced control or custom parameters…

synthetic-sciences/openscience · 67 tokens

smiles-validation

Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.

synthetic-sciences/openscience · 24 tokens

patsnap-biological-modality

Biological sequence and modality intelligence via Patsnap MCP.

patsnap/mcp · 19 tokens

patsnap-scientific-translational-evidence

Patsnap Scientific & Translational Evidence MCP for AI agents. Retrieval platform focusing on scientific literature and translational outcomes, covering academic publication queries and translational medicine record tracking.

patsnap/mcp · 47 tokens

patsnap-solution-engine

Patsnap TRIZ Concept Solution Engine MCP for AI agents. Generates innovation or product cost-reduction concepts through asynchronous TRIZ and TRIZ/DFMA workflows. Use for engineering problem solving, concept alternatives, cost-reduction analysis, task-progress retrieval, and selected-solution details.

patsnap/mcp · 64 tokens

patsnap-current-awareness

Patsnap Current Awareness MCP for AI agents. Tracking system for pharmaceutical industry dynamics and cutting-edge news, covering global medical news search and in-depth news detail mining.

patsnap/mcp · 39 tokens