一键导入
plot
Skill for scientific plotting using matplotlib. Generates, executes, and verifies publication-quality plots directly via run_python and run_bash.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Skill for scientific plotting using matplotlib. Generates, executes, and verifies publication-quality plots directly via run_python and run_bash.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Prepare, validate, and submit UMA/fairchem machine-learning interatomic potential calculations on Genkai with the established PJM launcher and UMA virtual environment. Use for MLIP or UMA structure relaxation, molecular dynamics, energy/force inference, GPU calculations, PJM submission, restart preparation, or locating and reporting calculation outputs.
Read surface-research PDFs or JSON records and extract structured reaction, material, and modeling information for downstream agent workflows.
Build realistic oxide-surface candidates: oxygen-vacancy landscapes, adsorbate coverage landscapes, and metal-cluster-on-surface starting structures using ASE, Optuna, and optional UMA/FAIRChem calculators.
Filter and normalize paperread surface-extraction outputs into Agent-ready modeling inputs, including facet equivalence, loaded nanoparticle species, material class, reaction type, and executable modeling task mapping.
Prepare, stage, and summarize LOBSTER bonding-analysis calculations from completed VASP, CP2K, or Quantum ESPRESSO outputs.
Skill for executing ABACUS DFT materials calculations. Help users set up, run, and analyze ABACUS calculations.
基于 SOC 职业分类
| name | plot |
| description | Skill for scientific plotting using matplotlib. Generates, executes, and verifies publication-quality plots directly via run_python and run_bash. |
| metadata | {"tools":["run_bash","run_python","show_plot"],"tags":["PLOT","MATPLOTLIB","UTILITY"]} |
Determine output directory
Use run_python to build a unique timestamped output directory. First try plots/ relative to the current working directory; fall back to $MATCLAW_WORKSPACE/plots/ if cwd is not writable:
import os, datetime, random
tag = datetime.datetime.now().strftime("%Y%m%d%H%M%S") + f"_{random.randint(100000,999999)}"
# Prefer a plots/ subdir next to the data (cwd)
cwd_plots = os.path.join(os.getcwd(), "plots", tag)
try:
os.makedirs(cwd_plots, exist_ok=True)
output_dir = cwd_plots
except OSError:
ws_root = os.environ.get("MATCLAW_WORKSPACE") or os.path.expanduser("~/.workspace")
output_dir = os.path.join(ws_root, "plots", tag)
os.makedirs(output_dir, exist_ok=True)
print(output_dir)
Capture the printed path — use it as OUTPUT_DIR in all subsequent steps.
Write the plotting script
Use run_python to write a complete Python script to OUTPUT_DIR/plot.py. The script must:
matplotlib, numpy, pandas, scipy, seaborn, ase, json, csv, pathlib, os, datetimeOUTPUT_DIR = "<absolute_path>" at the top (hardcoded to the resolved path from step 1)plt.subplots(figsize=..., dpi=300)tight_layout())plt.savefig(os.path.join(OUTPUT_DIR, filename), dpi=300, bbox_inches="tight")plt.show()print("PLOT_PATH:", save_path)Scientific context shortcuts:
Execute the script
exec(open("<OUTPUT_DIR>/plot.py").read())
Or equivalently pass the script content to run_python.
Verify output
Use run_bash to confirm the file exists and is non-empty:
ls -lh <OUTPUT_DIR>/*.png
Register the plot
Call show_plot(plot_path="<absolute_path_to_png>"). This emits the structured
{"plot_path": "..."} response that the UI needs to display the image.
Only call it after run_bash confirms the file exists.
plot_path — only report the path after run_bash confirms the file exists.MATCLAW_WORKSPACE (same logic as step 1).