Install
openclaw skills install @sanyangye/chatmosp-parameter-builderParameter 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 calculation engine executes, parameters need to be built or adjusted; or the user queries/modifies the current task's parameters.
openclaw skills install @sanyangye/chatmosp-parameter-builderLanguage 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.
No matter how clear the user's request is, parameters MUST be displayed and confirmed after building.
Only after user selects option 1 can the calculation proceed.
| Task | Source | MUST NOT include |
|---|---|---|
| MSR | MSR section + Gas + Adsorption from MOSP_database | KMC fields |
| KMC | KMC section (with nspecies, s1/s2, p1, e1-e7, li full set) | MSR fields |
⚠️ CRITICAL: MSR's input.json and KMC's input.json are TWO INDEPENDENT files. Do NOT reuse one for the other.
MUST use the following format exactly, do NOT create your own format:
📊 MSR Parameters ready, please confirm:
【Basic Information】
- Metal: {metal}
- Temperature: {T} K ({T-273}°C)
- Pressure: {P} Pa
- Cluster radius: {R} Å
- Crystal structure: {structure}
【Gas Environment】
- {Gas1} partial pressure: {pp1}%
- {Gas2} partial pressure: {pp2}%
【Gas Entropy Values】 (Auto-calculated)
- {Gas1} entropy: {S1} eV/K (calculated at {T}K)
- {Gas2} entropy: {S2} eV/K (calculated at {T}K)
【Surface Facet Parameters】
- {facet1} facet: surface energy {γ1} eV/Ų
- {facet2} facet: surface energy {γ2} eV/Ų
- {facet3} facet: surface energy {γ3} eV/Ų (most stable)
【Surface Adsorption Parameters】 (read from Adsorption field in input.json)
{facet1} facet:
- {Gas1} E_ads = {E1} eV
- {Gas2} E_ads = {E2} eV
{facet2} facet:
- {Gas1} E_ads = {E3} eV
- {Gas2} E_ads = {E4} eV
{facet3} facet:
- {Gas1} E_ads = {E5} eV
- {Gas2} E_ads = {E6} eV
【Interaction Matrix】 (read from input.json)
{facet1} facet: CO-CO={w1}, CO-O={w2}, O-O={w3}
{facet2} facet: CO-CO={w4}, CO-O={w5}, O-O={w6}
{facet3} facet: CO-CO={w7}, CO-O={w8}, O-O={w9}
【Output Settings】
- Task directory: {task_name}
- Generated files: input.json, ini.xyz, {task_name}_cluster.xyz, faceinfo.txt,
structure.png, rotation.gif
Please select:
1. ✅ Confirm - Proceed with MSR calculation
2. ✏️ Modify - Adjust specific parameters (Temperature / Pressure / partial pressure / cluster size / gas species)
3. 📊 Compare - Run multiple conditions (multi-Temperature / multi-Pressure / multi-size / multi-gas-ratio)
4. 🔄 Switch to KMC
5. ❌ Cancel and change system
⚠️ Unit note: Gas1_pp / Gas2_pp are PERCENTAGES (%), NOT pressure values. MUST display with % sign.
📊 KMC Parameters ready, please confirm:
【Basic Information】
- Task type: KMC (Kinetic Monte Carlo simulation)
- Reaction: {reaction}
- Temperature: {T} K ({T-273}°C)
- Pressure: {P} Pa
- Gas partial pressure: {Gas1} {pp1}%, {Gas2} {pp2}%
【Cluster Information】 (from MSR results)
- Metal: {metal}
- Cluster radius: {R} Å
- Number of atoms: {N}
- Crystal structure: {structure}
- MSR task directory: {msr_task_name}
【Simulation Parameters】
- Simulation steps: {steps}
- Recording interval: every {record_int} steps
- Number of species: {nspecies}
- Number of reaction events: {nevents}
【Species Definitions】
- s1: {name1} ({role1})
- s2: {name2} ({role2})
- ...
【Product Definitions】
- p1: {product_name} (generated by events X, Y)
【Reaction Mechanism】 (brief)
- {mechanism_brief}
【Output Settings】
- KMC task directory: {msr_task_name}/KMC_{steps}steps/
- Generated files: input.json, coverage.png, coverage_steps.png, tof.png, tof_time.png, ...
Please select:
1. ✅ Confirm - Proceed with KMC simulation
2. ✏️ Modify - Adjust specific parameters (steps / Temperature / Pressure / partial pressure / recording interval)
3. 📊 Compare - Run multiple conditions (multi-steps / multi-Temperature / multi-Pressure / multi-gas-ratio)
4. 🔄 Switch to MSR
5. ❌ Cancel and change system
Suggestions:
- For quick testing, start with 100,000 steps
- 5M steps yields better statistics but takes longer
User input
→ Extract parameters (metal, T, gas, P, steps, R, partial pressures)
→ Search MOSP_database (metal + gas match)
→ Load matching example file
→ Replace user-specified parameters
→ Calculate gas entropy (at user's T)
→ Check parameter completeness
→ Display to user for confirmation (5 options)
mosp-for-chatMOSP/MOSP_database/S(J/K/mol) = a × T^b
S(eV/K) = (a × T^b) / 96485
a, b are gas-specific (see table)T is temperature (K)96485 is J→eV conversion factor| Gas | a | b |
|---|---|---|
| H₂ | 41.362 | 0.201 |
| N₂ | 82.394 | 0.148 |
| O₂ | 90.454 | 0.143 |
| CO₂ | 76.458 | 0.181 |
| CO | 85.142 | 0.147 |
| NO | 93.121 | 0.143 |
| H₂O | 64.234 | 0.18665 |
| NO₂ | 93.02 | 0.1668 |
Parameters fit over 0~6000K, no temperature-range limitation.
CO at 473K:
S(J/K/mol) = 85.142 × 473^0.147 ≈ 210.5 J/K/mol
S(eV/K) = 210.5 / 96485 ≈ 0.00218 eV/K
| Task | Gas entropy field |
|---|---|
| MSR | Gas1_S / Gas2_S |
| KMC | s1.S_gas / s2.S_gas |
⚠️ CRITICAL: MSR and KMC gas entropy MUST use same formula, same values.
When user selects "Modify" and changes temperature, MUST recalculate all gas entropies using §7.1 formula and update fields.
Example: T change from 500K to 800K
example temperature T_example → user temperature T_user:
⚠️ IMPORTANT DEFAULT: All interaction parameters returned by literature search are treated as KMC format by default (interaction per adjacent atom). If used as MSR task parameters, automatically convert to MSR format, but MUST remind the user to check the literature to confirm it is truly per-adjacent-atom interaction.
Trigger condition: Only triggered for literature-retrieved parameters. MOSP_database built-in parameters are not processed (assumed correct).
| Format | Meaning | Typical range |
|---|---|---|
| MSR | Total interaction at full adsorption | > 0.5 eV (absolute) |
| KMC | Interaction per adjacent atom | < 0.3 eV (absolute) |
⚠️ Interaction parameters have been auto-converted from KMC format to MSR format.
Please check the original literature to confirm it is per-adjacent-atom
interaction (not full-adsorption total interaction).
Conversion formula: MSR parameter = KMC parameter × coordination number
- (100) facet: × 4
- (110) facet: × 2
- (111) facet: × 6
MSR parameter = KMC parameter × coordination number
| Facet | Coordination |
|---|---|
| (100) | 4 |
| (110) | 2 |
| (111) | 6 |
| Facet | Original KMC | Converted MSR |
|---|---|---|
| (100) | -0.149 | -0.596 (×4) |
| (110) | -0.159 | -0.318 (×2) |
| (111) | -0.168 | -1.008 (×6) |
After finding an example, MUST check completeness:
Step 1: Inform user "{metal}.json lacks key data (adsorption energy, interaction matrix)"
Step 2: Provide 4 options:
Step 3: Option 1/2 → call literature-search; Option 3 → wait for user input; Option 4 → end task
Literature-retrieved parameters do NOT include gas entropy. Regardless of completeness score, MUST recalculate per §7.1 before assembling input.json.
| Field | Type | Example |
|---|---|---|
| Element | string | "Pt" |
| Lattice constant | string | "3.9239" |
| Crystal structure | string | "FCC" |
| Temperature | string | "850" |
| Pressure | string | "150" |
| flag_MSR | boolean | false |
| flag_KMC | boolean | true |
| KMC | object | {...} |
| Field | Type | Description |
|---|---|---|
| nLoop | string | Total simulation steps |
| record_int | string | Recording interval |
| nspecies | number | Number of species |
| nproducts | number | Number of products |
| nevents | number | Number of reaction events |
| nevents_mob | number | Number of mobility events |
| s1 / s2 | string | Species 1/2 definition (JSON string) |
| p1 | string | Product 1 definition (JSON string) |
| e1 ~ e7 | string | Reaction events 1~7 (JSON string) |
| li | array | Lattice interaction matrix |
| Field | Unit | Description |
|---|---|---|
| Element | unitless | Pd, Pt, Au |
| Lattice constant | Å | Lattice constant |
| Pressure | Pa | System pressure |
| Temperature | K | Temperature |
| Radius | Å | Cluster radius |
| Gas_pp | % | Partial pressure % |
| Gas_S | eV/K | Gas entropy |
| Face.gamma | eV/Ų | Surface energy |
| Face.E_ads | eV | Adsorption energy |
| Face.S_ads | eV/K | Adsorption entropy |
| Face.w | eV | Interaction matrix element |
| Field | Unit | Description |
|---|---|---|
| nLoop | steps | Simulation steps |
| record_int | steps | Recording interval |
| mass | amu | Molecular mass |
| PP_ratio | % | Partial pressure ratio |
| S_ads | eV/K | Adsorption entropy |
| S_gas | eV/K | Gas entropy |
| Ea_diff | eV | Diffusion activation energy |
| sticking | 0-1 | Sticking coefficient |
| E_ads_para | eV | Adsorption energy parameter |
| BEP_para | eV | BEP relationship parameter |
| li | eV | Lattice interaction matrix |
| Situation | Action |
|---|---|
| No matching example | Call literature-search |
| Key parameters missing | Show user 4 options (see §10.1) |
| Temperature unspecified | Default 500K, but confirm with user |
| Pressure unspecified | Default 101325 Pa |
| Cluster size unspecified | Default 20 Å (MSR) or 50 Å (KMC) |
| Steps unspecified | Default 1000000 |
| Gas / partial pressure mismatch | Prompt user to check |
chatmosp-parameter-builder/
├── SKILL.md # Chinese reference
└── SKILL_cn.md # This file (English)
This skill is part of the ChatMOSP skill set. For complete functionality, install the companion ChatMOSP skills from ClawHub when they are missing:
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.