Skip to content

4. Build — 8 种 builder + 9 种 material 别名

三种入口(按抽象高低排)

抽象层语法何时用
最高 — material 别名mat build mos2经典材料、最快
中 — builder kindmat build monolayer prototype=MoS2-2H参数微调
最低 — 从 MP 拉mat get mp-2815数据库里查

入口 1:Material 别名(最常用)

bash
mat materials

列全部别名(运行时输出):

别名实际构造
mos2, tmdmonolayer prototype=MoS2-2H
graphene, grhoneycomb element=C a=2.46
hbn, h-bnhoneycomb element=B element-b=N a=2.504
bihoneycomb element=Bi a=4.337 buckling=1.74
sbhoneycomb element=Sb a=4.025 buckling=1.65
ashoneycomb element=As a=3.607 buckling=1.40

例 1:MoS2 单层

bash
mat build mos2 -q

mos2

例 2:石墨烯

bash
mat build graphene -q

graphene

例 3:hBN

bash
mat build hbn -q

hbn

例 4:buckled Bi(群 V 单层)

bash
mat build bi -q

bi

别名也接受所有调整参数

bash
mat build mos2 strain=2%                  # 建好就施 2% 应变
mat build mos2 vacuum=25                  # 真空层 25 Å
mat build hbn a=2.6                       # 覆盖晶格常数
mat build hbn strain=3%                   # hBN + 3% 应变

施 3% 应变的 hBN(晶格变大):

hbn-strain3

施各向异性应变的 MoS2 (a:+3%, b:-1%):

mos2-aniso

入口 2:通用 builder kind

bash
mat build <kind> key=value ...
kind含义关键参数
monolayerTMD/钙钛矿单层(用 prototype)prototype= (MoS2-2H, MoS2-1T, ...)
honeycomb蜂窝晶格(六方双原子)element= element-b= a= buckling=
square正方晶格(单原子)element= a=
bilayer两层堆叠两个 .vasp + interlayer= shift-xy=
slab金属表面切片metal= miller=h,k,l layers= vacuum=
octahedron单个 ABX6 八面体center= ligand=
octa-pair两个共享 motif 的八面体center= ligand= mode=corner/edge/face
octa-lattice钙钛矿样八面体阵列center= ligand= nx= ny= nz=

例:Pt(111) slab

bash
mat build slab metal=Pt miller=1,1,1 layers=4 vacuum=15 -q

pt111

例:MoS2 双层

需要先有底/顶两个文件:

bash
mat build mos2 -q                                    # → mos2.vasp
cp runs/001-run/mos2.vasp /tmp/a.vasp
cp runs/001-run/mos2.vasp /tmp/b.vasp
mat build bilayer /tmp/a.vasp /tmp/b.vasp interlayer=6.5 -q

bilayer

入口 3:从 Materials Project

需要 MP_API_KEY

bash
mat /mp list elements=Mo,S                # 列匹配条目
mat get mp-2815                           # 取 MoS2 的某个 entry

通用:lattice 后置参数(构造时直接调)

所有 builder 都接受这些键,会在结构造完后立刻施作:

效果
strain=2%双轴 2% 应变
strain=a:1%,b:-0.5%各向异性
vacuum=20真空层 20 Å
recenter=zslab 居中
out=path显式输出路径(否则自动 <name>.vasp

例:

bash
mat build mos2 strain=2% vacuum=22 recenter=z out=runs/001-run/mos2-prepared.vasp

一条命令完成"建 + 应变 + 真空调整 + 居中 + 命名"全部。

自动产物

每条 build 完成后,run dir 里产出:

<name>.vasp          POSCAR
<name>.png           VESTA 风格 3D 渲染
<name>.summary.md    formula / lattice / 2D slab+vacuum / motifs / sites

参见 Auto-artifacts

2D 安全护栏

mat 内置以下保护,错的构造会被拒绝(除非传 force=1 强制):

  • 真空层 < 8 Å → 报错(避免镜像间作用过强)
  • c 长度 < slab 厚度 → 报错
  • slab 没置中(如离 cell 边 < 1 Å)→ warning

详见 Lattice ops


下一步: Motifs → 配位环境抽象 + connectivity graph

也可以直接看: Complex gallery — 10 个真实项目级复杂案例(多层、异质结、错位、表面吸附、缺陷簇)

AGPL-3.0-or-later · 商用请联系 aiden.novak.ai@gmail.com