/scrinium:lammpsfrom scrinium
Guides classical molecular dynamics simulations with LAMMPS: interatomic-potential selection, shock/deformation setups, thermodynamic runs, and structure analysis for solids and nanomaterials.
Ships in scrinium. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
用 LAMMPS 做材料科学分子动力学模拟:晶体构建、势函数选择、形变/冲击、结构分析、可视化。
本 skill 故意保持轻量:
scrinium toolref本 skill 应与 scientific-runtime 一起理解:
lammps skill 负责经典 MD 路由、工作流和科学规范scientific-runtime 负责运行时的 toolref-first 行为和覆盖缺口退化策略toolref 负责命令、参数页和 package 限制说明对 LAMMPS 问题,agent 默认按这个顺序工作:
pair_style、fix、compute、dump、region、boundary、run 流程search 找主入口,再用 showtoolref 已能回答,就不要在 skill 里重复写手册toolref 命中不好或某个 package 页面缺失,agent 应先完成任务,再把它标记为维护层缺口,而不是让用户自己补这意味着:
fix / pair_style 的映射关系fix npt -> fix_nh、pair style eam -> pair_eam 这类入口差异# 安装(含 GPU 支持)
conda install -c conda-forge lammps
# 可视化
pip install ovito
验证:lmp -h 应显示已安装的 packages(需包含 GPU、MANYBODY、EXTRA-COMPUTE)。
GPU 加速:package gpu 4 在输入脚本开头启用,suffix gpu 自动为支持的 pair_style 加 /gpu 后缀。
并行运行约束:
mpirun/mpiexeclmp 链接的 libmpi 与 launcher 不一致,可能出现“进程活着但无日志输出”的假启动挂起适合:
不适合:
当 agent 不确定命令、参数、限制、输出字段时,先查 toolref,再写输入脚本。
常用查法:
scrinium toolref search lammps "nose hoover thermostat"
scrinium toolref show lammps fix_nh
scrinium toolref show lammps pair_eam
scrinium toolref show lammps compute_cna_atom
scrinium toolref show lammps fix_deform
推荐习惯:
pair_style / fix / compute / dumptoolref show 看 Restrictionstoolref search,确定候选命令后再 show如果遇到覆盖缺口:
toolref 覆盖/排序缺口,不是用户操作错误scrinium search "<材料/现象>" 检索相关论文建议按这个顺序思考:
参数出处规则:
| 势函数类型 | 适用场景 | LAMMPS pair_style |
|---|---|---|
| EAM/FS | 金属(Fe, Cu, Al, Ni...) | eam/fs, eam/alloy |
| Tersoff | 共价半导体(Si, C, SiC) | tersoff |
| ReaxFF | 反应性体系(燃烧、氧化) | reaxff |
| AIREBO | 碳纳米材料(CNT, 石墨烯) | airebo |
| SW | Si, GaN | sw |
| MEAM | 多元合金 | meam |
势函数文件来源:
科学规范:势函数选择必须有文献依据,不能随便选一个"能跑"的。
fix deform、应力应变提取、应变率合理性常用结构分析:
cna/atom:区分 BCC/FCC/HCPptm/atom:更稳健的局域结构识别centro/atom:缺陷检测voronoi/atom:局域环境统计这些命令的准确接口、参数和限制请直接查 toolref。
OVITO 是 LAMMPS 的标准可视化工具。
from ovito.io import import_file
from ovito.modifiers import CommonNeighborAnalysisModifier, SliceModifier
from ovito.vis import Viewport, TachyonRenderer
pipeline = import_file("dump.shock.*", sort_particles=True)
pipeline.modifiers.append(CommonNeighborAnalysisModifier())
# 按结构类型着色
def color_by_phase(frame, data):
import numpy as np
colors = np.zeros((data.particles.count, 3))
cna = data.particles["Structure Type"]
colors[cna == 3] = [0.3, 0.5, 0.8] # BCC → 蓝
colors[cna == 2] = [0.85, 0.15, 0.15] # HCP → 红
colors[cna == 1] = [0.2, 0.8, 0.2] # FCC → 绿
colors[cna == 0] = [0.7, 0.7, 0.7] # Other → 灰
data.particles_.create_property("Color", data=colors)
pipeline.modifiers.append(color_by_phase)
vp = Viewport(type=Viewport.Type.ORTHO, camera_dir=(0, -1, 0))
vp.zoom_all(size=(1920, 1080))
renderer = TachyonRenderer(shadows=False, ambient_occlusion=True)
vp.render_image(filename="snapshot.png", size=(1920, 1080), renderer=renderer)
推荐输出:
| 体系大小 | 势函数 | GPU 配置 | 预期性能 |
|---|---|---|---|
| ~500k 原子 | EAM | 4×A100 | ~50 ns/day |
| ~2M 原子 | EAM | 4×A100 | ~15-20 ns/day |
| ~100k 原子 | ReaxFF | 4×A100 | ~1-2 ns/day |
| 检查项 | 正确做法 | 常见错误 |
|---|---|---|
| 势函数 | 有文献验证的 EAM/Tersoff | 随便选一个 LJ |
| 体系大小 | 足够消除有限尺寸效应 | 太小导致伪周期 |
| 平衡 | 先 NPT 平衡再施加载荷 | 直接拉伸未平衡体系 |
| 时间步长 | metal 单位下 0.001 ps (1 fs) | 步长太大导致能量不守恒 |
| 边界条件 | 冲击方向用 s(非周期) | 全周期导致冲击波自干涉 |
| 截断半径 | 根据势函数要求设置 | 用默认值不检查 |
fix / compute / pair_style 细节,先查 toolrefWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub wszqkzqk/scrinium --plugin scrinium38 skills in this plugin
/arxivUse when the user wants to browse arXiv preprints, search arXiv directly, fetch a PDF by arXiv ID or URL, or send a preprint straight into the ingest pipeline./auditAudit paper data quality in the knowledge base and take over repairs. Rule-based checks surface missing fields, filename issues, DOI duplicates, and title mismatches with per-issue fix hints; agent/subagents then verify against the original text and fix meta.json directly. Use when the user wants to check data quality, find problems, or fix metadata issues./bioinformaticsUse when working on bioinformatics toolchains such as alignment, variant calling, phylogenetics, or protein-structure analysis, especially when the agent must route across BLAST, minimap2, samtools, bcftools, MAFFT, IQ-TREE, or ESMFold./citation-checkVerify citations in AI-generated or human-written text against the local knowledge base. Catches hallucinated references, wrong metadata, and missing papers. Use when the user wants to check if citations are real and accurate./citationsView top-cited papers ranking and refresh citation counts from APIs. Use when the user asks about highly cited papers, citation rankings, or wants to update citation data./curateCurate papers with tags in batch — build and maintain a healthy tag vocabulary, tag untagged papers via subagents, and review vocabulary quality. Tags are the library's topic layer (see the /topics skill). Use when the user wants to tag papers / batch-organize the library with tags / tidy up the tag vocabulary.Other plugins' skills for the same job