Entry skill of the chatMOSP system. Parses Chinese/English natural language input, recognizes three task types (MSR / KMC / parameter query), extracts metal, temperature, gas, partial pressure, steps, and size parameters, then dispatches parameter-builder, file-organizer, msr-generator, and kmc-simu
Design & media
Chatmosp Msr Generator
Try itMSR (Multiscale Structure Reconstruction) calculation engine of the chatMOSP system. Invokes mosp-for-chatMOSP/utils/msr.py to generate metal cluster structures (Wulff construction), producing ini.xyz and {task_name}_cluster.xyz, then automatically generates PNG structure images and GIF rotation ani
What it does
MSR (Multiscale Structure Reconstruction) calculation engine of the chatMOSP system. Invokes mosp-for-chatMOSP/utils/msr.py to generate metal cluster structures (Wulff construction), producing ini.xyz and {task_name}_cluster.xyz, then automatically generates PNG structure images and GIF rotation animations, and finally sends them to the user via Feishu. Triggers: after parameter-builder has built parameters and the user has confirmed via the 5-option prompt, this skill executes the MSR calculation.
The skill document
Language routing / 语言路由 Detect the user's language from the latest message.
- If the user writes in English, continue with this English file and respond in English.
- If the user writes in Chinese, read
SKILL.mdin this same directory and respond in Chinese. Always match the response language to the user's input language.
chatmosp-msr-generator
1. Core Responsibilities
- Execute metal cluster structure generation (Wulff construction)
- Validate input parameter completeness
- Warn on large clusters (R ≥ 50Å)
- Generate structure files + visualization images
- Send results to user via Feishu
2. Prerequisites
- ✅ parameter-builder has built the parameters
- ✅ User has confirmed via the 5-option prompt (see parameter-builder)
- ✅
input.jsonexists atOUTPUT/{task_name}/input.json - ✅ Target directory has been created by file-organizer
- ✅ External
mosp-for-chatMOSPinstalled, withutils/msr.pyandutils/paint.py - ❌ DO NOT bypass parameter-builder and build parameters manually
- ❌ DO NOT skip user confirmation and execute calculation directly
3. Input Contract (Required fields in input.json)
| Field | Description |
|---|---|
| Element | Metal element (Pd, Pt, Au, etc.) |
| Temperature / Pressure | Temperature / Pressure |
| Gas1_name / Gas1_pp / Gas1_S | Gas 1 name / partial pressure / gas entropy |
| Gas2_name / Gas2_pp / Gas2_S | Gas 2 name / partial pressure / gas entropy |
| Radius | Cluster radius (Å) |
| nFaces / Face1 / Face2 / Face3 | Surface facet parameters |
Gas entropy (Gas1_S / Gas2_S) is calculated by parameter-builder using the formula in §7.1. DO NOT manually fill or reuse values from example files.
4. Large-Cluster Warning
MUST check cluster radius before execution. Warn user when R ≥ 50Å:
⚠️ Calculation Time Warning:
Current cluster radius is {R}Å, estimated calculation time is approximately
{estimated_minutes} minutes.
(R=50Å ~20 min, R=65Å ~40 min)
Continue with MSR calculation?
| Radius | Atoms (approx) | Time (approx) |
|---|---|---|
| 50 Å | 11,000 | 20 min |
| 65 Å | 35,000 | 40 min |
| Larger | Cubic growth | Significantly longer |
5. Execution Steps
Step 1: Run MSR calculation
cd mosp-for-chatMOSP
python3 utils/msr.py --json OUTPUT/{task_name}/input.json --output OUTPUT/{task_name}/
cd -
Step 2: Validate output
ls -lh OUTPUT/{task_name}/ini.xyz
ls -lh OUTPUT/{task_name}/{task_name}_cluster.xyz
- ✅
ini.xyzMUST exist and be > 0KB, otherwise MSR failed - ✅
{task_name}_cluster.xyzMUST exist (for visualization)
Step 3: Generate visualization (two separate steps)
# Static structure image
cd mosp-for-chatMOSP && python3 utils/paint.py \
OUTPUT/{task_name}/{task_name}_cluster.xyz \
--output OUTPUT/{task_name}/structure.png
# Rotation animation
cd mosp-for-chatMOSP && python3 utils/paint.py \
OUTPUT/{task_name}/{task_name}_cluster.xyz \
--gif OUTPUT/{task_name}/rotation.gif
paint.pycan only generate ONE type per call (PNG OR GIF); two separate steps are required. For atom counts > 20,000, recommend generating only the static image.
Step 4: Send to user via Feishu
{
"action": "send",
"channel": "feishu",
"filePath": "{workspace}/mosp-for-chatMOSP/OUTPUT/{task_name}/structure.png",
"caption": "{Metal}-{T}K-{P}Pa-CO{pp1}%-O2{pp2}%-R{R}Å"
}
Requirements:
- Send
structure.pngto user - Send
rotation.gifto user - Briefly describe structural features (e.g., "Pd nanoparticle shows truncated octahedron, mainly exposing (111) facets")
6. Output Files
| File | Description |
|---|---|
| ini.xyz | Real cluster structure (all atoms), input for KMC |
| {task_name}_cluster.xyz | Surface-atom-classified structure for plotting |
| faceinfo.txt | Facet information statistics |
| input.json | MSR parameter file |
| structure.png | Static structure image |
| rotation.gif | Rotation animation |
7. Key Principles
- MSR
input.jsonMUST NOT contain KMC parameters — KMC parameters are prepared independently by kmc-simulator ini.xyzis the OUTPUT of MSR, NOT the input — do not prepareini.xyzfor MSR tasks- DO NOT directly copy example files from
MOSP_database— use parameter-builder to recalculate gas entropy
8. Error Handling
| Error | Action |
|---|---|
| ini.xyz missing or 0KB | MSR failed; suggest adjusting parameters and retrying |
| {task_name}_cluster.xyz missing | Check MSR log; may be convergence failure |
| MSR timeout | Reduce cluster radius or check parameter validity |
| User cancellation | Terminate, preserve generated files |
9. Cross-Skill Handoff
- MSR → KMC: After MSR completes,
ini.xyzis produced. KMC tasks independently fetch complete KMC parameters fromMOSP_databasevia kmc-simulator. Do NOT reuse this skill'sinput.json. See kmc-simulator. - MSR failure → parameter-builder: Parameter issues go back to parameter-builder for adjustment.
- Re-running MSR: If directory already exists, ask user before overwriting.
10. Dependencies
- mosp-for-chatMOSP — MSR calculation engine (cloned)
- chatmosp-parameter-builder — parameter building and gas entropy calculation
- chatmosp-file-organizer — directory structure
- chatmosp-input-coordinator — task entry point
11. File Structure
chatmosp-msr-generator/
├── SKILL.md # Chinese reference
└── SKILL_cn.md # This file (English)
12. Example
User: Calculate Pt nanoparticle cluster structure at 500K
System: [Recognize as MSR task → parameter-builder searches params →
Show 5-option confirmation → User confirms → R=20Å, no warning →
Invoke msr.py → Validate output → Generate PNG+GIF → Send via Feishu]
ChatMOSP Companion Skills
This skill is part of the ChatMOSP skill set. For complete functionality, install the companion ChatMOSP skills from ClawHub when they are missing:
- chatmosp-input-coordinator
- chatmosp-parameter-builder
- chatmosp-msr-generator
- chatmosp-kmc-simulator
- chatmosp-literature-search
- chatmosp-file-organizer
If a required companion skill is unavailable, ask the user to install the missing ChatMOSP skill from ClawHub before continuing. Use the GitHub repository only as a fallback.
Related skills
Parameter building and management center of the chatMOSP system. Handles MSR / KMC parameter queries, intelligent completion, gas entropy calculation, MSR↔KMC interaction parameter conversion, and missing-parameter handling. Triggers: after input-coordinator identifies a task but before the calculat
File system manager of the chatMOSP system. Handles MSR / KMC task directory creation, intelligent naming (in `metal_gas-pp_T_K_P_Pa_R_size` format), and secure file operations (path-traversal protection, whitelist restriction). Triggers: after parameter-builder confirms parameters and before calcul
Academic literature searcher of the chatMOSP system. When MOSP_database lacks matching parameters, searches open-access journals (Nature Communications, Science Advances, PNAS, etc.) and other academic resources to extract MSR/KMC parameters.
KMC (Kinetic Monte Carlo) simulation engine of the chatMOSP system. Invokes kmc_standalone.py via Wine to run the Windows main.exe engine, executes catalyst surface reaction kinetic simulations, and produces TOF / coverage results.
This skill should be used when users need to translate natural language molecular structure queries into MolQL (Mol-Script) expressions. It handles basic atom/residue/chain selection, distance-based queries, property-based filtering, complex multi-part queries, and provides clarification for ambiguous requests.