From packmol
Use when writing, reviewing, debugging, or explaining packmol input files and packing strategies for molecular dynamics simulations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/packmol:packmolThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Packmol is a tool for building initial configurations of molecular systems by packing molecules subject to geometric constraints. It is commonly used as a pre-processing step for molecular dynamics (MD) simulations.
Packmol is a tool for building initial configurations of molecular systems by packing molecules subject to geometric constraints. It is commonly used as a pre-processing step for molecular dynamics (MD) simulations.
| Scenario | Recommended Tool | Why |
|---|---|---|
| Solvating a solute, building bulk mixtures, or creating droplets/slabs for MD | Packmol | Purpose-built for packing with geometric constraints |
| Building crystalline supercells or surfaces from unit cells | ASE / pymatgen | Better support for periodic symmetry and space groups |
| Generating polymer chains or highly branched topologies | polymer-build / custom scripts | Packmol requires pre-built monomer structures as inputs |
Key rule: Use Packmol when you need to combine pre-existing molecular structures into an initial MD configuration with control over spatial placement and density.
Packmol must be installed and the packmol binary available in PATH. The repo includes local references for syntax, examples, and troubleshooting.
Use local references to write correct input files:
references/syntax.md — Complete keyword reference, nesting rules, and unit conventions.references/examples.md — Copy-pasteable patterns for bulk mixtures, solvated solutes, droplets, slabs, and multi-region systems.references/troubleshooting.md — Common errors, convergence issues, and quick sanity-check heuristics.packmol < input.inp
tolerance smaller than the intended van-der-Waals contact distance. Overly tight tolerances prevent convergence (default 2.0 is a safe starting point for liquids).inside and outside boundaries closer than tolerance. This creates contradictory constraints.seed when reproducibility matters. Packmol uses random initial placements.pdb or mol2 for systems that will be processed by MD topology builders.seed for reproducibility.tolerance to the force-field vdW radii if they are known (typical range 1.5–3.0 Å).tolerance between any inside and outside regions.tolerance 2.0 is a robust default.references/troubleshooting.md to sanity-check box dimensions before running.WebFetch on http://m3g.iqm.unicamp.br/packmol/home.shtml before answering.| Error / Symptom | Likely Cause | Fix |
|---|---|---|
| "Final objective function > 1e-3" | Poor convergence | Increase box size, loosen tolerance, change seed, or increase nloop / maxit |
| "The structure file could not be opened" | Wrong relative path or missing file | Verify paths and working directory |
| "Number of atoms in structure file ..." | filetype mismatches actual format | Correct filetype to match pdb, xyz, or mol2 |
| "Inconsistent constraints" | Contradictory inside / outside directives | Ensure boundaries are separated by more than tolerance |
| Very slow optimization | Over-constrained or near-critical packing | Increase volume margin or slightly loosen tolerance |
references/syntax.mdreferences/examples.mdreferences/troubleshooting.mdIf the user asks about recently added features, new options, or version-specific syntax changes, use WebFetch on the official documentation at http://m3g.iqm.unicamp.br/packmol/home.shtml before answering.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub wugroup-xjtlu/cc-skills-zhenghaowu-group --plugin packmol