chem-solution-md
Skill174 starsChanged 6 months agoMITView on GitHub
Set up and run molecular dynamics simulations of molecules in explicit solvent boxes using Packmol for box construction and MLIPs for dynamics.
In this repository133 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/atomisticskills.mdcCursor rule
- .cursor/rules/use-agent-skills.mdcCursor rule
- chem-bond-dissociationSkill
- chem-conformer-searchSkill
- chem-db-mofSkill
- chem-db-qmofSkill
- chem-db-spectraSkill
- chem-dft-orca-advanced-calculationSkill
- chem-dft-orca-optimizationSkill
- chem-dft-orca-singlepointSkill
- chem-docking-voidSkill
- chem-hazard-toxicitySkill
- chem-irc-verificationSkill
- chem-msms-predictSkill
- chem-neb-barrierSkill
- chem-nmr-analysisSkill
- chem-nmr-predictSkill
- chem-react-otSkill
- chem-similarity-searchSkill
- chem-sorption-gcmcSkill
- chem-sorption-relaxSkill
- chem-sorption-widomSkill
- chem-spectrum-matcherSkill
- chem-thermochemistrySkill
- chem-ts-optimizationSkill
- chem-vibrationSkill
- drug-admet-predictionSkill
- drug-binding-site-definitionSkill
- drug-bioactivity-assaySkill
- drug-complex-system-builderSkill
- drug-db-chemblSkill
- drug-db-pdbSkill
- drug-db-pubchemSkill
- drug-docking-analysisSkill
- drug-docking-vinaSkill
- drug-ligand-prepSkill
- drug-mmpbsa-gbsaSkill
- drug-molecular-fingerprintsSkill
- drug-pocket-detectionSkill
- drug-pose-validationSkill
- drug-protein-ligand-mdSkill
- drug-protein-prepSkill
- drug-redocking-rmsdSkill
- drug-retrosynthesisSkill
- drug-trajectory-analysisSkill
- general-arxiv-searchSkill
- general-biorxiv-searchSkill
- general-chemical-literatureSkill
- general-chemical-pricingSkill
- general-deep-researchSkill
- general-fair-data-reviewSkill
- general-patent-searchSkill
- general-peer-reviewSkill
- general-plot-digitizerSkill
- general-presentationSkill
- general-property-unitsSkill
- general-publisher-access-guardSkill
- general-query-literature-databaseSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Packmol binary: must be installed and on PATH in the base-agent environment.
- Very specific: line 19
RDKit: must be available in the base-agent environment (for SMILES → 3D geometry).
- Distinctive: line 35
Use the box-building script to create a solvated system with Packmol:
- Very specific: line 76
Use MCP run_md tools for NPT equilibration followed by NVT production.
- Distinctive: line 115
Run the analysis script on the production trajectory:
- Distinctive: line 166
After MD + analysis, expected RDF peak positions:
- Distinctive: line 173
Timestep: Use 0.5 fs for water and systems with O–H/N–H bonds (fast vibrations).
- Distinctive: line 176
PBC interactions: Ensure the box is large enough that periodic images do not interact (box side > 2 × rmax for RDF).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Solution-Phase Molecular Dynamics
Goal
Set up and run molecular dynamics (MD) simulations of molecules in explicit solvent. This skill covers three stages: (1) building a solvation box with Packmol, (2) running NPT/NVT MD using MLIPs, and (3) analyzing the trajectory for radial distribution functions (RDFs), coordination numbers, density convergence, and mean-square displacement (MSD).
[!IMPORTANT] This skill bridges gas-phase
chem-*skills and condensed-phasemat-*skills by providing workflows for solvation dynamics, liquid structure characterization, and dissolution studies.
1. Prerequisites
- Packmol binary must be installed and on
PATHin thebase-agentenvironment. - RDKit must be available in the
base-agentenvironment (for SMILES → 3D geometry). - An MLIP backend must be available via MCP tools (MACE, MatGL, or FairChem).
2. MLIP Selection
Refer to the foundation-potentials skill for model selection.
[!NOTE]
- Organic solvents: Use
MACE-MH-1withomolhead, orUMAwithomoltask.- Aqueous inorganic systems: Use
MACE-MH-1withomat_pbehead, or MatGL/CHGNet.- Mixed organic-inorganic: Use
UMAwhich handles both.
3. Workflow
Step 1: Build Solvation Box
Use the box-building script to create a solvated system with Packmol:
# Env: base-agent
# Pure solvent box (64 water molecules)
python .agents/skills/chem-solution-md/scripts/build_solvation_box.py \
--solvent water \
--num_solvent 64 \
--output_dir research/my_folder/solvation_box
# Solute in solvent (NaCl in 64 water molecules)
python .agents/skills/chem-solution-md/scripts/build_solvation_box.py \
--solute_smiles "[Na+].[Cl-]" \
--solvent water \
--num_solvent 64 \
--output_dir research/my_folder/solvation_boxKey Parameters:
| Argument | Description |
--solvent | Pre-defined solvent name (see available solvents below) |
--solvent_smiles | SMILES string for custom solvent |
--solvent_file | Path to solvent structure file |
--solute_smiles | SMILES string for solute (optional) |
--solute_file | Path to solute structure file (optional) |
--num_solvent | Number of solvent molecules (default: 64) |
--box_size | Cubic box side in Å (auto-calculated from density if omitted) |
--tolerance | Minimum inter-molecular distance in Å (default: 2.0) |
--output_dir | Output directory |
Available pre-defined solvents: water, methanol, ethanol, acetonitrile, dmso, dmf, thf, toluene, acetone, dichloromethane, chloroform, hexane
Output files:
solvated_box.cif— Periodic structure for MDsolvated_box.xyz— Non-periodic XYZ for visualizationbox_metadata.json— Box size, atom counts, solute indices
Step 2: Run MD with MLIP
Use MCP run_md tools for NPT equilibration followed by NVT production.
NPT Equilibration (stabilize density):
mcp_mace_load_model(
model_name="MACE-MH-1",
task_name="omol"
)
mcp_mace_run_md(
structure_data="research/my_folder/solvation_box/solvated_box.cif",
temperature=300,
ensemble="npt",
pressure=1.01325, # 1 atm in bar
steps=5000, # 2.5 ps at 0.5 fs timestep
timestep=0.5, # 0.5 fs for systems with water (fast O-H vibrations)
log_interval=10,
monitor=True,
monitor_type=["explosion", "volume"],
output_dir="research/my_folder/npt_equilibration"
)NVT Production (use the equilibrated structure):
mcp_mace_run_md(
structure_data="research/my_folder/npt_equilibration/final_structure.cif",
temperature=300,
ensemble="nvt",
steps=20000, # 10 ps at 0.5 fs timestep
timestep=0.5,
log_interval=10,
monitor=True,
monitor_type="explosion",
output_dir="research/my_folder/nvt_production"
)Step 3: Analyze Trajectory
Run the analysis script on the production trajectory:
# Env: base-agent
python .agents/skills/chem-solution-md/scripts/analyze_solution_md.py \
--trajectory research/my_folder/nvt_production/trajectory.traj \
--rdf_pairs "Na-O,Cl-O,O-O" \
--msd_elements "Na,Cl" \
--log_interval_fs 5.0 \
--output_dir research/my_folder/analysisKey Parameters:
| Argument | Description |
--trajectory | Path to ASE .traj trajectory file |
--rdf_pairs | Comma-separated element pairs for RDF, e.g. "Na-O,Cl-O" |
--rmax | Maximum RDF distance in Å (default: 8.0) |
--start_frame | First frame to include in analysis (default: 0) |
--stride | Frame stride (default: 1) |
--log_interval_fs | Time between frames in fs (default: 10.0) |
--msd_elements | Comma-separated elements for MSD (optional) |
Output files:
solution_analysis.json— Full results (RDF data, coordination numbers, density, MSD)rdf_plots.png— RDF plots for each element pairdensity_convergence.png— Density vs. timemsd_plot.png— MSD for specified elements (if requested)
4. Examples
Pure Water Box
# Env: base-agent
python .agents/skills/chem-solution-md/scripts/build_solvation_box.py \
--solvent water --num_solvent 64 \
--output_dir .agents/skills/chem-solution-md/examples/pure_waterExpected: 192 atoms (64 × 3), box ~12.4 Å
NaCl in Water
# Env: base-agent
python .agents/skills/chem-solution-md/scripts/build_solvation_box.py \
--solute_smiles "[Na+].[Cl-]" --solvent water --num_solvent 64 \
--output_dir .agents/skills/chem-solution-md/examples/NaCl_in_waterAfter MD + analysis, expected RDF peak positions:
- Na–O first peak: ~2.4 Å
- Cl–O first peak: ~3.2 Å
- Na coordination number: ~5–6
5. Constraints
- Timestep: Use 0.5 fs for water and systems with O–H/N–H bonds (fast vibrations). Can use 1.0 fs for heavier solvents without H.
- Equilibration: NPT equilibration is critical. Verify density stabilization before production run.
- System size: A minimum of 64 solvent molecules is recommended for reliable RDFs. Larger boxes (128–256) reduce finite-size effects.
- PBC interactions: Ensure the box is large enough that periodic images do not interact (box side > 2 × rmax for RDF).
- Environments:
base-agentfor box building and analysis scripts- MCP tools for MD (any MLIP backend)
References
- Martínez et al., "PACKMOL: A package for building initial configurations for molecular dynamics simulations", J. Comput. Chem., 2009. DOI
- pymatgen PackmolBoxGen: pymatgen.io.packmol
Author: Bowen Deng Contact: GitHub @learningmatter-mit
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

