chem-sorption-gcmc
learningmatter-mit/AtomisticSkills/.agents/skills/chem-sorption-gcmc/SKILL.md
Calculates gas adsorption isotherms via BVT/GCMC Monte Carlo simulations in a porous framework using MLIP.
Skill172 starsChanged 4 months ago
What's in it
- chem-sorption-gcmc
- Goal
- Prerequisites
- Instructions
- Key Parameters
- Examples
- Constraints
---
name: chem-sorption-gcmc
description: Calculates gas adsorption isotherms via BVT/GCMC Monte Carlo simulations in a porous framework using MLIP.
category: [materials, chemistry]
---
# chem-sorption-gcmc
## Goal
To predict the macroscopic adsorption uptake of a gas (or gas mixture) in a porous material at a specific temperature and pressure. The skill relies on Grand Canonical Monte Carlo (GCMC) simulations where the host-guest and guest-guest interactions are calculated using a Machine Learning Interatomic Potential (MLIP: MACE, FairChem, MatGL).
## Prerequisites
- **Input**: A relaxed framework structure in CIF (or XYZ) format. The structure should ideally be processed by [chem-sorption-relax](../chem-sorption-relax/SKILL.md) to ensure proper supercell dimensions.
- **Conda environment**: Depends on the MLIP used (e.g., `fairchem-agent`, `mace-agent`, `matgl-agent`).
## Instructions
1. **Perform Single-Component GCMC (Optional)**: If you are investigating a single gas species, use `run_gcmc.py`.
```bash
# Env: fairchem-agent (or other MLIP-specific env)
python .agents/skills/chem-sorption-gcmc/scripts/run_gcmc.py \
--cif path/to/relaxed_supercell.cif \
--calculator fairchem \
--model-name uma-s-1p1 \
--task-name omol \
--steps 50000 \
--temperature-K 298 \
--pressure-bar 1.0 \
--adsorbate CO2 \
--output-dir ./results/single_gcmc
```
2. **Perform Multi-Component GCMC (Optional)**: If you are simulating a gas mixture (e.g. flue gas separation 15% CO2 / 85% N2), use `run_gcmc_multi.py`.
```bash
# Env: fairchem-agent
python .agents/skills/chem-sorption-gcmc/scripts/run_gcmc_multi.py \
--cif path/to/relaxed_supercell.cif \
--calculator fairchem \
--model-name uma-s-1p1 \
--task-name omol \
--steps 50000 \
--temperature-K 298 \
--gases CO2 N2 \
--y 0.15 0.85 \
--p-total-bar 1.0 \
--output-dir ./results/multi_gcmc
```
### Key Parameters
- `--cif`: Path to the relaxed host framework.
- `--calculator`: The backend MLIP (`fairchem`, `mace`, `matgl`).
- `--model-name`: Name or path to the MLIP weights (e.g., `uma-s-1p1.pt`, `MACE-MH-1`).
- `--task-name`: Optional, required by some models (`omol` for UMA and MACE-MH).
- `--steps`: Number of Monte Carlo steps (minimum 50,000 recommended for equilibration).
- `--temperature-K`: Sim temperature.
- `--pressure-bar` (Single): Gas pressure in bar.
- `--p-total-bar` (Multi): Total mixture pressure in bar.
- `--gases` / `--y` (Multi): Species list and corresponding mole fractions in the vapor phase.
## Examples
**Example 1: Generating an Isotherm Point (CO2, 0.1 bar, 298K) with UMA:**
```bash
# Env: fairchem-agent
python .agents/skills/chem-sorption-gcmc/scripts/run_gcmc.py \
--cif ./data/MOF-5_supercell.cif \
--calculator fairchem \
--model-name uma-s-1p1 \
--task-name omol \
--steps 50000 \
--temperature-K 298 \
--pressure-bar 0.1 \
--adsorbate CO2 \
--output-dir ./out/0.1_bar
```
## Constraints
- **Simulation Time**: GCMC with MLIPs can be computationally intensive. Use GPUs when available (`--device cuda`).
- **Equilibration**: You MUST check the generated `nmols.png` and `energy.png` inside the `output-dir` to visually confirm that the number of molecules and energy have plateaued (equilibrated). If the trend is still rising/falling at the end of the simulation, you must re-run with more `--steps` (or restart the trajectory).
- **Restarting**: You can pass `--restart-traj ./out/mc.traj` to continue a previous run.
---
**Author:** Artur Lyssenko
**Contact:** [GitHub @arturlyssenko12](https://github.com/arturlyssenko12)
More agent context in learningmatter-mit/AtomisticSkills
133 other files this repository gives its agents, the first 60 shown.
AGENTS.md
CLAUDE.md
Skill
- chem-bond-dissociation.agents/skills/chem-bond-dissociation/SKILL.md
- chem-conformer-search.agents/skills/chem-conformer-search/SKILL.md
- chem-db-mof.agents/skills/chem-db-mof/SKILL.md
- chem-db-qmof.agents/skills/chem-db-qmof/SKILL.md
- chem-db-spectra.agents/skills/chem-db-spectra/SKILL.md
- chem-dft-orca-advanced-calculation.agents/skills/chem-dft-orca-advanced-calculation/SKILL.md
- chem-dft-orca-optimization.agents/skills/chem-dft-orca-optimization/SKILL.md
- chem-dft-orca-singlepoint.agents/skills/chem-dft-orca-singlepoint/SKILL.md
- chem-docking-void.agents/skills/chem-docking-void/SKILL.md
- chem-hazard-toxicity.agents/skills/chem-hazard-toxicity/SKILL.md
- chem-irc-verification.agents/skills/chem-irc-verification/SKILL.md
- chem-msms-predict.agents/skills/chem-msms-predict/SKILL.md
- chem-neb-barrier.agents/skills/chem-neb-barrier/SKILL.md
- chem-nmr-analysis.agents/skills/chem-nmr-analysis/SKILL.md
- chem-nmr-predict.agents/skills/chem-nmr-predict/SKILL.md
- chem-react-ot.agents/skills/chem-react-ot/SKILL.md
- chem-similarity-search.agents/skills/chem-similarity-search/SKILL.md
- chem-solution-md.agents/skills/chem-solution-md/SKILL.md
- chem-sorption-relax.agents/skills/chem-sorption-relax/SKILL.md
- chem-sorption-widom.agents/skills/chem-sorption-widom/SKILL.md
- chem-spectrum-matcher.agents/skills/chem-spectrum-matcher/SKILL.md
- chem-thermochemistry.agents/skills/chem-thermochemistry/SKILL.md
- chem-ts-optimization.agents/skills/chem-ts-optimization/SKILL.md
- chem-vibration.agents/skills/chem-vibration/SKILL.md
- drug-admet-prediction.agents/skills/drug-admet-prediction/SKILL.md
- drug-binding-site-definition.agents/skills/drug-binding-site-definition/SKILL.md
- drug-bioactivity-assay.agents/skills/drug-bioactivity-assay/SKILL.md
- drug-complex-system-builder.agents/skills/drug-complex-system-builder/SKILL.md
- drug-db-chembl.agents/skills/drug-db-chembl/SKILL.md
- drug-db-pdb.agents/skills/drug-db-pdb/SKILL.md
- drug-db-pubchem.agents/skills/drug-db-pubchem/SKILL.md
- drug-docking-analysis.agents/skills/drug-docking-analysis/SKILL.md
- drug-docking-vina.agents/skills/drug-docking-vina/SKILL.md
- drug-ligand-prep.agents/skills/drug-ligand-prep/SKILL.md
- drug-mmpbsa-gbsa.agents/skills/drug-mmpbsa-gbsa/SKILL.md
- drug-molecular-fingerprints.agents/skills/drug-molecular-fingerprints/SKILL.md
- drug-pocket-detection.agents/skills/drug-pocket-detection/SKILL.md
- drug-pose-validation.agents/skills/drug-pose-validation/SKILL.md
- drug-protein-ligand-md.agents/skills/drug-protein-ligand-md/SKILL.md
- drug-protein-prep.agents/skills/drug-protein-prep/SKILL.md
- drug-redocking-rmsd.agents/skills/drug-redocking-rmsd/SKILL.md
- drug-retrosynthesis.agents/skills/drug-retrosynthesis/SKILL.md
- drug-trajectory-analysis.agents/skills/drug-trajectory-analysis/SKILL.md
- general-arxiv-search.agents/skills/general-arxiv-search/SKILL.md
- general-biorxiv-search.agents/skills/general-biorxiv-search/SKILL.md
- general-chemical-literature.agents/skills/general-chemical-literature/SKILL.md
- general-chemical-pricing.agents/skills/general-chemical-pricing/SKILL.md
- general-deep-research.agents/skills/general-deep-research/SKILL.md
- general-fair-data-review.agents/skills/general-fair-data-review/SKILL.md
- general-patent-search.agents/skills/general-patent-search/SKILL.md
- general-peer-review.agents/skills/general-peer-review/SKILL.md
- general-plot-digitizer.agents/skills/general-plot-digitizer/SKILL.md
- general-presentation.agents/skills/general-presentation/SKILL.md
- general-property-units.agents/skills/general-property-units/SKILL.md
- general-query-literature-database.agents/skills/general-query-literature-database/SKILL.md
- general-workflow-planner.agents/skills/general-workflow-planner/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

