packmol-generate-mixture
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "packmol-generate-mixture" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-673d887d05bb64841c661c84aeba1643a8aa40a5469cf7d2e611e607bfb880fb. Verify the upstream source and version against https://github.com/jinzhezenggroup/computational-chemistry-agent-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Generate initial dense molecular-mixture configurations (XYZ format) from single-molecule structures for molecular dynamics or related calculations. Computes box dimensions, writes a Packmol input script, and runs Packmol to randomly pack a specified number of molecules into the simulation box, supporting target density or fixed box length definitions.
Introduction source: third_party · jinzhezenggroup · 1.0 Reference
SkillPi interpretation
- Tasks
- Use Packmol to generate an initial **packed** configuration for a molecular mixture.
- Inputs and outputs
- Example (replace with your own species/files): ```yaml system_name: mixture_pack output_dir: /path/to/output/packed
- Limits and differences
- Packed XYZ has coordinates only; **no topology**, **no force-field types**, **no LAMMPS data**. Packing success ≠ physically valid structure; minimization/equilibration still required.
- Testing
- Not tested
Browse files
Frontmatter
name: packmol-generate-mixture
description: >
A tool for generating initial packed molecular configurations (XYZ format) from single-molecule structures by calculating box dimensions, writing input scripts, and executing Packmol.
USE WHEN you need to randomly pack a specific number of molecules into a simulation box (defined by target density or fixed lengths) to create starting geometries for molecular dynamics or related computational chemistry workflows.
compatibility: Requires uv and internet access (uses `uvx packmol ...`).
license: LGPL-3.0-or-later
metadata:
author: hcustc-bot
version: '1.0'
repository: https://github.com/m3g/packmol
repositories:
- https://github.com/m3g/packmol
- https://pypi.org/project/lammps-md-tools/
openclaw:
emoji: 📦
requires:
bins: [uv, python3]
os: [linux, darwin]packmol-generate-mixture
Use Packmol to generate an initial packed configuration for a molecular mixture.
Agent responsibilities (do these in order)
-
Collect inputs (ask if missing; do not guess):
- component structure files (XYZ), one per species (e.g.
species1.xyz,species2.xyz) - molecule counts for each species (e.g.
species1: 100,species2: 650) - either target density (g/cm^3) or a fixed cubic box length (Å)
- Packmol
tolerance(Å) - output location: output directory + output filename prefix (system name)
- component structure files (XYZ), one per species (e.g.
-
Validate inputs:
- confirm XYZ files exist and are readable
- confirm the first line (atom count) matches the number of coordinate lines
- if density-based box estimation is requested: confirm each molecule’s elemental composition can be inferred from the XYZ symbols
-
Decide box size:
- If user provides
box_length_A: use it. - Else compute
box_length_Afrom density (see formula below).
- If user provides
-
Create a working folder at the requested output location:
- copy the component XYZ files into it (or reference them with absolute paths)
-
Write Packmol input
${system_name}.inp:- one
structure ... end structureblock per component - all components share the same
inside box 0 0 0 L L L
- one
-
Run Packmol locally:
- Prefer:
uvx packmol -i ${system_name}.inp - If you need to force the source package:
uvx --from packmol packmol -i ${system_name}.inp
- Prefer:
-
Report results:
- exact output paths (inp, xyz, log)
- final box length (Å) and the parameters used (counts, density or fixed L, tolerance)
- basic sanity checks (total molecules, total atoms)
-
(Optional) Post-process for LAMMPS
If the user plans to run LAMMPS (especially ReaxFF), they often need a LAMMPS data file with correct box bounds.
- If you convert XYZ -> LAMMPS data with dpdata, dpdata may write default box bounds (e.g., 0..100 Å).
- Fix the bounds to match the Packmol cubic box length using
lammps-md-toolsfrom PyPI:
uvx --from lammps-md-tools lammps-fix-box \
--in input.data \
--out output.boxfix.data \
--L 60.690 \
--wrap
This rewrites xlo/xhi, ylo/yhi, zlo/zhi to 0..L, zeroes tilt factors, and optionally wraps atoms into the box.
What to ask the user (plain language)
If the user didn’t specify them, ask at minimum:
- Packing counts: how many molecules of each species? (e.g.,
species1=100, species2=650) - Box definition: do you want to estimate a cubic box from a target density (g/cm^3), or do you want to provide a fixed cubic box length L (Å)?
- Tolerance: what Packmol
tolerance(Å) should be used? (common starting point: 2.0 Å) - Output location: which directory should receive the results, and what system name / filename prefix should be used?
If the user says “use defaults”, propose defaults:
tolerance = 2.0 Å- output dir: a
packed/subfolder under the folder containing the input XYZ - (density) do not assume; ask for it, but you may suggest a starting value the user can confirm.
Input schema (recommended)
Example (replace with your own species/files):
system_name: mixture_pack
output_dir: /path/to/output/packed
# Choose ONE of the following:
density_g_cm3: 0.25
# box_length_A: 60.69
tolerance_A: 2.0
components:
- name: species1
structure_file: /path/to/species1.xyz
number: 100
- name: species2
structure_file: /path/to/species2.xyz
number: 650
Density → cubic box length (Å)
When density_g_cm3 is provided and box_length_A is not, estimate L from total mass:
- infer each molecule’s elemental composition from its XYZ symbols
- use standard atomic masses (g/mol)
- compute total molar mass of the whole configuration (g/mol)
- convert to mass per configuration:
m_cfg = M_total / N_A(g) - compute volume in cm^3:
V_cm3 = m_cfg / density_g_cm3 - convert to Å^3:
V_A3 = V_cm3 * 1e24 - cubic length:
L_A = V_A3 ** (1/3)
This is an initial packing estimate (geometry construction), not an equilibrated density.
Output contract
The run should produce (within output_dir):
${system_name}.inp(Packmol input)${system_name}.xyz(packed XYZ output; name may include_packedsuffix)packmol.out(stdout log; capture withtee)
Limitations (be explicit)
- Packed XYZ has coordinates only; no topology, no force-field types, no LAMMPS data.
- Packing success ≠ physically valid structure; minimization/equilibration still required.
Current listing version
1.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 面向计算化学领域的专业工具,解决分子动力学模拟初始构型生成的明确需求
- 功能定位清晰,虽受众专业但实用价值显著
Highlights
- 触发描述完整覆盖使用场景、工具依赖和输入要求
- USE WHEN 语句清晰定义了适用边界
Areas to improve
-
缺少 When to Use 显式章节 Reported severity: Minor
文档中已有使用场景描述,但未使用标准章节标题
Recommendation: 建议添加显式的 'When to Use' 章节以提升可读性
Highlights
- 执行流程分8个清晰阶段,逻辑完整
- 包含完整的输入 schema 和端到端示例
- frontmatter 信息完整,含兼容性说明和许可证
Highlights
- 工具调用方式明确(uvx packmol),含备用安装方案
- 输入验证机制完善,覆盖文件存在性和格式检查
- 提供 LAMMPS 后处理方案,增强实用性
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
- pypi.org
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.