packmol-generate-mixture

从单分子结构生成用于分子动力学或相关计算的初始稠密分子构型(XYZ 格式)。通过计算盒子尺寸、编写 Packmol 输入脚本并执行 Packmol,在模拟盒子中随机填充指定数量的分子,支持按目标密度或固定边长指定体系大小。

仓库最近推送
GitHub Stars
166
Forks
30
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "packmol-generate-mixture":https://skillpi.com/zh/skills/deepskill-673d887d05bb64841c661c84aeba1643a8aa40a5469cf7d2e611e607bfb880fb。安装前核对上游来源和版本:https://github.com/jinzhezenggroup/computational-chemistry-agent-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

从单分子结构生成用于分子动力学或相关计算的初始稠密分子构型(XYZ 格式)。通过计算盒子尺寸、编写 Packmol 输入脚本并执行 Packmol,在模拟盒子中随机填充指定数量的分子,支持按目标密度或固定边长指定体系大小。

0 下载

介绍来源: third_party · jinzhezenggroup · 1.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
输入和输出
翻译待完成,请参阅来源文档。
限制与区别
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
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)

  1. 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)
  2. 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
  3. Decide box size:

    • If user provides box_length_A: use it.
    • Else compute box_length_A from density (see formula below).
  4. Create a working folder at the requested output location:

    • copy the component XYZ files into it (or reference them with absolute paths)
  5. Write Packmol input ${system_name}.inp:

    • one structure ... end structure block per component
    • all components share the same inside box 0 0 0 L L L
  6. 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
  7. 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)
  8. (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-tools from 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 _packed suffix)
  • packmol.out (stdout log; capture with tee)

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.

当前收录版本

1.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值78/100

亮点

  • 面向计算化学领域的专业工具,解决分子动力学模拟初始构型生成的明确需求
  • 功能定位清晰,虽受众专业但实用价值显著
触发精准92/100

亮点

  • 触发描述完整覆盖使用场景、工具依赖和输入要求
  • USE WHEN 语句清晰定义了适用边界
结构规范95/100

待提升项

  • 缺少 When to Use 显式章节 原报告严重程度:轻微

    文档中已有使用场景描述,但未使用标准章节标题

    改进建议:建议添加显式的 'When to Use' 章节以提升可读性

亮点

  • 执行流程分8个清晰阶段,逻辑完整
  • 包含完整的输入 schema 和端到端示例
  • frontmatter 信息完整,含兼容性说明和许可证
执行可靠88/100

亮点

  • 工具调用方式明确(uvx packmol),含备用安装方案
  • 输入验证机制完善,覆盖文件存在性和格式检查
  • 提供 LAMMPS 后处理方案,增强实用性
证据可验 (前四项均值)88/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • github.com
  • pypi.org

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。