Agent skill

Cp2k Geo Opt

by Hello-QM in Hello-QM/catgo-LRG

CP2K geometry optimization. An agent skill from Hello-QM/catgo-LRG.

AGPL-3.0Auto-check passed

Install Cp2k Geo Opt

skills CLI
$ npx skills add Hello-QM/catgo-LRG --skill cp2k-geo-opt -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Hello-QM/catgo-LRG cp2k-geo-opt --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Hello-QM/catgo-LRG.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/cp2k-relax .claude/skills/cp2k-geo-opt && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cp2k-geo-opt
GitHub stars
205
Token cost
~1.8k tokens
SKILL.md length
383 words
Files
1
Skills in repo
75
Repo updated
First seen
Licence
AGPL-3.0

At a glance

CP2K geometry optimization. An agent skill from Hello-QM/catgo-LRG.

  • SKILL.md covers Scenario 1: Bulk Optimization, Scenario 2: Slab Optimization, Scenario 3: Adsorbate on Slab and Scenario 4: Large System (500+…, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Cp2k Geo Opt is an agent skill from Hello-QM/catgo-LRG. CP2K geometry optimization. Handles bulk, slab, and molecular systems with GPW method. Efficient for large systems (200+ atoms).

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: AI-driven workbench for computational materials science — interactive 3D structure viewer, natural-language CatBot assistant, visual DAG workflow engine, HPC job submission… The licence is AGPL-3.0.

Example prompts

  • “/cp2k-geo-opt”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit fd6291b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cp2k Geo Opt loads about 1.8k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 383 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Hello-QM/catgo-LRG at commit fd6291b, republished under its AGPL-3.0 licence (© Hello-QM). 383 words, ~1,802 tokens.

Download SKILL.mdSave it as .claude/skills/cp2k-geo-opt/SKILL.md (or your agent's skills folder).
name
cp2k-geo-opt
description
CP2K geometry optimization. Handles bulk, slab, and molecular systems with GPW method. Efficient for large systems (200+ atoms).

CP2K Geometry Optimization

Set up and submit CP2K geometry optimizations using the Gaussian and Plane-Wave (GPW) method. CP2K is the preferred code for systems larger than ~200 atoms where VASP becomes memory-limited.

Scenario 1: Bulk Optimization

Full cell and ionic relaxation for periodic bulk systems.

python
from catgo.workflow import Workflow

wf = Workflow("CP2K bulk MgO")
struct = wf.add_task("structure_input", structure=bulk_json)

opt = wf.add_task("geo_opt",
                  structure=struct.output.structure,
                  software="cp2k",
                  cell_opt=True,          # Relax cell + ions (like ISIF=3 in VASP)
                  cutoff=600,             # Ry
                  rel_cutoff=60,          # Ry
                  basis_set="DZVP-MOLOPT-SR-GTH",
                  xc_functional="PBE",
                  max_iter=200,           # Max geo_opt steps
                  eps_geo=3e-4,           # Force convergence (Hartree/Bohr)
                  system_name="bulk_MgO")

wf.submit()

MCP equivalent:

catgo_workflow_v2(action="create", params={"name": "CP2K bulk MgO"})

catgo_workflow_v2(action="add_task", params={
  "workflow_id": "wf_xxx",
  "task_type": "structure_input",
  "structure": "<bulk_json>"
})

catgo_workflow_v2(action="add_task", params={
  "workflow_id": "wf_xxx",
  "task_type": "geo_opt",
  "software": "cp2k",
  "structure": "{{t_001.output.structure}}",
  "cell_opt": true,
  "cutoff": 600,
  "basis_set": "DZVP-MOLOPT-SR-GTH",
  "system_name": "bulk_MgO"
})

catgo_workflow_v2(action="submit", params={"workflow_id": "wf_xxx"})

Scenario 2: Slab Optimization

Fixed cell, ionic relaxation with frozen bottom layers. Analogous to VASP ISIF=2.

python
wf = Workflow("CP2K TiO2 slab")
struct = wf.add_task("structure_input", structure=slab_json)

opt = wf.add_task("geo_opt",
                  structure=struct.output.structure,
                  software="cp2k",
                  cell_opt=False,         # Fix cell (slab)
                  cutoff=600,
                  basis_set="DZVP-MOLOPT-SR-GTH",
                  freeze_layers=2,        # Freeze bottom 2 layers
                  poisson_solver="MT",    # Martyna-Tuckerman for slab geometry
                  system_name="TiO2_slab")

wf.submit()

Slab-specific settings:

  • cell_opt=False — mandatory for slabs (equivalent to ISIF=2 in VASP)
  • freeze_layers=2 — freeze bottom layers to mimic bulk
  • poisson_solver="MT" — Martyna-Tuckerman solver handles the vacuum correctly for 2D-periodic systems. Use "PERIODIC" for bulk (3D-periodic) and "MT" or "WAVELET" for slabs

Scenario 3: Adsorbate on Slab

Same as slab, with adsorbate atoms free to relax:

python
opt = wf.add_task("geo_opt",
                  structure=adsorbate_slab_json,
                  software="cp2k",
                  cell_opt=False,
                  freeze_layers=2,
                  cutoff=600,
                  vdw_method="DFTD3",    # Dispersion for adsorption
                  poisson_solver="MT",
                  system_name="*OH_on_TiO2")

Scenario 4: Large System (500+ atoms)

CP2K's GPW method with OT (Orbital Transformation) SCF solver scales linearly for large systems:

python
opt = wf.add_task("geo_opt",
                  structure=large_system_json,
                  software="cp2k",
                  cutoff=400,                   # Lower cutoff acceptable for screening
                  basis_set="SZV-MOLOPT-SR-GTH", # Minimal basis for speed
                  ot_minimizer="DIIS",           # OT method for large systems
                  ot_preconditioner="FULL_ALL",
                  eps_scf=1e-5,
                  system_name="large_system")

OT vs diagonalization:

  • OT: O(N) scaling, no HOMO-LUMO gap requirement, default for > 100 atoms
  • Diagonalization: O(N^3) scaling, needed for metallic systems (zero gap)

For metals: OT does not work for metallic systems (zero band gap). Use Fermi-Dirac smearing with diagonalization:

python
opt = wf.add_task("geo_opt",
                  structure=metal_json,
                  software="cp2k",
                  scf_method="diag",          # Standard diagonalization
                  smearing_method="FERMI_DIRAC",
                  electronic_temperature=300,  # K
                  system_name="metal")

Key Parameters

ParameterDefaultPurpose
cutoff600 RyPW cutoff for density grid
rel_cutoff60 RyMulti-grid relative cutoff
basis_setDZVP-MOLOPT-SR-GTHGaussian basis set
xc_functionalPBEExchange-correlation functional
max_iter200Max geometry optimization steps
eps_geo3e-4Force convergence (Hartree/Bohr, ~ 0.015 eV/A)
eps_scf1e-6SCF convergence (Hartree)
cell_optFalseWhether to optimize cell parameters
freeze_layers0Number of bottom layers to freeze
vdw_methodNoneDispersion correction ("DFTD3", "DFTD3(BJ)")
poisson_solverPERIODICPoisson solver ("PERIODIC", "MT", "WAVELET")
Show full SKILL.md (133 more words)Show less

Convergence Monitoring

catgo_workflow_v2(action="status", params={"workflow_id": "wf_xxx"})

catgo_analyze(action="convergence", params={"task_id": "t_opt"})
# Returns: energy vs step, max force vs step

catgo_analyze(action="forces", params={"task_id": "t_opt"})

Chain: CP2K Optimization then Frequency

python
wf = Workflow("CP2K opt + freq")
struct = wf.add_task("structure_input", structure=slab_oh_json)

opt = wf.add_task("geo_opt", structure=struct.output.structure,
                  software="cp2k", freeze_layers=2,
                  system_name="*OH")

frq = wf.add_task("freq", structure=opt.output.structure,
                  software="cp2k",
                  freeze_mode="layers", freeze_layers=4,
                  system_name="*OH")

gib = wf.add_task("gibbs_energy",
                  energy=opt.output.energy,
                  frequencies=frq.output.frequencies,
                  phase="adsorbed", system_name="*OH")

wf.submit()

Output

The geo_opt task produces:

  • output.structure — optimized structure (pymatgen dict as JSON string)
  • output.energy — total DFT energy in eV

Troubleshooting

ProblemFix
SCF not convergingUse OT method, increase scf_max_iter, reduce mixing
Energy oscillationsIncrease cutoff (try 800 Ry), check rel_cutoff
Forces not convergingLoosen eps_geo, increase max_iter
OT fails for metalSwitch to diagonalization with Fermi smearing
Memory errorReduce cutoff, use SZV basis, increase nodes
Missing basis for elementCheck CP2K basis set library, may need to download
Poisson solver error for slabUse poisson_solver="MT" instead of "PERIODIC"

Unit Conversions

CP2K uses atomic units internally. CatGo converts automatically, but for reference:

  • 1 Hartree = 27.2114 eV
  • 1 Bohr = 0.529177 A
  • Force: 1 Ha/Bohr = 51.422 eV/A
  • eps_geo=3e-4 Ha/Bohr corresponds to ~0.015 eV/A (comparable to VASP EDIFFG=-0.02)

© Hello-QM, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/cp2k-relax of Hello-QM/catgo-LRG.

Open the folder on GitHubat commit fd6291b

Compare with similar skills

Cp2k Geo Opt next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cp2k Geo Opt compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cp2k Geo Opt this skillHello-QM/catgo-LRG205—~1.8kAutomated safety check: PassAGPL-3.0
Error Handlingaffaan-m/ECC276k1 repos~2.7kAutomated safety check: PassMIT
Error Handlingthedaviddias/Front-End-Checklist74k—~416Automated safety check: PassMIT
Error Handlingaffaan-m/ECC276k—~2.4kAutomated safety check: PassMIT
Python Error Handlingwshobson/agents40k—~1.5kAutomated safety check: PassMIT
Geo Meta Tags Auditthedaviddias/Front-End-Checklist74k—~763Automated safety check: PassMIT

Similar skills

  • Error Handling

    affaan-m/ECC

    Patterns for robust error handling across TypeScript, Python, and Go.

    276k GitHub starsUsed in 1 repo~2.7k tokens
    DevelopmentAuto-check passed
  • Error Handling

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing scripts, client components, bundles, or runtime behavior related to Implement proper error handling.

    74k GitHub stars~416 tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Error Handling

    affaan-m/ECC

    TypeScript、Python、Goにわたる堅牢なエラー処理のパターン。型付きエラー、エラー境界、リトライ、サーキットブレーカー、ユーザー向けエラーメッセージをカバーします。

    276k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Python Error Handling

    wshobson/agents

    Python error handling patterns including input validation, exception hierarchies, and partial failure handling.

    40k GitHub stars~1.5k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Geo Meta Tags Audit

    thedaviddias/Front-End-Checklist

    Audits and fixes geo.region, geo.placename and geo.position meta tags on regional pages, noting where they help (Bing) and where they do not (Google).

    74k GitHub stars~763 tokensUpdated 4 days ago
    Marketing & SEOAuto-check passed
  • Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications.

    40k GitHub starsUsed in 11 repos~1k tokens
    DevelopmentAuto-check passed

More from Hello-QM/catgo-LRG

All 75 skills in this repo
  • Campaign Md Orchestration

    Hello-QM/catgo-LRG

    Drive a file-first, agent-in-the-loop computational campaign via a folder + markdown tree (no DB).

    205 GitHub stars~1.6k tokensUpdated 18 days ago
    Auto-check passed
  • Catgo Gibbs Pipeline

    Hello-QM/catgo-LRG

    Compute adsorption/reaction Gibbs free energies, free-energy diagrams, and electrochemical overpotentials (HER/ORR/OER/CO2RR/NRR) with VASP.

    205 GitHub stars~669 tokensUpdated 18 days ago
    Auto-check passed
  • Abinit

    Hello-QM/catgo-LRG

    Generate and manage ABINIT DFT calculations. An agent skill from Hello-QM/catgo-LRG.

    205 GitHub stars~963 tokensUpdated 18 days ago
    Auto-check passed
  • Adsorbate Placement

    Hello-QM/catgo-LRG

    A skill your agent uses when the user asks to place an adsorbate molecule on a surface, find adsorption sites, or set up a surface+adsorbate model for DFT.

    205 GitHub stars~3k tokensUpdated 18 days ago
    Auto-check passed
  • Adsorption Energy

    Hello-QM/catgo-LRG

    A skill your agent uses when the user asks for adsorption energy, binding energy, or wants to compare how strongly a molecule binds to a surface.

    205 GitHub stars~1.4k tokensUpdated 18 days ago
    Auto-check passed
  • Analysis Router

    Hello-QM/catgo-LRG

    A skill your agent uses when the user asks to analyze computational results: Gibbs free energy, OER/HER/CO2RR overpotentials, adsorption energy, convergence tests, DOS/d-band analysis, or Bader…

    205 GitHub stars~869 tokensUpdated 18 days ago
    Auto-check passed

Questions about Cp2k Geo Opt

What does Cp2k Geo Opt do?

CP2K geometry optimization. An agent skill from Hello-QM/catgo-LRG. Cp2k Geo Opt is an agent skill from Hello-QM/catgo-LRG. CP2K geometry optimization.

How do I install Cp2k Geo Opt in Claude Code?

Run `npx skills add Hello-QM/catgo-LRG --skill cp2k-geo-opt -a claude-code`. Or copy the skill folder (.claude/skills/cp2k-relax in Hello-QM/catgo-LRG) into .claude/skills/cp2k-geo-opt in your project. Claude Code loads it when a task matches its description.

How do I install Cp2k Geo Opt in Codex?

Run `npx skills add Hello-QM/catgo-LRG --skill cp2k-geo-opt -a codex`. Or copy the skill folder (.claude/skills/cp2k-relax in Hello-QM/catgo-LRG) into .agents/skills/cp2k-geo-opt in your project. Codex loads it when a task matches its description.

Can I use Cp2k Geo Opt in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Hello-QM/catgo-LRG --skill cp2k-geo-opt -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cp2k-geo-opt, .gemini/skills/cp2k-geo-opt, .github/skills/cp2k-geo-opt and .opencode/skills/cp2k-geo-opt in your project.

What does Cp2k Geo Opt need to run?

SKILL.md names no scripts, command-line tools or credentials: Cp2k Geo Opt is instructions for the agent only. Our summary lists: Python 3.

Does Cp2k Geo Opt access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cp2k Geo Opt safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cp2k Geo Opt use?

Cp2k Geo Opt is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cp2k Geo Opt use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cp2k Geo Opt?

Skills that share tags, products or a category with Cp2k Geo Opt: Error Handling (affaan-m/ECC, 276k stars), Error Handling (thedaviddias/Front-End-Checklist, 74k stars), Error Handling (affaan-m/ECC, 276k stars) and Python Error Handling (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cp2k Geo Opt?

Hello-QM (a GitHub user) maintains it in Hello-QM/catgo-LRG, which has 205 GitHub stars. The repository holds 75 skills in this directory. The repository was last updated on September 22, 2026.

Source: Hello-QM/catgo-LRG on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.