一键导入
cp2k-geo-opt
CP2K geometry optimization. Handles bulk, slab, and molecular systems with GPW method. Efficient for large systems (200+ atoms).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
CP2K geometry optimization. Handles bulk, slab, and molecular systems with GPW method. Efficient for large systems (200+ atoms).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create and manage computational chemistry workflows with CatGo. Supports VASP, CP2K, ORCA, MLP, LAMMPS. Build OER/HER/CO2RR workflows, geometry optimization, frequency analysis, Gibbs energy calculations.
Run and resume the CatGo md-orchestration poll loop — delegate each poll to a subagent (keep main context lean), verify convergence by force, auto-advance each converged species per-species (pipeline, not barrier), and resume a campaign from disk after context compaction / new session. Use when driving or resuming a campaign's job-watch loop. Pairs with catgo-campaign.
Run a CatGo file-first md-orchestration "campaign" — a multi-step / high-throughput computational-materials study (e.g. SAA HER screening) driven from a human-readable folder + markdown tree, not the DB workflow engine. Use when the user says "跑一个 campaign", "md 模式跑", "high-throughput screening", or wants an agent-in-the-loop study with stages/funnel/analysis/report. Requires `catgo` on PATH.
Route computational chemistry requests to the correct software and task skill. Entry point for all CatGo agent interactions.
Drive a file-first, agent-in-the-loop computational campaign via a folder + markdown tree (no DB). Use when the user opts out of the visual workflow engine.
Authoring conventions for CatGo md-orchestration campaigns — progressive markdown, README+INDEX pairs and keeping them current, logging interventions to LESSONS, human-readable (never-hash) names, and the progressive (top→stage→calc) plan. Use when creating/editing any campaign markdown (plan/README/INDEX/STATUS/LESSONS) so the file tree stays navigable and resumable. Pairs with catgo-campaign.
| name | cp2k-geo-opt |
| description | CP2K geometry optimization. Handles bulk, slab, and molecular systems with GPW method. Efficient for large systems (200+ atoms). |
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.
Full cell and ionic relaxation for periodic bulk systems.
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"})
Fixed cell, ionic relaxation with frozen bottom layers. Analogous to VASP ISIF=2.
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 bulkpoisson_solver="MT" — Martyna-Tuckerman solver handles the vacuum correctly for 2D-periodic systems. Use "PERIODIC" for bulk (3D-periodic) and "MT" or "WAVELET" for slabsSame as slab, with adsorbate atoms free to relax:
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")
CP2K's GPW method with OT (Orbital Transformation) SCF solver scales linearly for large systems:
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:
For metals: OT does not work for metallic systems (zero band gap). Use Fermi-Dirac smearing with diagonalization:
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")
| Parameter | Default | Purpose |
|---|---|---|
| cutoff | 600 Ry | PW cutoff for density grid |
| rel_cutoff | 60 Ry | Multi-grid relative cutoff |
| basis_set | DZVP-MOLOPT-SR-GTH | Gaussian basis set |
| xc_functional | PBE | Exchange-correlation functional |
| max_iter | 200 | Max geometry optimization steps |
| eps_geo | 3e-4 | Force convergence (Hartree/Bohr, ~ 0.015 eV/A) |
| eps_scf | 1e-6 | SCF convergence (Hartree) |
| cell_opt | False | Whether to optimize cell parameters |
| freeze_layers | 0 | Number of bottom layers to freeze |
| vdw_method | None | Dispersion correction ("DFTD3", "DFTD3(BJ)") |
| poisson_solver | PERIODIC | Poisson solver ("PERIODIC", "MT", "WAVELET") |
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"})
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()
The geo_opt task produces:
output.structure — optimized structure (pymatgen dict as JSON string)output.energy — total DFT energy in eV| Problem | Fix |
|---|---|
| SCF not converging | Use OT method, increase scf_max_iter, reduce mixing |
| Energy oscillations | Increase cutoff (try 800 Ry), check rel_cutoff |
| Forces not converging | Loosen eps_geo, increase max_iter |
| OT fails for metal | Switch to diagonalization with Fermi smearing |
| Memory error | Reduce cutoff, use SZV basis, increase nodes |
| Missing basis for element | Check CP2K basis set library, may need to download |
| Poisson solver error for slab | Use poisson_solver="MT" instead of "PERIODIC" |
CP2K uses atomic units internally. CatGo converts automatically, but for reference: