ATAT 完整使用教程
鸢算科技 · HPC 集群|ATAT 3.52|2026 年 10 月
这份教程从输入文件开始,介绍 SQS、簇展开、蒙特卡洛、声子、电子自由能、弹性和 CALPHAD 工作流。正文中的数据来自随文算例的实际计算,图片由这些数据绘制。第一次使用,建议依次阅读第 1—6 章;只想生成无序合金结构,可先完成第 4—5 章。
教程覆盖当前模块 atat/3.52-8173m 的 78 个命令入口,并解释 MPI 底层程序的对应关系。命令全参考逐一说明用途、输入、输出、调用格式和注意事项,附当前版本的完整参数清单。这里的“全部命令”以本集群安装版本为边界;上游源码中没有安装的试验程序、其他电子结构软件接口和第三方软件,另列说明。
配套文件包括 算例与数据、汇总数据和可放大的 SVG/PNG 图片。教程与命令全参考还合并为一份 PDF,便于离线阅读。
1. ATAT 能解决什么问题
ATAT 是一组相互配合的合金理论工具。它既能寻找代表无序固溶体的原子排列,也能把许多结构的能量组织为簇展开,再用蒙特卡洛研究有限温度下的构型行为。
| 你想做的事情 | 主要程序 | 得到什么 |
|---|---|---|
| 给定晶格和组分,生成无序合金超胞 | mcsqs |
bestsqs.out、关联函数误差 |
| 列出对称性不同的有序结构 | genstr |
多个 ATAT 结构 |
| 用结构能量建立二元/多元簇展开 | maps / mmaps |
ECI、拟合误差、基态候选 |
| 计算温度、化学势变化下的构型性质 | emc2 / memc2 |
能量、浓度、关联函数等 |
| 跟踪两个相之间的共存边界 | phb |
两相浓度随温度的变化 |
| 从位移—受力数据计算声子 | fitfc |
力常数、声子谱、振动自由能 |
| 用键刚度随键长的关系近似声子 | fitsvsl + svsl |
可迁移的弹簧模型、振动自由能 |
| 加入电子自由能 | felec、clusterexpand、mkteci |
温度相关 ECI |
| 生成 CALPHAD 数据库 | sqs2tdb |
由 SQS 数据拟合的 .tdb 文件 |
ATAT 本身不会自动把一种元素组合变成可靠的相图。结构能量或受力需要由 VASP 等电子结构程序或适合该材料的势函数提供;晶格选择、磁性、弛豫方式、能量一致性、训练集覆盖和统计收敛都影响最终结果。
本文明确区分三类数据:Cu–Au 能量和 Al 体积扫描使用 VASP/PBE;Al 声子、三元合金和应变能的部分教学例使用 ASE 的 EMT 势;二元蒙特卡洛使用 ATAT 自带 examples/mc 的已给定哈密顿量。这些方法都实际执行过,但不能把它们互相替代,也不能将教学模型曲线称为实验相图。
2. 开始使用:环境、目录和任务提交
2.1 加载环境
module load atat/3.52-8173m
yskit atat-init
也可以输入 yskit,在软件环境配置入口中完成 ATAT 初始化。初始化只创建缺失的个人配置,已有配置保持不变。
| 软件部分 | 本文使用的环境 |
|---|---|
| ATAT | 3.52,GNU G++ 13.3.0,常规 CPU 构建 |
| ATAT MPI 程序 | 独立 OpenMPI 5.0.10 |
| VASP 接口 | CPU 普通版 VASP 6.4.2,Intel oneAPI 2024.2 |
| 势函数教学例 | ASE 3.29.0,EMT;需要时加载 ase/3.29.0 |
ATAT 的常规搜索与蒙特卡洛没有通用的 GPU 加速开关。MPI 版 ATAT 与 VASP 使用的 MPI 环境不同,分别使用对应作业模板,避免在同一终端反复混装 MPI。不要在 atat-vasp 或 atat-mpigenstr 外面再套一层 mpirun。
2.2 下载算例后如何使用
先解压算例包。在某个算例的副本中工作,保留原来的输入和参考结果:
cp -r examples my-atat
cd my-atat/01-sqs-fcc32
算例包将 input/ 与 reference/ 分开。保留相邻的 common/ 目录,它提供随文的能量、受力和拟合接口。在算例根目录提交 sbatch submit.sh,脚本会自动进入 input/。如果逐条操作正文命令,再手动进入干净的 input/;不要把 stop、stopsqs、旧 bestsqs.out、旧 error 等状态文件带入新计算。
2.3 在集群里提交
普通计算通过 Slurm 提交。yskit 能找到对应的 ATAT 脚本;核时用户的模板位于:
/public/slurm_scripts/hs_user/atat/3.52/8173m/
套餐用户使用同层的 tc_user 入口。通常先把对应模板复制到自己的算例目录,再使用短命令提交:
sbatch sub_mcsqs_multi.sh 32 250000
这里 32 是 SQS 总原子数,250000 是每个搜索进程的步数上限,都不是申请的 CPU 核数。现行 CPU 模板默认申请 56 核整节点;sub_mcsqs_single.sh 是历史文件名,目前也按模板设置启动多个搜索进程,不能仅凭文件名判断资源数量。
| 任务 | 拷贝后提交的脚本 |
|---|---|
| 多个独立 SQS 搜索并选优 | sub_mcsqs_multi.sh |
| 单个结构的 VASP 能量/受力 | sub_atat_vasp.sh |
| 二元簇展开与 VASP 自动配合 | sub_maps_vasp.sh |
| MPI 枚举结构 | sub_mpigenstr.sh |
| MPI 多元簇展开 | sub_mpimmaps.sh |
正文展示的 mcsqs、maps、fitfc 等科学计算命令,应放在获得计算资源的作业里运行。不能因为某个程序只开一个进程,就默认适合在登录终端长时间运行。
3. 先读懂 ATAT 的结构文件
3.1 lat.in:允许出现哪些原子排列
下面是 FCC Cu–Au 母晶格:
3.85 3.85 3.85 90 90 90
0 0.5 0.5
0.5 0 0.5
0.5 0.5 0
0 0 0 Cu,Au
第一行定义参考坐标轴:三个轴长及其夹角。接下来的三行定义晶胞矢量,使用这些参考轴作基底。最后一行给出一个格点的位置,以及该位置可以放置的元素。逗号表示可替换的物种,不能写成带空格的 Cu, Au。
这不是“第一行已经给出了晶胞,下面三行可以随便填”的格式。上例的实际晶胞是 FCC 原胞,体积为 3.85³/4,每个原胞只有一个可替换格点。原子坐标也相对于第一行定义的参考轴,不自动等于相对于后面三条晶胞矢量的分数坐标。
参考轴也可以写成三行笛卡尔向量;这时一个结构通常有六行几何信息,之后才是原子列表。看见 str.out 的六行开头不要误删前三行。
3.2 str.out:一个已经确定的结构
例如 Cu₃Au 的 L1₂ 常规胞:
3.8 3.8 3.8 90 90 90
1 0 0
0 1 0
0 0 1
0 0 0 Au
0 0.5 0.5 Cu
0.5 0 0.5 Cu
0.5 0.5 0 Cu
lat.in 写“允许 Cu 或 Au”,str.out 写“这里实际是 Cu”。固定子晶格只写一种元素,例如 N;空位可以使用 Vac。同一项研究中的元素命名、格点允许占据种类和坐标轴要保持一致。
3.3 rndstr.in:目标无序态
SQS 输入把最后一行改成概率:
0 0 0 Cu=0.5,Au=0.5
每个可替换子晶格上的概率和应为 1,超胞中的各元素数还必须能取整数。例如三元等比例 24 原子对应 8/8/8;10 原子的三元等比例超胞不能严格满足这个组分。固定 N 子晶格也占总原子数,不能从 -n 中漏掉。
3.4 转换、检查和可视化
cellcvrt -pn < str.out
cellcvrt -pv < str.out
str2poscar < str.out > POSCAR
str2cif < str.out > structure.cif
str2xyz 1 1 1 str.out > structure.xyz
前两条分别输出原子数和晶胞体积;后三条用于 VASP、晶体可视化软件和 XYZ 查看器。str2poscar 会按物种组织原子顺序,拼接 POTCAR 时必须使用输出 POSCAR 的元素顺序。str2poscar -r < POSCAR > str.out 可以反向转换,但旧式 POSCAR 没有元素名,反向结果的物种标签需要核对。
cellcvrt -c 输出笛卡尔坐标;-f 把晶胞用作分数坐标基底;-ss=2 按参考轴方向生成超胞。对于非正交原胞,不要想当然地把 -ss=2 理解为“恰好 8 倍的原胞”——先检查原子数和晶胞矢量,再决定是否使用 -uss=文件 给定超胞。
4. 完整算例一:FCC Cu–Au 的 SQS
4.1 第一步:设置目标组分
在空目录保存第 3 章的 FCC 几何,最后一行使用 Cu=0.5,Au=0.5,文件名为 rndstr.in。
4.2 第二步:确定要匹配的团簇
mcsqs -2=5.5 -3=3.0
-2 是二体团簇的最大跨度,-3 是三体团簇的最大跨度;单位随输入的长度单位。本文轴长使用 Å,所以这里也是 Å。三体截断约束三角形中最长的一条边,不是限制三角形边长之和。这个输入得到四类二体团簇和一类三体团簇。
clusters.out 保存具体团簇;用 getclus 查看摘要。截断距离要覆盖你关心的近邻相互作用,不必第一次就把很远的四体、五体团簇全部加入。
4.3 第三步:寻找结构
在计算作业内运行:
mcsqs -n=32 -ms=250000 -sd=2410
程序在达到匹配要求或步数上限后结束。长时间搜索时可以在该算例目录创建 stopsqs 请求正常停止;结束前不要删除输出。多个独立进程用不同的 -ip 编号和 -sd 随机种子,最后执行 mcsqs -best 选取最好的一组结果。现行多进程模板已处理这一步。
这里的 -T 是搜索算法的温度参数,不是材料在多少 K 下的结构;它与 emc2 的物理温度不同。
4.4 第四步:判断结果,而不是只看程序退出
| 文件 | 怎么读 |
|---|---|
bestsqs.out |
当前找到的最佳结构,可转换为 POSCAR/CIF |
bestcorr.out |
团簇阶数、直径、SQS 关联、目标关联、两者差值 |
mcsqs.log |
目标函数的改善记录及匹配状态 |
rndstrgrp.out |
对称等价格点分组,检查子晶格占据设置 |
sqscell.out |
搜索使用的候选超胞,可用 -rc 指定重用 |
本例比较 16、32、64 原子,使用相同截断、随机种子和步数上限:
| 总原子数 | 组分 | 匹配团簇数 | 最大绝对误差 |
|---|---|---|---|
| 16 | Cu:Au = 1:1 | 5 | 0.000000 |
| 32 | Cu:Au = 1:1 | 5 | 0.000000 |
| 64 | Cu:Au = 1:1 | 5 | 0.000000 |
误差为零只说明所选团簇得到匹配,不表示无限距离、任意高阶团簇都完全随机。增大超胞会扩大搜索空间,有限搜索预算下并不保证一定比小超胞好。
4.5 第五步:检查更远程关联并交给后续计算
复制结果到独立检查目录,再执行更长截断的 corrdump;它可能重写 clusters.out,不要在仍运行的搜索目录里做这项检查。
corrdump -l=rndstr.in -ro -noe -2=8 -3=5.5 -s=bestsqs.out
corrdump -l=rndstr.in -ro -noe -2=8 -3=5.5 -s=bestsqs.out -rnd
第一条给出实际关联,第二条给出理想随机关联;对应相减得到图中的误差。随后回到结果目录转换结构:
str2poscar < bestsqs.out > POSCAR
str2cif < bestsqs.out > structure.cif
后续 DFT 通常还需要弛豫。SQS 的几何统计质量与 DFT 的电子/离子收敛是两个不同问题;得到 bestsqs.out 并不等于已经完成材料性质计算。
5. 完整算例二:三元合金与固定子晶格
5.1 BCC Nb–Mo–Ta,24 原子
2.9 2.9 2.9 90 90 90
-0.5 0.5 0.5
0.5 -0.5 0.5
0.5 0.5 -0.5
0 0 0 Nb=0.3333333333,Mo=0.3333333333,Ta=0.3333333334
mcsqs -2=4.2
mcsqs -n=24 -ms=250000 -sd=2410
小数末位略作补足,使概率和恰好为 1。这一例的目标是 8 Nb、8 Mo、8 Ta,关联函数有多个独立的物种分量,不能再用二元的一个“自旋乘积”概括所有列。
5.2 岩盐结构 (Ti,Zr)N,32 原子
4.5 4.5 4.5 90 90 90
0 0.5 0.5
0.5 0 0.5
0.5 0.5 0
0 0 0 Ti=0.5,Zr=0.5
0.5 0 0 N
mcsqs -2=4.6
mcsqs -n=32 -ms=250000 -sd=2410
32 是总原子数,包括 16 个 N;可替换金属格点只有 16 个,Ti、Zr 各 8 个。固定 N 不参与占据涨落,但影响晶体几何和对称性。
| 体系 | 实际原子数 | 团簇数 | 最大绝对误差 | RMS 误差 |
|---|---|---|---|---|
| bcc_ternary | Mo 8,Ta 8,Nb 8 | 9 | 0.020833 | 0.010123 |
| rocksalt32 | Zr 8,Ti 8,N 16 | 2 | 0.000000 | 0.000000 |
如果需要改变组分,先检查每个子晶格的可用格点数是否与概率相容,再重新生成团簇和结构。改变元素、晶格或子晶格定义后,不要沿用旧的 clusters.out。
6. 用 ATAT 调用 VASP:文件是如何传递的
6.1 准备计算参数
str.out 描述几何,vasp.wrap 描述电子结构计算设置。以下是静态能量输入的基本形式:
[INCAR]
ENCUT = 450
PREC = Accurate
EDIFF = 1e-7
ISMEAR = 1
SIGMA = 0.1
NSW = 0
IBRION = -1
KPPRA = 4000
USEPOT = PAWPBE
LREAL = .FALSE.
LASPH = .TRUE.
KPPRA 是与原子数结合用于生成 k 网格的目标,不是“每个方向有 4000 个点”。真正执行的网格必须查看生成的 KPOINTS。本文 Cu–Au 主数据集为了使不同超胞的倒空间密度接近,直接按倒格矢长度生成网格,其具体参数见下一章;上面模板用于说明接口格式,不能拿来声称与主数据集逐字相同。
USEPOT=PAWPBE 选择个人配置中的 PBE PAW 路径。不要将不同赝势、泛函、磁性、ENCUT 或不同能量定义混到同一个训练集。
6.2 先生成文件,再计算
runstruct_vasp -nr
检查 INCAR、POSCAR、KPOINTS 和 POTCAR 元素顺序。确认参数后,在作业中执行:
runstruct_vasp
如果已有完整 VASP 输出,只想提取 ATAT 文件:
runstruct_vasp -ex
主要结果是 energy、str_relax.out、force.out、stress.out、dos.out。提取受力时必须保持原子顺序与 str_relax.out 一致。
6.3 能量约定尤其重要
当前 extract_vasp 将最后一步 OSZICAR 的 F 值写入 energy,也就是整个计算晶胞的能量数值;不会自动改用 E0。maps 再按照可替换格点数处理拟合中的归一化。普通全占据二元母晶格中,每个格点就是一个原子;有固定子晶格或空位时,必须重新确认“每格点”和“每原子”的区别。
因此:不要先把 energy 除以原子数再交给默认的 maps。 mmaps -pa、clusterexpand -pa 等用于已经归一化的输入,但它们并不是所有 ATAT 程序都通用的选项。
对金属,展宽影响能量和受力;ISMEAR=1、SIGMA=0.1 是本文 Cu–Au 的固定设置,不代表任意材料都适用。高精度形成能应进一步检查展宽、k 网格和静态积分方案。使用 DOSTATIC 会额外执行静态步骤,参数变化及 .static 输出应与训练集的能量约定保持一致。相关物理背景见 VASP 的展宽说明。
7. 完整算例三:29 个 Cu–Au 结构的 DFT 能量与簇展开
7.1 先生成结构
本例采用 FCC 母晶格,固定晶格常数 3.85 Å,枚举至 4 原子原胞:
genstr -n=4 > genstr.out
不同结构以独立的 end 行分隔。配套脚本将它们拆成编号目录,每个目录保存一个 str.out。这一范围共得到 29 个对称不等价结构。
7.2 计算每个结构的能量
| 参数 | 主数据集 | 对照计算 |
|---|---|---|
| 软件、泛函 | VASP 6.4.2、PBE PAW | 相同 |
| ENCUT | 450 eV | 550 eV |
| k 网格规则 | 各倒格矢方向间距不大于 0.25 Å⁻¹ | 不大于 0.20 Å⁻¹ |
| SCF | EDIFF=1e-7、NELM=120 |
相同 |
| 展宽 | ISMEAR=1、SIGMA=0.1 eV |
相同 |
| 自旋、结构 | 非自旋极化;固定原子位置及晶胞 | 相同 |
| 其他 | LREAL=.FALSE.、LASPH=.TRUE. |
相同 |
这是一组固定 FCC 晶格的教学数据,用于完整走通训练和分析过程。纯 Cu、纯 Au 参考也在相同晶格常数下计算;它不是充分弛豫的 Cu–Au 基态相图,不能把其中的相稳定性直接等同于实验。
全部 29 个结构完成电子收敛后,按以下式子计算每原子的形成能:
ΔE = Ecell / N − (1 − cAu) ECu − cAu EAu
这里两种纯元素的参考能也是每原子能量。固定格点的氮化物等体系不能直接照搬这条二元全占据公式。
纯 Cu 参考为 -3.5941924 eV/atom,纯 Au 为 -2.6522221 eV/atom。以下列出全部 29 个结构;完整输入、晶胞总能和 k 网格见算例包与 data/cuau_dft.csv。
| 结构编号 | 原子数 | Au 分数 | 总能 / eV·atom⁻¹ | 形成能 / meV·atom⁻¹ |
|---|---|---|---|---|
| 0 | 1 | 0.0000 | -3.5941924 | 0.000 |
| 1 | 1 | 1.0000 | -2.6522221 | 0.000 |
| 2 | 2 | 0.5000 | -3.4081158 | -284.909 |
| 3 | 2 | 0.5000 | -3.4939959 | -370.789 |
| 4 | 3 | 0.3333 | -3.4696467 | -189.444 |
| 5 | 3 | 0.6667 | -3.1642891 | -198.077 |
| 6 | 3 | 0.3333 | -3.5851530 | -304.951 |
| 7 | 3 | 0.6667 | -3.2725757 | -306.364 |
| 8 | 3 | 0.3333 | -3.5329657 | -252.763 |
| 9 | 3 | 0.6667 | -3.2247177 | -258.505 |
| 10 | 4 | 0.2500 | -3.5056958 | -146.996 |
| 11 | 4 | 0.5000 | -3.2768442 | -153.637 |
| 12 | 4 | 0.7500 | -3.0430870 | -155.372 |
| 13 | 4 | 0.2500 | -3.5879675 | -229.268 |
| 14 | 4 | 0.5000 | -3.4454390 | -322.232 |
| 15 | 4 | 0.7500 | -3.1226112 | -234.897 |
| 16 | 4 | 0.2500 | -3.5872062 | -228.506 |
| 17 | 4 | 0.7500 | -3.1247288 | -237.014 |
| 18 | 4 | 0.2500 | -3.6289195 | -270.220 |
| 19 | 4 | 0.5000 | -3.4847748 | -361.568 |
| 20 | 4 | 0.7500 | -3.1702820 | -282.567 |
| 21 | 4 | 0.2500 | -3.5819815 | -223.282 |
| 22 | 4 | 0.5000 | -3.3943340 | -271.127 |
| 23 | 4 | 0.7500 | -3.1193702 | -231.656 |
| 24 | 4 | 0.2500 | -3.5462233 | -187.523 |
| 25 | 4 | 0.5000 | -3.3125925 | -189.385 |
| 26 | 4 | 0.7500 | -3.0777845 | -190.070 |
| 27 | 4 | 0.2500 | -3.6302830 | -271.583 |
| 28 | 4 | 0.7500 | -3.1797142 | -292.000 |
图中的连线是本次已计算结构的下凸包,不意味着已经穷尽所有更大周期结构、其他晶格或磁态。
7.3 建立簇展开
把 lat.in 与各编号目录的 str.out、energy 放在同一项目树中。本文对已有 29 个能量使用:
maps -d -t=1 -g=4 -mv=4
-t=1 每秒检查一次输入变化;-g=4 将基态搜索延伸到指定规模;-mv=4 限制新结构的体积范围。程序会持续等待新的结构或能量,看到拟合结果后,在同一目录创建 stop 正常结束。
如果从零开始让 ATAT 持续选择结构,则使用自动工作流:先启动 maps,由 pollmach 请求并派发结构,再由 runstruct_vasp 写回能量。现行 sub_maps_vasp.sh 将它们放在同一个 Slurm 分配内。关系如下:
有空闲计算资源
↓ 创建 ready
maps 产生 编号/str.out 和 编号/wait
↓ pollmach 领取结构
VASP 计算 → extract_vasp → 编号/energy
↓
maps 更新拟合、交叉验证和基态预测
wait 表示结构等待计算,busy 表示处理中,energy 是成功得到的输入数值,error 用于暂时排除不适合参与拟合的结构。正常结束自动流程需要等待当前 VASP 计算完成,再创建 stop 和 stoppoll。重新开始前先确认旧进程已经退出,再清除自己这次计算留下的停止标记。
7.4 怎样判断拟合是否有用
| 文件 | 应关注的内容 |
|---|---|
maps.log |
交叉验证分数、已知结构基态是否一致、搜索范围 |
fit.out |
每个结构的真实形成能、拟合形成能、误差与标识 |
predstr.out |
待计算结构的预测;不应当作 DFT 真值 |
clusters.out + eci.out |
团簇和有效相互作用,必须成套保存 |
gs_str.out |
当前拟合识别的基态结构 |
ref_energy.out |
形成能所用参考 |
| 指标 | 本次结果 |
|---|---|
| 训练结构 | 29 |
| ECI 数量 | 13 |
| 训练 RMSE | 3.479 meV/atom |
| 交叉验证 CV | 5.440 meV/atom |
| 训练集最大绝对误差 | 10.423 meV/atom |
训练集误差小,不代表未知结构误差也小。交叉验证用于检查泛化能力;涉及多个接近的候选基态时,还要单独补算候选结构。不要把某个固定的“CV 小于多少”当作所有体系的统一合格线,精度应与目标相之间的能量差相比。
eci.out 的系数通常不包含团簇重数;重构能量时需要乘相应重数。clusterexpand 同时输出 .eci 和 .ecimult,后者已经乘过重数,不要再乘一次。
clusterpredict energy 会写出名为 energy 的预测结果,并可能覆盖同名的已算能量。预测新结构时建立独立目录,只放入对应的 str.out;保留原来的 DFT 训练目录。配套脚本在 prediction-example/ 中演示这一步。
7.5 对照更高精度参数
| 结构 | 主网格 → 对照网格 | 主形成能 | 对照形成能 | 差值 |
|---|---|---|---|---|
| 0 | 12×12×12 → 15×15×15 | 0.000 | 0.000 | 0.000 |
| 1 | 12×12×12 → 15×15×15 | 0.000 | 0.000 | 0.000 |
| 2 | 11×11×11 → 14×14×14 | -284.909 | -269.040 | 15.868 |
后三列单位均为 meV/atom。结构 2 的形成能改变约 15.87 meV/atom,提示在定量使用前仍应继续做精度收敛。
这次对照同时改变了两类参数,只能说明这一组联合变化的影响,不能分别归因于 ENCUT 或 k 网格。它也没有覆盖展宽、结构弛豫、赝势选择及所有 29 个结构,因此保留上述教学适用范围。
8. 完整算例四:二元蒙特卡洛与两相边界
本章使用 ATAT 随软件提供的 examples/mc 中四个输入文件:lat.in、clusters.out、eci.out、gs_str.out。这是给定哈密顿量的计算,不是第 7 章刚拟合的 Cu–Au DFT 模型。虽然文件使用 Cu/Au 标签,不能将所得温度直接当作 Cu–Au 实验转变温度。
8.1 恒定组分的温度扫描
在独立目录运行:
emc2 -cm -x=-0.5 -gs=1 -mu0=0 -keV \
-T0=100 -T1=1400 -dT=100 \
-er=12 -eq=300 -n=2000 -sd=2101 \
-tstat=0 -g2c -o=mc.out
这是一条较长的科学计算设置,配套算例已保存为短脚本,无需每次手工输入。参数含义如下:
| 参数 | 本例的含义 |
|---|---|
-cm |
固定组分的正则模式 |
-x=-0.5 |
平均自旋,换成第二种物种的摩尔分数为 0.25 |
-gs=1 |
使用 gs_str.out 中从 0 编号的第 1 号相作初态 |
-keV |
能量为 eV、温度为 K;内部采用约 8.617×10⁻⁵ eV/K |
-er=12 |
用能容纳给定半径球的条件决定蒙特卡洛超胞 |
-eq=300、-n=2000 |
平衡和统计的 Monte Carlo passes,不是物理时间步 |
-tstat=0 |
本次连续扫描不在检测到突变时自动截断 |
-g2c |
输出中相应能量列转为正则量 |
本例对 -er=8 与 -er=12 分别使用三个独立种子;较大超胞同时增加采样长度。因此图中比较的是两套计算设置,不能把差别只归因于尺寸。
本次 er=8 对应 512 格点,er=12 对应 1728 格点。下表列出后一组的均值与三个种子间的样本标准差:
| 温度 / K | 能量均值 / meV·site⁻¹ | 标准差 / meV·site⁻¹ | 最近邻关联 |
|---|---|---|---|
| 100 | -11.63100 | 0.00000 | 0.000000 |
| 200 | -11.62200 | 0.01559 | 0.000079 |
| 300 | -11.21800 | 0.02066 | 0.003697 |
| 400 | -8.66000 | 0.06110 | 0.026700 |
| 500 | 3.66833 | 0.03037 | 0.146314 |
| 600 | 5.97133 | 0.01290 | 0.163356 |
| 700 | 7.30033 | 0.02312 | 0.173353 |
| 800 | 8.20600 | 0.01572 | 0.180428 |
| 900 | 8.95533 | 0.02285 | 0.186540 |
| 1000 | 9.55100 | 0.00608 | 0.191529 |
| 1100 | 10.05100 | 0.01153 | 0.195786 |
| 1200 | 10.48600 | 0.01212 | 0.199431 |
| 1300 | 10.85467 | 0.01106 | 0.202589 |
| 1400 | 11.15800 | 0.00781 | 0.205218 |
误差棒是三个独立结果之间的标准差,用于展示这组重复计算的离散程度,不是已经完成临界区有限尺寸标度分析的误差界。
8.2 mc.out 的列不能猜
标准 emc2 输出中,前几列依次是温度、化学势、E−μx、平均自旋 x、F−μx、能量涨落、浓度涨落。使用 -g2c 后,相应列补回 μx。第 17 列是相对于初始有序相的长程有序量;不同组分、初态和程序定义下不能想当然地要求其无序极限一定为零。第 18 列以后为团簇关联。
尤其注意:二元 emc2/phb 的浓度坐标在 [-1,1],换算成第二物种摩尔分数用 c=(x+1)/2。第一列温度只有在设置了正确 Boltzmann 常数后才是 K。
8.3 跟踪两个相的共存边界
phb -gs1=0 -gs2=1 -dT=25 -er=8 \
-dx=0.02 -dmu=0.002 -ltep=0.001 \
-keV -sd=2410 -o=phb.out
这组参数用于展示工作流,组分精度设置较宽。phb 会自适应采样,并可能在低温使用低温展开。输出依次为 T、μ、两相的自旋浓度以及两相的 E−μx;画相图前对两列浓度都做上述换算。
| 项目 | 本次结果 |
|---|---|
| 输出温度点 | 19 |
| 温度范围 | 0—450 K |
| 450 K 相 0 浓度 | 0.221713 |
| 450 K 相 1 浓度 | 0.229459 |
| 450 K 化学势 | -0.0664873 eV / 自旋坐标 |
曲线终点表示本次设置下追踪结束,不足以单独确定热力学极限的临界温度。正式研究需要更小温度步长、更严格统计精度、更大超胞,并检查其他可能相及滞后。
9. 完整算例五:三元 mmaps 和 memc2
三元例采用固定 FCC 晶格常数 3.9 Å,物种为 Cu、Au、Al,使用 ASE EMT 势计算小晶胞结构的静态能量。它用于演示多元输入和数据组织,不作为该三元系的定量相图模型。
首先把 lat.in 的物种行写成 Cu,Au,Al,然后枚举和计算结构能量。拟合使用 mmaps,不能用仅支持二元的 maps 替代。多元基函数、组分坐标、化学势维数都会随物种数量变化。
| 项目 | 本次结果 |
|---|---|
| EMT 结构数 | 30 |
| CV | 6.477 meV/atom |
| 程序物种顺序 | Al、Au、Cu |
| 1500 K 的平均组分 | Al = 0.078648;Au = 0.466139;Cu = 0.455213 |
本例 control.in 为:
300 0 0 0
1500 0 0 0 7
第一行给初始温度和各物种化学势;后续行规定扫描方向及采样数量。本例使用 -il 包含终点,得到 300、500、…、1500 K 共七点。
memc2 -gs=-1 -er=6 -eq=100 -n=500 -keV \
-il -sd=2410 -tstat=0 -o=mc.out
物种顺序以 atoms.out 和程序输出为准,不凭 lat.in 中的书写顺序猜测。读取结果先打开 mcheader.out,它逐列标明本次输出的含义;不要套用二元 emc2 的固定列号。-gs=-1 是随机初态,不表示整个过程中组分固定。三个化学势都为零也不意味着三种元素各占 1/3;不同物种的相对能量仍会影响平衡组分。
需要守恒组分约束时,研究 conccons.in 和对应的初始构型设置;任意小数拼出的不相容约束可能使交换操作无法完成。
10. 完整算例六:Al 声子与振动自由能
这一章实际使用 ASE EMT 势提供静态能量和受力,所有图均标注 EMT。EMT 结果适合学习 ATAT 的文件连接和计算流程,不能冒充 PBE 声子或实验频率。ASE 的 EMT 实现与适用元素说明提供了方法来源。
10.1 先得到参考结构
对 FCC Al 的晶格常数作一维能量最小化,得到本例平衡值 3.9942742 Å。str.out 是理想结构,str_relax.out 是平衡参考结构;此时两者相同。
10.2 生成有限位移
fitfc -er=9 -ns=1 -dr=0.01 -nrr
-er=9 是位移原子及周期像之间的最小间距要求,与 emc2 中球半径的定义不同。-ns=1 选单体积谐近似;-dr=0.01 为位移幅度,单位 Å;-nrr 跳过每个体积点重新弛豫的步骤,适用于本例的立方晶体单体积流程。
生成 vol_0 及其位移子目录后,对每个 str.out 计算受力。在配套 EMT 算例中使用 common/calculate_emt.py,运行脚本已连接好这个接口;替换为 VASP 时,应采用不进行离子弛豫的静态受力计算。如果把位移又弛豫回去,就丢失了拟合需要的恢复力。
10.3 拟合力常数
fitfc -f -fr=4.1 -T1=1000 -dT=100 -kp=4000 -me0
-fr=4.1 是拟合力常数的作用范围;它应与超胞大小相容,本例小于 -er/2。正式计算需要分别检查超胞、位移幅度、力常数范围和倒空间积分网格。
-me0 防止在与静态能量组合时重复计入静态贡献;具体输出约定还要结合 -ns 和是否启用准谐近似。输出默认按输入参考晶胞计量;使用 -pa 可改为每原子,但不要在下游再次除原子数。
10.4 计算声子色散
kpath.in 的每一行给出采样数量和路径两端:
31 0 0 0 0 1 0
31 0 1 0 0.5 1 0
31 0.5 1 0 0.5 0.5 0.5
31 0.5 0.5 0.5 0 0 0
fitfc -f -fr=4.1 -df=kpath.in -me0
这里的点相对于 str.out 参考轴所定义的倒空间坐标,路径为 Γ–X–W–L–Γ。eigenfreq.out 的频率默认为 Hz,除以 10¹² 后才是 THz。
出现负频率时先检查几何、受力精度、拟合矩阵与超胞,再分析物理不稳定性。-fn 允许输出含不稳定模的数据,不能据此把不稳定体系改称为稳定,也不意味着可以直接对负频率套用普通谐自由能公式。
10.5 fitsvsl 与 svsl 的另一条路线
fitsvsl 在多个键长下拟合伸缩和弯曲刚度,写出 slspring.out;svsl 用这些关系预测结构的声子性质。本例使用三个体积样本、最大线性应变 2%、位移 0.01 Å:
fitsvsl -er=9 -ns=3 -ms=0.02 -dr=0.01
完成生成目录中的受力计算后:
fitsvsl -f -op=1 -ncs
本例三个键长样本对应的四列拟合矩阵已检查为满秩,使用 -ncs 保留线性项,避免默认筛选在小应变区间把斜率列视为近似共线。-ncs 会关闭自动奇异性处理,只适用于已经确认数据足以约束模型的情况;不要用它掩盖缺失受力或真正的欠定拟合。
进入目标结构目录,再运行:
svsl -ns=1 -T1=1000 -dT=100 -kp=4000
| 温度 / K | fitfc / eV·atom⁻¹ | svsl / eV·atom⁻¹ |
|---|---|---|
| 300 | -0.0119114 | -0.0112127 |
| 1000 | -0.359252 | -0.356946 |
所画路径的最高频率为 8.54047 THz;Γ 点的数值残差约为 10⁻²⁴ THz,可视为数值零。
这两条曲线采用不同的力常数参数化,出现差异是需要分析的模型差别。不能把它们的重合程度视为 VASP 与势函数之间的准确性比较,因为本例两条路线的受力都来自 EMT。
11. 完整算例七:电子自由能与温度相关 ECI
VASP 输出经 extract_vasp 转成 dos.out。文件开头是电子数、能量分箱宽度和缩放因子,之后是各能量格子的态密度;它不是原始 VASP DOSCAR,不能直接把 DOSCAR 改名使用。
felec -T1=1000 -dT=100
得到 felec、felec.log、plotdos.out。本章对 Cu–Au 数据中的实际 VASP DOS,以及 Al 体积扫描中的 VASP DOS 进行了处理。
这些 DOS 来自教学网格和有限分箱,低温细节尤其需要更密 k 点及足够能带检查。felec 采用温度不改变能带的近似,不能描述所有电子结构随温度变化的效应。
要把这一项接入已有簇展开,在总目录统一温度网格:
1000 11
保存为 Trange.in,表示 0—1000 K 共 11 个温度。分别在结构目录运行 felec,随后在总目录:
clusterexpand felec
mkteci felec.eci
前者以已有团簇集合拟合各温度下的电子自由能,后者把它与 eci.out 中的静态项组合成 teci.out。多个来源可以一起组合,例如 mkteci fvib.eci felec.eci,前提是团簇顺序、温度网格、单位与归一化全部一致。
teci.out 存在时,蒙特卡洛优先使用它。 比较“只含构型”和“加入非构型自由能”的结果时使用两个独立目录,避免忘记已有 teci.out 而算错模型。本文提供电子项组合的实际输出,不将其直接推广为已经收敛的完整相图。
12. 完整算例八:Al 体积扫描和体模量
本例是实际 VASP/PBE 计算,FCC Al 初始晶格常数 4.05 Å,使用 ENCUT 450 eV、KPPRA 4000、EDIFF=1e-8、ISMEAR=1、SIGMA=0.1,对五个线性应变计算静态能量。
calcbulk -0.02 0.02 0.01 runstruct_vasp
前三个参数依次为最小线性应变、最大线性应变和步长;后面的命令负责每个结构的能量。计算量并非“一条命令只执行一次 VASP”,本例会建立五个应变目录。
| 线性应变 | 体积 / ų·atom⁻¹ | 能量 / eV·atom⁻¹ |
|---|---|---|
| -0.02 | 15.63087555 | -3.7395880 |
| -0.01 | 16.11436742 | -3.7494319 |
| +0.00 | 16.60748204 | -3.7512525 |
| +0.01 | 17.11075605 | -3.7458654 |
| +0.02 | 17.62404502 | -3.7340911 |
拟合体模量 77.72 GPa;平衡线性应变 -0.00202045,对应晶格常数 4.0418172 Å。
bulkmod 的默认单位是 eV/ų,乘 160.21766208 转成 GPa。strain.out 是拟合得到的平衡线性应变,str_relax.out 给出对应几何。
calcbulk 使用应变多项式拟合;本例报告的是这套计算和拟合的结果,不应写成某种特定 Birch–Murnaghan 方程的结果。用于材料定量研究时还应检验应变范围、采样点数、k 点和截断能。
13. 完整算例九:相干应变能、APB 和缺陷
13.1 csfit:尺寸失配导致的相干应变
先准备二元 lat.in、两种纯元素的已弛豫参考结构,以及 dir.in。本例用 EMT 分别优化 Cu 和 Au 的 FCC 晶格,在 [100]、[110]、[111] 三个方向生成应变结构并计算静态能量:
csfit -np=5 -nl=5 -ml=0.15 -nc=21 -t=1
-np 控制垂直于指定方向的应变样本,-nl 控制沿该方向的样本,-ml 设置后者的范围。计算会等待生成目录中的能量;填齐后拟合 cs.in,cs.log 给出各组分、各方向的相干应变能。
cs.in 可通过 maps -p=cs、emc2 -ks=cs 等进入相应模型。本例只展示应变项本身;没有把它重复加到已经包含同类应变贡献的数据中。改变 -np/-nl/-ml 时使用新目录,避免不同应变网格的编号目录混在一起。
gencs 用于对称性允许的广义应变谐函数,和 csfit 的二元立方相干应变拟合不是同一个命令;其输出 harm.out 适用于更进一步的模型开发。
13.2 apb:反相畴界
本例在上游给定二元哈密顿量下,从 L1₂ 常规胞出发,采用滑移 (0.5,0.5,0):
apb -sx=0.5 -sy=0.5
程序生成 str_apb.out 并用已有 ECI 计算能量差。单元的前两条晶胞矢量定义界面;晶胞取向与滑移定义要在使用前核对。
| 项目 | 给定模型的结果 |
|---|---|
| 初始能量 | -0.011631 eV/atom |
| APB 结构能量 | 0.000182 eV/atom |
| 反相畴界能 | 52.428 mJ/m² |
这项 APB 能来自给定的簇展开模型,不能称为本次直接 VASP 界面计算。apb -f 只生成结构,适合再用所选电子结构软件进行独立计算。
13.3 pdef、icamag、gce 和 cvmclus
配套小算例还包含:用 pdef 生成 FCC Cu 的空位结构;用 icamag 枚举两个 Fe 格点的离散磁态;用 gce 生成二阶对称张量的簇基;用 cvmclus 生成 FCC 四面体近似所需的 CVM 系数。
这些程序解决的是构型或模型系数生成,并不会单独给出缺陷形成能、真实磁转变温度、弹性常数或最小化后的 CVM 相图。继续研究时应给生成构型提供相应能量/张量,并完成后续拟合或热力学求解。
14. 完整算例十:从 SQS 数据生成 CALPHAD 文件
sqs2tdb 提供 SQS 数据到 CALPHAD 参数文件的连接。本例使用 Cu/Au、FCC_A1 数据库中的端元和中间组分结构,用 EMT 计算实际静态能量,再拟合一个简单的组分模型。
14.1 复制结构
sqs2tdb -cp -l=FCC_A1 -lv=1
第一次会建立 FCC_A1/species.in 供检查;确认子晶格物种后,再次执行同一条命令才完成结构复制。顶层 species.in 写 Cu,Au;内层文件含子晶格标识,不能把二者混用。
14.2 计算结构能量,再选择拟合项
进入 FCC_A1,先为生成结构计算能量,再执行:
sqs2tdb -fit
首次会提示编辑 terms.in。本例内容为:
1,0
2,0
它选择线性项和最低阶二元相互作用项。然后重新执行 sqs2tdb -fit。
14.3 导出 TDB
回到顶层:
sqs2tdb -tdb -oc
配套文件保留实际生成的 TDB 和拟合数据。本例只有所选 FCC 结构的静态 EMT 数据;它没有覆盖所有竞争相、熔化、完整声子/电子项及实验优化。因此应把它用于学习文件连接和语法,不能直接作为客户材料的工程热力学数据库。
ocplotpd 是调用 OpenCalphad 的绘图驱动,ATAT 模块本身不等于 OpenCalphad 已就绪。mkaxes、simplexize、triph 和 3d2gnu 负责坐标轴、网格与绘图数据转换。它们能够画数据,但不能代替相平衡求解器生成物理结果。
15. 常用辅助操作
| 情况 | 适合的命令与注意事项 |
|---|---|
| 检查结构有无过近原子 | mindist -r=阈值 -s=str.out;看退出状态,0 表示满足最小距离条件 |
| 检查弛豫是否改变晶格类型 | checkrelax -1;该指标排除了整体旋转和各向同性缩放,不能替代原子映射检查 |
| 查询近邻和键类型 | nnshell -l=lat.in、nnshell -lb -l=str.out |
| 按数据做线性/多项式拟合 | lsfit;可输出交叉验证、预测和误差 |
| 批量执行目录内命令 | foreachfile;先用 pwd 检查范围,再执行计算或文件修改 |
| 提取文本数字或区间 | getvalue、getlines |
| 处理一行多个数、逐行数 | blanktonl、nltoblank |
| 修正 Windows 换行 | fixeol -u 文件;保留生成的备份,核对后再使用 |
| 查看簇展开结果图 | mapsrep / mmapsrep;需要 gnuplot,远程无图形环境可使用文件输出或随包的重绘脚本 |
| 清理 VASP 大文件 | cleanvasp;会删除 POTCAR、INCAR、POSCAR、KPOINTS 等,请先保存可重现输入 |
cleanvasp 不是用于了解参数的命令,不要尝试通过 cleanvasp -h 查看帮助;当前脚本仍会执行删除。splitjob 和 dispatch 接收命令列表文件,也没有与大多数 ATAT 主程序相同的 -h 行为。完整调用约定见下一份命令参考。
16. 出现问题时按这条顺序检查
| 现象 | 建议处理 |
|---|---|
| SQS 一直搜索,没有 Perfect_match | 检查组分整数性、团簇数量和截断;增加独立种子;必要时增大超胞;先读关联误差再决定是否结束 |
| 程序开始后马上退出 | 检查目录里的 stop/stopsqs/stoppoll 及输入文件名;确认不是把参考结果目录当成新工作目录 |
maps 长时间没有新增结构 |
检查是否有人创建 ready、是否存在 wait/busy、计算资源是否已分配、pollmach 是否还在运行 |
已有 energy 但拟合不合理 |
检查单位、晶胞总能/每原子能、元素参考、磁态、弛豫及不同版本参数是否一致 |
runstruct_vasp 找不到 wrap 或个人配置 |
在结构目录执行;默认向上查找 vasp.wrap;用 yskit 初始化并核对现有配置中的路径 |
| VASP 运行结束却没有可用能量 | 检查 OUTCAR/OSZICAR、电子和离子收敛、输出是否完整;退出状态或存在某个文件不能替代数值检查 |
| MC 浓度看上去出现负数 | 二元输出可能是平均自旋,按 (x+1)/2 换算;多元则读 mcheader.out |
| 改了 eci.out 结果却不变 | 检查是否存在优先生效的 teci.out,以及是否在正确目录运行 |
| 声子出现负频或拟合矩阵异常 | 检查位移是否被弛豫、力与原子排序、超胞和作用范围;再判断真实不稳定性 |
| 改动晶格后旧模型无法使用 | 新建目录重新生成对称性、团簇和关联;不要把不同晶格的 ECI/团簇文件拼接 |
| 图形程序无法弹窗 | 使用 PNG/SVG 文件输出,下载后查看;计算程序本身通常不依赖桌面环境 |
17. 将这套流程用于自己的材料
- 先确定母晶格、可替换格点、固定子晶格、组分及可能磁态。
- 用一个小结构核对几何与能量/受力接口,再进行大规模自动计算。
- 固定并记录 DFT 或势函数方法,收敛参数应针对自己的精度目标检查。
- SQS 检查近程与更远程关联;簇展开同时检查交叉验证、基态和未参与拟合的结构。
- 蒙特卡洛检查尺寸、统计长度、随机种子、温度和化学势步长;转变附近单独加密。
- 声子、电子自由能和相干应变项逐项接入,检查单位、归一化及是否重复计数。
- 保存输入、实际执行脚本、软件版本、原始数据和绘图脚本。图片是结果的展示,数据和计算方法才是可重现的基础。
配套的 plot_figures.py 可从 reference/ 重绘全部科学图件。在包含 ASE、NumPy 和 Matplotlib 的环境中运行 python plot_figures.py,输出到 replotted/。需要可用的中文字体;脚本支持通过 ATAT_TUTORIAL_FONT 指定字体文件。
18. 参考来源与引用
命令格式以本集群 ATAT 3.52 的运行帮助、随包说明和脚本实际行为为准;本文是独立编写的操作教程。上游网页手册的版本可能与模块不同,遇到差异优先核对当前版本的参数清单。
- ATAT 作者主页与官方手册。
- A. van de Walle、M. Asta、G. Ceder,ATAT 用户指南,Calphad 26, 539 (2002)。
- A. van de Walle,多组分、多子晶格与非构型熵扩展,Calphad 33, 266 (2009)。
- A. van de Walle 等,mcsqs 方法,Calphad 42, 13–18 (2013)。
- A. van de Walle 等,SQS 到 CALPHAD 的工具,Calphad 58, 70 (2017)。
- R. Sun、A. van de Walle,APB 方法,Calphad 53, 20 (2016)。
- ASE EMT 源码与方法说明。
- VASP 展宽与能量说明。
发表使用 ATAT 的研究时,应引用所用模块对应的方法论文,而不只是引用本教程。上游软件与所附原始参数帮助的作者为 Axel van de Walle 及相应贡献者,软件许可见 ATAT 许可说明。算例包不包含 VASP 程序和 POTCAR。
ATAT 3.52 命令全参考
鸢算科技 · HPC 集群。配合 完整教程 使用。以下 78 个条目覆盖本集群模块的全部命令入口。
每条的“调用格式”用于说明参数位置;材料相关命令需先准备相应输入。具体有数据的完整算例见教程与算例包,不把只有接口说明的高级程序写成已完成材料计算。
参数表是已安装 3.52 程序输出的原始选项清单,保留英文和默认值以便精确核对。[int] 为整数、[real] 为实数、[string] 为文件名/文本;布尔开关通常出现即启用。不同程序的同名选项可能含义不同。
结构、晶格与对称性
makelat
按元素和已有晶格原型创建母晶格目录。
输入与结果: 元素列表、晶格名称;读取随包晶格与原子半径 → 体系_晶格/lat.in。
调用格式:
makelat Cu,Au fcc,bcc
冒号分隔不同子晶格,例如 Ca,Mg:O。默认尺寸来自原子半径,只是初始几何;实际缩放参数写作 -s 数值,当前脚本并不按帮助中的 -s=数值 解析。-o 输出到标准输出。
展开本命令的完整参数表
MAKE LATtice, by Axel van de Walle
Utility setting up directories with maps input files for a given alloy system
and for one or multiple lattices.
Syntax: makelat [-o] [-s=scale] atom1,atom2,... lattice1,lattice2,...
Make sure that there are commas but no spaces between atoms and similarly between the lattices.
Examples:
makelat Al,Ni bcc,fcc
makelat Ca,Mg:O rocksalt
(note the : to separate sublattices)
The default scale is 1. It can be changed to allow for units other than angstroms.
The -o option outputs to strout.
Lattices available:
B2 bcc bcc-oct bcc-tet diamond fcc fcc-oct fcc-octtet fcc-tet hcp hcp-oct hcp-tet L11 rocksalt sc wurtzite zincblende
Other lattices can be added in the /public/software/atat/3.52/gcc-13.3/8173m/share/atat/data/ directory or
new atomic radius can be added in the /public/software/atat/3.52/gcc-13.3/8173m/share/atat/data/radii.in file.
genstr
枚举在给定母晶格上对称不等价的周期结构。
输入与结果: lat.in → 标准输出中的多个结构,以 end 分隔。
调用格式:
genstr -n=4 > genstr.out
-n 是最大晶胞原子数;枚举空间随组分和规模迅速增长。固定物种的输入会转为超胞枚举。-2d 限制为 a、b 平面的超胞。它不会计算结构能量。
展开本命令的完整参数表
GENerate STRuctures 3.52, by Axel van de Walle
-n=[int] maximum nb of atom/unit cell (Default: 0)
-z=[real] Tolerance for finding symmetry operations (default: 1e-3)
-sig=[int] Number of significant digits to print in output files (Default: 6)
-2d Find supercells along a and b axes only (Default: Off)
-l=[string] Input file defining the lattice (default: lat.in)
cellcvrt
改变坐标表示、超胞、尺度、原点,或查询结构几何。
输入与结果: 标准输入中的 ATAT 结构 → 转换后的结构或所选统计量。
调用格式:
cellcvrt -c < str.out > cartesian.out
-c 笛卡尔;-f 分数;-abc 晶格常数表示;-ss/-uss 超胞;-sc 尺度;-wi 回卷;-pn 原子数;-pv 体积;-sym/-ppg/-pbv 对称信息。不要用 > 覆盖同一输入文件。
展开本命令的完整参数表
cellcvrt 3.52, by Axel van de Walle
Performs various conversions/changes on structure (or lattices).
Reads from stdin, writes to stdout.
-c Use cartesian coordinates (Default: Off)
-f Use fractional coordinates (Default: Off)
-cc Find conventional cell and use it as coordinate system (Default: Off)
-abc Use a b c alpha beta gamma format to specify axes (Default: Off)
-noabc Use cartesian format to specify the axes (the default) (Default: Off)
-ro Read fractional Occupation (Default: Off)
-u=[string] User-specified coordinate system input file (optional) (Default: )
-uss=[string] User-specified supercell (Default: )
-ss=[int] Simple supercell (multiple of axes in all directions) (Default: 0)
-fc Fix cell (to make it as symmetric as possible) (Default: Off)
-s Look for smaller unit cell (Default: Off)
-sh=[string] Shift all atoms (default 0,0,0).
-ja=[real] Jitter all atoms positions by a random amount less than specified (Default: 0)
-jc=[real] Jitter all cell parameters by a random amount less than the fraction specified (Default: 0)
-sd=[int] Seed for random number generation (default: use clock)
-sg=[string] Space group file (Default: )
-gsg Generate Space Group (Default: Off)
-wi Wrap all atoms inside unit cell (Default: Off)
-wiu Wrap all atoms inside unit cell and undo shift (Default: Off)
-rr Remove redundant atoms (Default: Off)
-rra Remove redundant atoms and average (Default: Off)
-ar Add redundant atoms (Default: Off)
-osf=[string] Original setting file (optional) (Default: )
-fsf=[string] Final setting file (optional) (Default: )
-r Print reciprocal unit cell (Default: Off)
-fs=[int] Index of first structure to process (default: 1)
-ns=[int] Number of structures to process (Default: 2147483647)
-slf=[string] Structure list file (Default: )
-pn Print the number of atoms in the structure only (Default: Off)
-pv Print volume of cell only (Default: Off)
-sym Print spacegroup (Default: Off)
-ppg Print point group name (Default: Off)
-pbv Print Bravais Lattice name (Default: Off)
-sc=[real] Scale factor (default: 1)
-sig=[int] Number of significant digits to print in output files (Default: 6)
-z=[real] Tolerance for checking overlap (Default 1e-3)
fixcell
把给定晶胞改写为更适合对称性识别的等价晶胞。
输入与结果: 标准输入中的晶胞几何 → 调整后的晶胞;-b 可查询 Bravais 类型。
调用格式:
fixcell -c < cell.in > cell.out
-c 表示输入输出只用三条笛卡尔晶胞矢量。它不是结构能量弛豫,也不直接替代对原子位置的同步变换。完整结构更适合 cellcvrt -fc。
展开本命令的完整参数表
fixcell 3.52, by Axel van de Walle
-d Use all default values (Default: Off)
-c read and print cell in cartesian only (no axes specified) (Default: Off)
-z=[real] Tolerance for finding symmetry operations (default: 1e-3)
-b print bravais lattice type only and conventional (potentially not primitive) cell (Default: Off)
-sig=[int] Number of significant digits to print in output files (Default: 6)
checkcell
比较两个晶胞的形变,辅助判断晶格映射是否仍合适。
输入与结果: 两套晶胞矩阵,前后共六行 → 形变度量或应变信息。
调用格式:
checkcell -p < two-cells.in
-q 简化输出,-p 输出应变。检查的是晶胞几何,不代表电子收敛、原子对应或动力学稳定性。
展开本命令的完整参数表
check cell distortion 3.52, by Axel van de Walle
-d default (Default: Off)
-q be quiet (Default: Off)
-p print strain (Default: Off)
checkrelax
比较结构弛豫前后的晶胞形变。
输入与结果: str.out 或 str_sup.out 与 str_relax.out → 形变指标;无参数可扫描下一层目录。
调用格式:
checkrelax -1
-1 是数字 1。指标忽略整体旋转与等比例伸缩;数值很大时应重新检查母晶格映射,不能仅凭一个阈值机械删除材料结构。
str2poscar
在 ATAT 结构和 VASP POSCAR 之间转换。
输入与结果: 标准输入 → 标准输出。
调用格式:
str2poscar < str.out > POSCAR
-r 反向;-old 输出无元素名的旧格式。正向会按元素分组并排序,POTCAR 必须跟随输出元素顺序。反向读取旧式 POSCAR 后要补回真实元素标签。
str2cif
输出可用于晶体查看器的 CIF。
输入与结果: ATAT 结构标准输入 → CIF 标准输出。
调用格式:
str2cif < bestsqs.out > structure.cif
适合检查超胞形状与原子占据;不要仅凭查看器的自动成键线判定真实键合。
str2xyz
把结构及其周期复制写成 XYZ。
输入与结果: 重复次数 na nb nc、可选缩放和 ATAT 文件 → XYZ。
调用格式:
str2xyz 1 1 1 str.out > structure.xyz
-v 会尝试调用 rasmol。XYZ 本身不完整保存一般周期晶胞信息,跨程序交换周期结构优先 POSCAR/CIF。
展开本命令的完整参数表
Utility to convert structure files into xyz files suitable for viewing with rasmol
Syntax: str2xyz [-v] na nb nc [scale] infile
-v (optional) calls rasmol (otherwise, xyz file is written to stdout
na nb nc define the number of periodic repetition to plot
scale (optional) scales the structure to adjust which bonds are plotted
nnshell
查找近邻壳层或列出可能的键类型。
输入与结果: lat.in 或 -l 指定结构 → 距离、相对位置、物种和配位信息。
调用格式:
nnshell -l=lat.in
-r 手动指定邻域半径;-lb 列键类型。可用于为 SQS 截断或力常数范围选择一个合理起点。
展开本命令的完整参数表
Nearest Neighbor Shell 3.52, by Axel van de Walle and Paul Dalach
-l=[string] Input file defining the lattice (default: lat.in)
-lb List bond types in given structures (Default: Off)
-sig=[int] Number of significant digits to print in output files (Default: 5)
-r=[real] Define a max radius for neighbor search (Default: 0)
-d Use all default values (Default: Off)
nntouch
按给定原子半径对几何作均匀缩放,使最近邻接触。
输入与结果: 晶格文件、元素半径文件 → 缩放后的晶格。
调用格式:
nntouch -l=lat.in -r=rad.in > scaled.in
-s 是额外的乘法比例。此方法只用于生成初始晶格,不等于平衡晶格常数优化。
展开本命令的完整参数表
nntouch 3.52, by Axel van de Walle
Scales a lattice so that nearest neighbor atom just touch.
-l=[string] Input file defining the lattice (default: lat.in) Use filename - to specify stdin
-r=[string] Input file defining the atomic radii (default: rad.in)
-s=[real] Multiplicative scaling factor (Default: 1)
-sig=[int] Number of significant digits to print in output files (Default: 6)
-d Use all default values (Default: Off)
mindist
检查结构中是否存在小于阈值的原子间距。
输入与结果: -s 指定结构、-r 指定最小距离 → 退出状态。
调用格式:
mindist -r=2.5 -s=str.out
满足最小距离条件返回 0;发现过近原子返回 1。空屏幕可能是正常的,不能把退出码 1 混同于程序崩溃。
展开本命令的完整参数表
Test if MINimum DISTance between two atoms is less than a given threshold, version 3.52, by Axel van de Walle
-s=[string] Input file defining the structure (Default: stdin)
-r=[real] Threshold radius (Default: 0)
-e Create error file atoms are too close (Default: Off)
-h Display more help (Default: Off)
kmesh
根据目标 k 点数和晶胞估算各方向网格。
输入与结果: 标准输入:目标点数,再接三条笛卡尔晶胞矢量 → 三个网格数。
调用格式:
kmesh -q -r < kmesh.in
-q 去提示;-r 向上取整;-e 使用偶数;-z1 让第三方向为 1。它接受的目标是整个网格点数,VASP 接口会先把 KPPRA 除以原子数。
展开本命令的完整参数表
-d Use all default options (Default: Off)
-q Quiet! (Default: Off)
-r Round output to next largest integer (Default: Off)
-z1 Force 1 k-point along 3rd axis (Default: Off)
-e Force nb of kpoints to be an even number (Default: Off)
wycked
根据空间群及 Wyckoff 位置生成可编辑的结构模板。
输入与结果: 空间群、位置字母 → 含 #const 的模板;sspp 处理后成为 ATAT 结构。
调用格式:
wycked 225 a > fcc.sspp
先填写 a、b、c、内部坐标和元素等自由参数,再运行 sspp。-r 依赖 GULP 并执行软球预弛豫;不能把 GULP 当作 ATAT 内置程序。
展开本命令的完整参数表
WYCKoff position EDitor, by Axel van de Walle
Syntax:
wycked spcgrp [-r] list_of_wyckoff_position_letter_without_seperators [species1:species2:...]
The output is meant to first be edited to set the free parameters a,b,c,alpha,beta,gamma,x,y,z,etc
in each of the lines starting with #const
and processed by sspp to create a valid ATAT structure file.
If the -r option is specified, then:
the structure is relaxed using a soft-sphere model (of radius 1.5 A) by invoking the GULP code
(multiple times (10) with randomized initial positions).
In that case, you can also specify a colon-separated list of species that will populate each wyckoff position.
Also, the structure will be isotropically re-scaled so that the nearest neighbor distance are consistent
with atom radii from the atat/data/radii.in file.
ACKNOWLEDGEMENTS
This code makes use of a Wyckoff position database downloaded from the Bilbao Crystallographic Server
at http://www.cryst.ehu.es/
Accordingly, if you use this code, you should cite, in addition to the usual ATAT citations,
the following papers:
M. I. Aroyo, J. M. Perez-Mato, D. Orobengoa, E. Tasci, G. de la Flor, A. Kirov
"Crystallography online: Bilbao Crystallographic Server"
Bulg. Chem. Commun. 43(2) 183-197 (2011).
M. I. Aroyo, J. M. Perez-Mato, C. Capillas, E. Kroumova, S. Ivantchev, G. Madariaga,
A. Kirov and H. Wondratschek,
"Bilbao Crystallographic Server I: Databases and crystallographic computing programs"
Z. Krist. 221, 1, 15-27 (2006). doi:10.1524/zkri.2006.221.1.15
M. I. Aroyo, A. Kirov, C. Capillas, J. M. Perez-Mato and H. Wondratschek
"Bilbao Crystallographic Server II: Representations of crystallographic point groups and
space groups", Acta Cryst. A62, 115-128 (2006). doi:10.1107/S0108767305040286
If you use the -r option, you should also acknowledge the GULP code:
"GULP - a computer program for the symmetry adapted simulation of solids", J.D. Gale, JCS Faraday Trans., 93, 629 (1997)
"The General Utility Lattice Program", J.D. Gale and A.L. Rohl, Mol. Simul., 29, 291-341 (2003)
"GULP: Capabilities and prospects", J.D. Gale, Z. Krist., 220, 552-554 (2005)
getproto
查询并输出晶体结构原型数据库中的条目。
输入与结果: 单独获得的 prototypes.in 与检索条件 → 原型信息或结构模板。
调用格式:
getproto -s -1 -w '^A3'
检索字符串支持正则表达式;-s 按对称性降序,-1 只取第一项,-w 只输出空间群与 Wyckoff 位置。需要相应原型数据库的访问资格;当前随包没有可直接使用的 prototypes.in。它不是下载任意数据库的命令。使用时按原型数据库和作者要求取得数据,不以空结果判断材料没有该结构。
sspp
处理带参数的结构文本,计算简单表达式。
输入与结果: 含 #const、宏和花括号表达式的标准输入 → 展开后的文本。
调用格式:
sspp -nb < edited.sspp > str.out
-nb 去空行。表达式使用 awk/C 预处理器约定;不要把外来未知模板当成纯数据直接执行,因为其中可以包含预处理和 awk 指令。
pdef
为母晶格上允许的点缺陷生成对称不等价结构。
输入与结果: lat.in 的允许物种、无缺陷 str.out、-er 间距 → pdef* 目录。
调用格式:
pdef -er=6
可用物种列表中加入 Vac 表示空位。-p 改目录前缀。它负责结构生成;缺陷形成能仍需化学势、荷电修正和独立能量计算等适合体系的处理。
展开本命令的完整参数表
Point DEFect generator 3.52, by Axel van de Walle
-l=[string] Input file defining the lattice (default: lat.in)
-s=[string] Input file defining the undefected structure (default: str.out)
-p=[string] Prefix of the directories that will contain the defected structures (Default pdef)
-er=[real] Minimum distance between point defects (Default: 0.00000)
-sig=[int] Number of significant digits printed (default: 5)
-h Display more help (Default: Off)
strpath
在两端结构之间插值,或构造结构路径/双像。
输入与结果: str1.out、str2.out → 单个插值结构或编号图像目录。
调用格式:
strpath -s1=str.out -s2=str_relax.out -ni=5
-f 指定单点插值分数;-df 为双像相关设置;-ci/-cil 用于能量路径的拐点处理。两端原子物种与对应顺序要一致,生成图像不等于已经完成 NEB。
展开本命令的完整参数表
STRucture PATH generator 3.52, by Axel van de Walle
-s1=[string] Input file defining structure 1 (default: str1.out)
-s2=[string] Input file defining structure 2 (default: str2.out)
-ni=[int] Number of images (Default: 0)
-f=[real] Interpolation fraction in [0,1] (Default: 0.5)
-df=[real] Dimer distance [0,1] (Default: 0)
-dp=[string] Directory name pattern (default 00)
-ci Calculate inflection point (Default: Off)
-cil Calculate inflection point location (Default: Off)
-sig=[int] Number of significant digits printed (default: 5)
-h Display more help (Default: Off)
-d Use all default values (Default: Off)
surfbond
根据晶面取向和键截断估计断键统计。
输入与结果: 结构、Miller 指数或角度网格、键长截断 → 取向相关的断键数据。
调用格式:
surfbond -s=str.out -m=1,0,0 -b=2.8
-m 指定晶面,-mm 或 -nph/-nth 控制取向扫描。断键数是几何模型,不是已经计算好的表面自由能。
展开本命令的完整参数表
SURFace BOND counting 3.52, by Helena Liu and Axel van de Walle
-h Display more help (Default: Off)
-s=[string] Input file defining a structure (Default: str.in)
-m=[real],... Miller indices (Default: )
-mm=[int] Max Miller index (Default: 0)
-b=[real] max bond length (Default: 0)
-nph=[int] Nb of mesh points along phi (Default: 24)
-nth=[int] Nb of mesh points along theta (Default: 48)
-sig=[int] Number of significant digits printed (Default: 5)
-z=[real] Tolerance for comparing coordinates (default: 1e-3)
-a new broken bond counting Algorithm (Default: Off)
-d Use all default values (Default: Off)
symbrklib
沿已知晶格失稳路径产生轻微畸变的参考结构。
输入与结果: 元素、初末晶格及可选 -s 分数 → str_hint.out、str_sup.out。
调用格式:
symbrklib -s 0.05 Fe bcc fcc
当前库包含 bcc/fcc/hcp 之间的指定路径。常与 robustrelax 配合;输出只提供初始结构,不能据此判断相稳定性。
展开本命令的完整参数表
Usage: symbrklib [-s fraction] [element] [initial_structure] [final_structure]
Currently, the initial and final structures can be one of bcc,fcc,hcp.
The -s option (optional) indicates to just generate a small distortion (a given fraction along the instability path).
This command is intended to be run before robustrelax_xxxx
icamag
枚举固定超胞中对称不等价的离散占据/磁态。
输入与结果: 每格点列出 Fe+3,Fe-3 等两种磁标签的 lat.in → 构型及简并度。
调用格式:
icamag -d > magnetic-configs.out
默认按二值自旋并去掉全局翻转等价构型;-nm 取消磁性翻转等价并允许多物种占据。它不计算各态能量或自动得到 Curie 温度。
展开本命令的完整参数表
Independent Cell Approximation for MAGnetic systems 3.52, by Axel van de Walle
-h Display more help (Default: Off)
-l=[string] Input file defining the lattice (Default: lat.in)
-nm No Magnetism (Default: Off)
-sig=[int] Number of significant digits printed (Default: 5)
-d Use all default values (Default: Off)
SQS、团簇和回归
mcsqs
以随机优化搜索匹配目标关联函数的特殊准随机结构。
输入与结果: rndstr.in、clusters.out → bestsqs.out、bestcorr.out、日志。
调用格式:
mcsqs -n=32 -ms=250000 -sd=2410
先用 -2/-3 等生成团簇;-n 是总原子数;-ms 限制步数;-ip 区分并发实例;-best 汇总;stopsqs 正常停。-T 是优化温度,不能当成材料温度。详见正文 SQS 两章。
展开本命令的完整参数表
Monte Carlo generator of Special Quasirandom Structures 3.52, by Axel van de Walle
-n=[int] nb of atom/unit cell (Default: 0)
If -n is not specified, generate clusters of the following sizes:
-2=[real] Maximum distance between two points within a pair (Default: 0)
-3=[real] Maximum distance between two points within a triplet (Default: 0)
-4=[real] Maximum distance between two points within a quadruplet (Default: 0)
-5=[real] Maximum distance between two points within a quintuplet (Default: 0)
-6=[real] Maximum distance between two points within a sextuplet (Default: 0)
-l=[string] Input file defining the random structure (default: rndstr.in)
-cf=[string] Input file defining the clusters (default: clusters.out)
-tcf=[string] Input file defining the target multibody correlations (default: internally calculated values for fully disordered state)
-tol=[real] Tolerance for matching correlations (default: 1e-3)
-wr=[real] Weight assigned to range of perfect correlation match in objective function (default 1)
-wn=[real] Multiplicative decrease in weight per additional point in cluster (default 1)
-wd=[real] Exponent of decay in weight as function of cluster diameter (default 0)
-T=[real] Temperature (default 1)
-pf=[string] Input file defining the optimization parameters (default: sqsparam.in)
-rc Read supercells from file sqscell.out (default: generate internally and write to sqscell.out) (Default: Off)
-ip=[int] Index of current process (for parallel operation) (Default: -1)
-best Collect best SQS among the outputs of prior parallel runs (Default: Off)
-crf=[string] Select correlation functions (default: trigo)
-sd=[int] Seed for random number generation (default: use clock)
-rt=[int] Read parameter file every (rt) step (default:10000)
-ms=[int] Maximum number of Monte Carlo steps (default: no limit)
-2d Generate only supercells in the plane of a,b axes (Default: Off)
-sig=[int] Number of significant digits to print in output files (default: 6)
-h Display more help (Default: Off)
gensqs
用枚举寻找严格满足目标关联的 SQS。
输入与结果: lat.in、clusters.out、tcorr.out → 候选结构标准输出。
调用格式:
gensqs -n=8 > sqs8.out
-n 是严格指定的晶胞大小,不会列出周期更小的结构。目标过多或不相容可能没有输出。一般先用 mcsqs,gensqs 适合很小规模的枚举研究。
展开本命令的完整参数表
GENerate Special Quasirandom Structures 3.52, by Axel van de Walle
-n=[int] nb of atom/unit cell (Default: 0)
-sig=[int] Number of significant digits to print in output files (Default: 6)
-cf=[string] Input file defining the clusters (default: clusters.out)
-tc=[string] Input file defining the target correlations (default: tcorr.out)
-tol=[real] Tolerance for matching correlations (default: 1e-3)
-l=[string] Input file defining the lattice (default: lat.in)
-rc Read unit cells from file (Default: Off)
-pc Print number of supercells only, and quit (Default: Off)
-tp=[int] Total number of processes (for parallel operation) (Default: 1)
-ip=[int] Index of current process (0,...,tp-1) (for parallel operation) (Default: 0)
-crf=[string] Select correlation functions (default: trigo)
-h Display more help (Default: Off)
corrdump
计算结构的团簇关联、生成团簇、输出对称信息或按 ECI 预测。
输入与结果: lat.in、str.out,或预先给定的 clusters.out → 关联表及团簇/对称文件。
调用格式:
corrdump -2=4.0 -3=2.8 > corr.out
-c 读取现有团簇;-clus 只建团簇;-ro 读取概率占据;-rnd 理想无序态;-eci 预测;-mi 表示系数已含重数。默认可能覆盖 clusters.out,扩展 SQS 关联检查要另用目录。
展开本命令的完整参数表
CORRelation DUMPer 3.52, by Axel van de Walle
-h Display more help (Default: Off)
-2=[real] Maximum distance between two points within a pair (Default: 0)
-3=[real] Maximum distance between two points within a triplet (Default: 0)
-4=[real] Maximum distance between two points within a quadruplet (Default: 0)
-5=[real] Maximum distance between two points within a quintuplet (Default: 0)
-6=[real] Maximum distance between two points within a sextuplet (Default: 0)
-l=[string] Input file defining the lattice (default: lat.in)
-s=[string] Input file defining the structure (default: str.out)
-pc Print composition only (Default: Off)
-pcm Print composition matrix only (Default: Off)
-fast Use fast algo to calculate correlations of 'simple' supercells (Default: Off)
-skipr Skip algorithm robust to relaxations (Default: Off)
-sym Just find space group (Default: Off)
-clus Just find clusters (Default: Off)
-c Read cluster file instead of writing it (Default: Off)
-cf=[string] File name of the cluster file (default: clusters.out)
-z=[real] Tolerance for finding symmetry operations (default: 1e-3)
-sig=[int] Number of significant digits printed (default: 5)
-noe Do not include empty cluster (Default: Off)
-nop Do not include point cluster(s) (Default: Off)
-noc Do not include any cluster(s) (Default: Off)
-eca Calculate Energy of Clusters of Atoms (Default: Off)
-wu=[string] Write Unrelaxed structure into specified file (Default: )
-rnd Print correlation of the random state of the same composition as the input structure (Default: Off)
-eci=[string] Predict quantity using ECI in specified file (Default: )
-mi Multiplicities are already included in ECI file (Default: Off)
-crf=[string] Select correlation functions (default: trigo)
-nb Print structure number (Default: Off)
-ro Read lattice file containing occupation variables (this code does not make use of them) (Default: Off)
getclus
将团簇文件整理成便于阅读的摘要。
输入与结果: clusters.out,可选 ECI 文件 → 阶数、直径、重数及系数。
调用格式:
getclus -e > eci-table.out
无参数只看团簇;-e 读 eci.out,也可直接指定其他系数文件。摘要顺序与 clusters.out/eci.out 一致,不要分别排序后再配对。
展开本命令的完整参数表
Syntax: getclus [-e] [ecifile]
extracts, from clusters.out, the cluster sizes, lengths and multiplicities
if ecifile is given, it also prints the eci therein
if -e is specified, it prints eci from eci.out
maps
为二元晶格体系自动选择结构并更新簇展开。
输入与结果: lat.in 与 编号/str.out、编号/energy → ECI、拟合、预测和基态候选。
调用格式:
maps -d
程序常驻,通过 ready 请求结构、stop 结束;-g/-mv 控制搜索范围;nbclusters.in 可人工选择簇族,改变后 touch refresh。energy 是结构晶胞总能;有多于两种可替换物种用 mmaps。
展开本命令的完整参数表
MIT Ab initio Phase Stability (MAPS) code 3.52, by Axel van de Walle
-h Display more help (Default: Off)
-l=[string] Input file defining the lattice (default: lat.in)
-z=[real] Tolerance for finding symmetry operations (default: 1e-3)
-c=[real] Exponent of the order of complexity (default: 3)
-t=[int] Time between disk reads in sec (default: 10 sec)
-m=[int] Maximum number of points in cluster (default 4)
-g=[int] Extend ground state search up to structures having at least that many atoms. (Default: 0)
-c0=[real] [c0,c1] is the concentration range where ground states must be correct. (Default: 0)
-c1=[real] (Default: 1)
-mv=[int] Maximum volume (number of atom per unit cell) allowed when generating structures (default: no limit)
-mw=[real] Maximum weight allowed when try to match ground states (Default: 16)
-2d Find supercells along a and b axes only (Default: Off)
-p=[string] Predictor plugins to use (examples: -p=cs or -p=cs_es) (Default: )
-ks=[string] same as -p (Default: )
-fa=[string] Select fitting algorithm (default: built-in)
-q Quiet mode (do not print status to stderr) (Default: Off)
-sig=[int] Number of significant digits to print in output files (Default: 6)
-d Use all default values (Default: Off)
mmaps
面向多组分/多子晶格的自动簇展开。
输入与结果: 同 maps,增加多元组分区域和属性设置 → 多元拟合与化学势信息。
调用格式:
mmaps -d
-pn 指定要拟合的性质文件;-pa 表示已归一化;-cr 限定组分区域;-ig 不强制训练集基态一致。保持 atoms.out、团簇和 ECI 的顺序。Bayesian 拟合是另一个算法选项,不能与本文默认拟合结果混称。
展开本命令的完整参数表
MIT Ab initio Phase Stability (MAPS) code 3.52, by Axel van de Walle
-h Display more help (Default: Off)
-l=[string] Input file defining the lattice (default: lat.in)
-z=[real] Tolerance for finding symmetry operations (default: 1e-3)
-c=[real] Exponent of the order of complexity (default: 3)
-t=[int] Time between disk reads in sec (default: 10 sec)
-m=[int] Maximum number of points in cluster (default 4)
-g=[int] Extend ground state search up to structures having at least that many atoms. (Default: 0)
-cr=[string] Concentration region input file (Default: crange.in)
-he=[real] Highest predicted energy, above ground state hull, allowed when generating structures (default: no limit)
-mv=[int] Maximum volume (number of atom per unit cell) allowed when generating structures (default: no limit)
-mw=[real] Maximum weight allowed when try to match ground states (Default: 16)
-2d Find supercells along a and b axes only (Default: Off)
-p=[string] Predictor plugins to use (examples: -p=es or -p=es_cs) (Default: )
-ks=[string] same as -p (Default: )
-fa=[string] Select fitting algorithm (default: built-in, alternative: -fa=bayesian)
-xo=[string] input additional parameter for extension (Default: )
-crf=[string] Select correlation functions (default: trigo)
-pn=[string] Property to cluster expand (default: energy)
-ig Ignore whether cluster expansion predicts correct ground states (Default: Off)
-pa Quantity to expand is already per atom (Default: Off)
-q Quiet mode (do not print status to stderr) (Default: Off)
-sig=[int] Number of significant digits to print in output files (Default: 6)
-d Use all default values (Default: Off)
mapsrep
用 gnuplot 查看二元簇展开的能量、误差和 ECI。
输入与结果: maps 输出文件 → 图形会话。
调用格式:
mapsrep
-e 也显示标有 error 的结构。需要 gnuplot;无桌面时设置文件终端或用随文绘图脚本。不会重新计算结构能量。
展开本命令的完整参数表
Display the output of maps in graphical form.
Syntax: mapsrep [-e]
the optional switch -e tells the code to plot structures flagged with error too.
Thanks to Ruoshi Sun and Mike Widom for updating the script for recent versions of gnuplot.
mmapsrep
显示多元簇展开的组分投影与拟合信息。
输入与结果: mmaps 输出文件以及用于作图的组分列 → gnuplot 图形。
调用格式:
mmapsrep 1 2 3
三个参数是组分坐标列,不是元素原子序数。先核对文件列定义;-e 包含标记为 error 的结构。
展开本命令的完整参数表
Display the output of mmaps in graphical form.
Syntax: mmapsrep [-e] c1 c2 c3
where c1,c2,c3 are the column numbers of the compositions to plot
the optional switch -e tells the code to plot structures flagged with error too.
lsfit
完成最小二乘、多项式回归及留一交叉验证。
输入与结果: -x 自变量矩阵、-y 目标、可选权重/正则项 → 系数或指定诊断量。
调用格式:
lsfit -x=x.in -y=y.in -1
-1 加常数列;-pw 定义幂次;-s 选列;-cv 交叉验证;-p 预测;-e 误差;-se 标准误;-colin 处理共线列。数据行必须严格对应,不把 CV 与训练 RMSE 混用。
展开本命令的完整参数表
Least-Square FIT 3.52, by Axel van de Walle
-x=[string] x file (Default: )
-y=[string] y file (Default: )
-w=[string] weight file (Default: )
-r=[string] regularization parameters file (Default: )
-pf Perfect Fit algorithm (Default: Off)
-pw=[string] number of powers of each column to regress on (Default: )
-s=[string] select columns to regress on (one number by column, 0: ignore, 1: use) (Default: )
-1 add a column of ones as regressor (Default: Off)
-colin Ignore colinear columns in x file (Default: Off)
-cv Print crossvalidation score (Default: Off)
-se Print standard errors (Default: Off)
-ty Print trues values of y (Default: Off)
-p Print predicted values of y (Default: Off)
-e Print prediction error (Default: Off)
-mat Print fitting matrix (Default: Off)
-sig=[int] Number of significant digits printed (default: 5)
cv
从关联矩阵中选择簇并评估交叉验证。
输入与结果: corr.in、energy.in、clusters.out,可选 include.in/weight.in → 拟合、ECI 和诊断文件。
调用格式:
cv -d
未知能量在 energy.in 中写 x。-g/-w/-p 可强调基态。它会输出/替换模型文件,应在独立副本中操作,不覆盖正在运行的 maps。
展开本命令的完整参数表
Cross-Validation code 3.52, by Axel van de Walle
-g Favor cluster choices where the ground state line is correct (Default: Off)
-w=[real] Weight structures by w/(struct_energy-gs_energy+w) (Default: 1000)
-p=[real] Penality for structures that lie below the ground state line (Default: 0)
-d Use all default values (Default: Off)
-h Display Help (Default: Off)
clusterexpand
用已有团簇集合拟合目录中某个标量、温度序列或张量性质。
输入与结果: lat.in、clusters.out、各目录 str.out 和指定性质文件 → 性质.eci 与 性质.ecimult。
调用格式:
clusterexpand -cv energy
默认按结构原子数归一化;-pa 表示输入已归一化;-e 跳过 error;-s 选择列;-g 用广义簇展开。各结构的温度点/张量排列必须一致。
展开本命令的完整参数表
Syntax: clusterexpand [-e] [-pa] [-s "1,0,1, ..."] filename
Cluster expands the quantity stored in */filename
Uses the clusters in clusters.out
Outputs to filename.eci filename.ecimult
ecimult contains the eci multiplied by multiplicity
the option -e causes the structures flagged with an error file to be ignored
the option -pa indicates that the quantity is per atom already
so that the code must NOT divide it by the number of atoms
the option -s lets you select which cluster to include (1) or exclude (0)
the option -g selects a generalized (tensor) cluster expansion
the -cv option prints the cv score.
clusterpredict
用 clusterexpand 输出的模型预测单个结构的性质。
输入与结果: 结构目录中的 str.out、上层模型及性质.eci → 预测值。
调用格式:
clusterpredict energy
在独立预测目录运行;它会将结果写入与性质同名的文件,可能覆盖已有 energy。先复制 str.out,保留原 DFT 训练数据。与 clusterexpand 的单位约定配套使用 -pa,不能把总量与每原子量混用。
展开本命令的完整参数表
Syntax: clusterpredict [-pa] file
see clusterexpand for more info.
This command is to be run from within a specific structure directory containing a str.out file.
gce
按晶体对称性构建张量等广义性质的簇基。
输入与结果: lat.in、str.out、gcetensor.in 等 → 广义 clusters.out 和关联/张量信息。
调用格式:
gce -2=2.8 > tensor-corr.out
gcetensor.in 定义张量阶数和对称置换;-st 对称化给定张量;-gce 选对象类型。该团簇文件与普通标量簇展开不通用,必须独立保存。
展开本命令的完整参数表
Generalized Cluster Expansion 3.52, by Axel van de Walle
-h Display more help (Default: Off)
-2=[real] Maximum distance between two points within a pair (Default: 0)
-3=[real] Maximum distance between two points within a triplet (Default: 0)
-4=[real] Maximum distance between two points within a quadruplet (Default: 0)
-5=[real] Maximum distance between two points within a quintuplet (Default: 0)
-6=[real] Maximum distance between two points within a sextuplet (Default: 0)
-l=[string] Input file defining the lattice (default: lat.in)
-s=[string] Input file defining the structure (default: str.out)
-pc Print composition only (Default: Off)
-sym Just find space group (Default: Off)
-st Symmetrize tensor given in tensor.in (Default: Off)
-clus Just find clusters (Default: Off)
-c Read clusters.out file instead of writing it (Default: Off)
-z=[real] Tolerance for finding symmetry operations (default: 1e-3)
-sig=[int] Number of significant digits printed (default: 5)
-noe Do not include empty cluster (Default: Off)
-nop Do not include point cluster(s) (Default: Off)
-rnd Print correlation of the random state of the same composition as the input structure (Default: Off)
-eci=[string] Predict quantity using ECI in specified file (Default: )
-mi Multiplicities are already included in ECI file (Default: Off)
-crf=[string] Select correlation functions (default: trigo)
-gce=[string] Select type of Generalized Cluster Expansion (default: tensor)
-nb Print structure number (Default: Off)
cvmclus
生成簇变分法 CVM 熵表达式所需的簇、概率变换和系数。
输入与结果: lat.in、maxclus.in 的最大团簇 → clusters.out、clusmult.out 及 CVM 系数文件。
调用格式:
cvmclus -d
多个最大团簇以 end 分隔。它生成表达式系数,不自动最小化自由能,也不自行生成完整相图。
展开本命令的完整参数表
Cluster Variation Method CLUSter generator 3.52, by Axel van de Walle
-h Display more help (Default: Off)
-l=[string] Input file defining the lattice (Default: lat.in)
-m=[string] Maximal cluster (Default: maxclus.in)
-sig=[int] Number of significant digits printed (Default: 5)
-crf=[string] Select correlation functions (default: trigo)
-d Use all default values (Default: Off)
蒙特卡洛、应变和缺陷热力学
emc2
对二元簇展开进行正则或半巨正则 Monte Carlo。
输入与结果: lat.in、clusters.out、eci.out、gs_str.out,可选 teci.out → mc.out、快照。
调用格式:
emc2 -gs=1 -T0=100 -T1=1400 -dT=100 -mu0=0 -er=12 -eq=300 -n=2000 -keV
-cm 固定组分;-x 是 [-1,1] 的自旋浓度;-abs 改变化学势输入约定;-g2c 变换输出热力学量。默认无量纲化学势与绝对化学势不是同一数值。详细列含义见正文。
展开本命令的完整参数表
Eazy Monte Carlo Code 3.52, by Axel van de Walle
-h Help (Default: Off)
-mu0=[real] initial chemical potential (Default: Off)
-T0=[real] initial temperature (Default: Off)
-mu1=[real] final chemical potential (Default: Off)
-T1=[real] final temperature (Default: Off)
-dmu=[real] chemical potential step (Default: Off)
-dT=[real] temperature step (Default: Off)
-db=[real] inverse temperature step (Default: Off)
-cm Set Canonical mode (Default: Off)
-x=[real] Set concentration (Default: Off)
-abs take chemical potentials as absolute quantities (as in mc.out) (Default: Off)
-phi0=[real] initial (grand) canonical potential (Default: Off)
-er=[real] set the system size so that a sphere of that radius must fit inside the simulation cell (Default: 0)
-eq=[int] number of equilibration passes (Default: -1)
-n=[int] number of averaging passes (Default: -1)
-dx=[real] Target precision for the average concentration (optional, replaces -n and -eq) (Default: 0)
-aq=[int] Alternative quantity that must meet the tolerance specified by -dx. 0: energy, 1: concentration (default), 2: long-range order, 3- correlations
-gs=[int] which ground state to use as initial config (-gs=-1 to use random state, c=1/2) (Default: -2)
-innerT inner loop over T (Default: Off)
-tstat=[real] Critical value of the test for discontinuity (Default: 3)
-sigdig=[int] Number of significant digits printed (Default: 6)
-q Quiet (do not write to stdout) (Default: Off)
-o=[string] Output file (default: mc.out)
-oss=[string] Output snapshot file (default: mcsnapshot.out)
-opss=[string] Output periodic snapshot files (default: do not write)
-k=[real] Boltzman's constant (conversion factor from T to energy) (Default: 1)
-keV Set Boltzman's constant to 8.617e-5 so that temperature is in K when energy is in eV (Default: Off)
-z=[real] Tolerance for finding symmetry operations (default: 1e-3)
-sd=[int] Seed for random number generation (default: use clock)
-dl Drop the last data point of each inner loop (after the phase transition occured) (Default: Off)
-g2c Convert output to canonical rather than grand-canonical quantities (Default: Off)
-is=[string] File name containing a user-specified initial configuration (replaces -gs) (Default: )
-ks=[string] Specify how k space ECI are calculated (e.g. -ks=cs). (Default: )
memc2
对多组分簇展开进行 Monte Carlo。
输入与结果: 四类模型文件、control.in,可选 conccons.in/teci.out → mc.out、mcheader.out。
调用格式:
memc2 -gs=-1 -er=6 -eq=100 -n=500 -keV -il
control.in 指定温度和各物种化学势;-tp 可自适应精度,-aq 选被控制量;-il 包含扫描端点。以 mcheader.out 为本次结果列的准绳。
展开本命令的完整参数表
Multicomponent Eazy Monte Carlo Code 3.52, by Axel van de Walle
-h Help (Default: Off)
-er=[real] Set the system size so that a sphere of that radius must fit inside the simulation cell (Default: 0)
-cf=[string] Control file specifying the ranges of temperature and chem. pot. scanned (default: control.in)
-eq=[int] Number of equilibration passes (Default: -1)
-n=[int] Number of averaging passes (Default: -1)
-tp=[real] Target precision (optional, replaces -n and -eq) (Default: 0)
-aq=[int] Quantity that must meet the tolerance specified by -tp. 1: energy (default), 2: long-range order, 3-: point correlations
-gs=[int] which ground state to use as initial config (-gs=-1 to use random state) (Default: -2)
-k=[real] Boltzman's constant (conversion factor from T to energy) (Default: 1)
-keV Set Boltzman's constant to 8.617e-5 so that temperature is in K when energy is in eV (Default: Off)
-g2c Convert output to canonical rather than grand-canonical quantities (Default: Off)
-phi0=[real] initial (grand) canonical potential (default: from mean field approx.)
-tstat=[real] Critical value of the test for discontinuity (Default: 3)
-mft=[real] Mean field threshold (if |lte-mf|<mft, use mf values instead of mc) (Default: -1)
-mftq=[int] Quantity that must meet the tolerance specified by -mft.0: phi (default) , 1: energy , 2: long-range order, 3-: concentrations
-sigdig=[int] Number of significant digits printed (Default: 6)
-q Quiet (do not write to stdout) (Default: Off)
-o=[string] Output file (default: mc.out)
-oss=[string] Output snapshot file (default: mcsnapshot.out)
-opss=[string] Output periodic snapshot files (default: do not write)
-sd=[int] Seed for random number generation (default: use clock)
-dl Drop the last data point of each inner loop (after the phase transition occured) (Default: Off)
-is=[string] File name containing a user-specified initial configuration (replaces -gs) (Default: )
-hf Shift all coordinates by half a grid point in scan (e.g. 2 steps in [0,1] give 0.25,0.75 instead of 0,0.5) (Default: Off)
-il Include last coordinate in scan (e.g. 3 steps in [0,1] gives 0,0.5,1 instead of 0,0.333,0.666) (Default: Off)
-ts=[string] Triangular scanning. Specify list of composition axes (e.g. -ts=1,2). (Default: )
-crf=[string] Select correlation functions (default: trigo)
-df=[int] Max distance between flips (in unit cells) in grand-canonical mode (Default: -1)
-mf=[int] Minimum number of flips in grand-canonical mode (experimental) (Default: 0)
-rw Use random walk algorithm (experimental) (Default: Off)
-fdT=[real] Temperature step for finite differences (Default: 0.01)
-fdmu=[real] Chemical potential step for finite differences (Default: 0.01)
-ks=[string] Specify how k space ECI are calculated (e.g. -ks=cs). (Default: )
phb
随温度追踪指定两相的共存化学势与浓度。
输入与结果: 两相的模型文件及起始条件 → phb.out 的温度、化学势、两侧组分和能量量。
调用格式:
phb -gs1=0 -gs2=1 -dT=25 -er=8 -dx=0.02 -keV -o=phb.out
-d1/-d2 可让两相来自不同晶格目录;-dn 反向降温。相编号取 gs_str.out,-1 为无序相。接近相变或跟踪丢失时应调整步长/统计,不能把任意终止点当临界温度。
展开本命令的完整参数表
PHase Boundary 3.52, by Axel van de Walle
-h Help (Default: Off)
-mu=[real] initial chemical potential (Default: Off)
-T=[real] initial temperature (Default: Off)
-dmu=[real] chemical potential adjustment step (Default: Off)
-dT=[real] temperature step (Default: Off)
-mug=[real] Gap between the mu in phase 1 and mu in phase 2 (default: 0)
-ltep=[real] threshold free energy precision to use MC instead of LTE (in units of T) (default: always MC)
-er=[real] enclosed radius (Default: 0)
-gs1=[int] ground state for phase #1 (Default: -2)
-gs2=[int] ground state for phase #2 (Default: -2)
-is1=[string] File name containing a user-specified initial configuration (replaces -gs1) (Default: )
-is2=[string] File name containing a user-specified initial configuration (replaces -gs2) (Default: )
-d1=[string] directory for phase #1 (default: current dir)
-d2=[string] directory for phase #2 (default: current dir)
-lro print long range order parameter (Default: Off)
-tstat=[real] Critical value of the test for discontinuity (Default: 3)
-smax=[real] Maximum step (experimental feature) (Default: 1e+50)
-sigdig=[int] Number of significant digits printed (Default: 6)
-q Quiet (do not write to stdout) (Default: Off)
-o=[string] Output file (default: mc.out)
-k=[real] Boltzman's constant (conversion factor from T to energy) (Default: 1)
-keV Set Boltzman's constant to 8.617e-5 so that temperature is in K when energy is in eV (Default: Off)
-sd=[int] Seed for random number generation (default: use clock)
-dn Go down in temperature (Default: Off)
-dx=[real] Concentration Precision (Default: 0)
-ks=[string] Specify how k space ECI are calculated (e.g. -ks=cs). (Default: )
mcdroplast
去掉 MC 每段扫描末尾的一个数据点。
输入与结果: 标准输入的 MC 表格,空行分段 → 处理后的表格。
调用格式:
mcdroplast < mc.out > trimmed.out
用于剔除已跨越相变的末点,与 emc2 -dl 相关。只在确认末点不属于目标相分支时使用,原始文件应保留。
csfit
拟合二元立方体系的相干应变贡献。
输入与结果: lat.in、纯端元 str_relax.out、dir.in;生成结构能量 → cs.in、cs.log。
调用格式:
csfit -np=5 -nl=5 -ml=0.15 -nc=21 -t=1
至少需要足够的独立晶向;更改应变网格参数应换目录。计算生成结构的能量后程序才继续。得到的应变项可接入 -p=cs/-ks=cs,先排查重复计数。
展开本命令的完整参数表
Constituent Strain FITter 3.52, by Axel van de Walle
-h Display more help (Default: Off)
-nc=[int] Number of points in concentration mesh (default 50)
-ns=[int] Number of points in mesh used to look for energy minimum (default 100)
-np=[int] Number of points in stretching mesh in the direction perpendicular to the k-vector(default 5)
-nl=[int] Number of points in stretching mesh in the direction parallel to the k-vector (default 3)
-ml=[real] Maximum parallel stretching (default 0.05)
-l=[string] Input file defining the lattice (default: lat.in)
-pa=[string] Directory containing the pure A calculations (default 0/)
-pb=[string] Directory containing the pure B calculations (default 1/)
-ds=[string] File containing a list of stretching directions (default: dir.in)
-t=[int] Time between disk reads in sec (default: 10 sec)
-sig=[int] Number of significant digits to print in output files (Default: 6)
-d Use all default values (Default: Off)
gencs
计算点群允许的广义应变谐函数。
输入与结果: lat.in 或 sym.in 的点群生成元 → harm.out;系数表达式写到诊断输出。
调用格式:
gencs -r=4
这是模型构建辅助工具,不直接做 DFT 或给出 csfit 的能量曲线。-r 控制最高阶;应结合 harm.out 的张量表示使用。
展开本命令的完整参数表
Generalized Constituent Strain 3.52, by Axel van de Walle
-h Display more help (Default: Off)
-l=[string] Input file defining the lattice (default: lat.in)
-s Specify point group directly via generator (in sym.in) (Default: Off)
-z=[real] Tolerance for finding symmetry operations (default: 2e-4)
-r=[int] Maximum Rank of the harmonic (Default: 1)
-mr=[int] Minimum Rank of the harmonic (default 1)
-sig=[int] Number of significant digits printed (default: 5)
apb
生成反相畴界,并可用簇展开计算其能量或抽样。
输入与结果: 结构、滑移、母晶格和 ECI → str_apb.out、gamma_apb.out。
调用格式:
apb -sx=0.5 -sy=0.5
-f 只生成结构;-mc 启动配套 Monte Carlo。前两晶胞矢量定义 APB 面;输出 gamma 为 mJ/m²。只用 ECI 得到的结果不能写成独立 DFT 界面能。
展开本命令的完整参数表
AntiPhase Boundary 3.52, by Ruoshi Sun and Axel van de Walle
Automating impurity-enhanced antiphase boundary energy calculations from ab initio Monte Carlo,
Calphad 53, 20 (2016)
File options:
-l=[string] Input file: lattice (Default: lat.in)
-s=[string] : structure (Default: str.out)
-o=[string] Output file: APB structure (Default: str_apb.out)
-og=[string] : energies (Default: gamma_apb.out)
APB options:
-f Generate APB structure file and exit; do not compute APB energy (Default: Off)
-sx=[real] APB slip vector: x-component (Default: 0)
-sy=[real] : y-component (Default: 0)
-sz=[real] : z-component (Default: 0)
Monte Carlo options:
-mc Run Monte Carlo (Default: Off)
-eq=[int] Number of: equilibration passes (Default: -1)
-n=[int] : averaging passes (Default: -1)
-T=[real] Temperature (Default: 0)
Other options:
-d Use all default values (Default: Off)
-h Display more help (Default: Off)
VASP、振动与电子自由能
runstruct_vasp
连接单个 ATAT 结构和 VASP,生成输入、计算、提取。
输入与结果: str.out/str_hint.out、上层 vasp.wrap、个人配置 → VASP 输入输出及 ATAT energy/force 等。
调用格式:
runstruct_vasp -nr
-nr 只生成;-ex 只提取;-ng 使用已有 vasp.in;-w 换 wrap;-d 查找层数;-p 保留文件;-lu 复用上层波函数。正常运行不带 -nr。集群模板已处理 MPI。
ezvasp
从组合输入 vasp.in 生成 VASP 输入并执行指定命令。
输入与结果: [INCAR]/[POSCAR]/可选 [KPOINTS] 等段及个人赝势配置 → VASP 文件及 .static/.relax。
调用格式:
ezvasp -n vasp.in
-n 只生成;-p "命令" 改运行命令;-s 或 DOSTATIC 追加静态;-c 调整晶胞。KPPRA/USEPOT 等是接口标记,不是照搬进任意原始 INCAR 的通用 VASP 标签。
展开本命令的完整参数表
Syntax: ezvasp [-c] [-s] [-n] [-p "..."] input_file
-c: Cell patch. This option will convert the cell you entered into a cell that has the symmetry needed for
vasp to work properly. The atom positions are altered correspondingly.
-s: Static run. After the relaxations are completed, this option makes vasp start again, turning off relaxations
and turning on tetrahedron integration with bloech correction. Can acheive the same effect by
including DOSTATIC in the INCAR portion of the input file.
-n: do Not run vasp. If you want to create the input files now and run them later, perhaps on another machine.
-p: name of the vasp command ("vasp" by default). You can include addition prefix such as:
ezvasp -p "rsh remote.machine nice +5 /usr/local/bin/vasp" vasp.in
Here is an example of input file:
[INCAR]
SYSTEM = FeNi
ISPIN = 2
PREC = HIGH
ISMEAR = 1
NSW=41
SIGMA = 0.1
IBRION = 2
ISIF = 3
ENMAX = 400
EDIFF = 1e-6
EDIFFG = 1e-4
KPPRA = 1000
USEPOT = PAWGGA
DOSTATIC
SUBATOM = s/Fe$/Fe_h/g
KSCHEME = GAMMA
MAGATOM =
[POSCAR]
SOME TITLE
3.55
-.500000000 -.500000000 -1.000000000
.500000000 -1.000000000 -.500000000
-.500000000 .500000000 1.000000000
1 2
Direct
.33333 .33333 .00000 Fe+5
.00000 .00000 .00000 Vac
.66667 .66667 .00000 Fe-5
End of example.
Note that there 6 new tokens in the INCAR section.
1) KPPRA stands for "K-Point Per Reciprocal Atom". This is a way to automatically set the k-point mesh for
a number of similar systems. Here is how it works. If you know that you need 500 k-points for a 2-atom
structure, then you type in 1000. If you now try a similar structure with 4 atoms, the code automatically
use 250 k-points. The mesh along the three axes is automatically chosen to make the mesh as uniform as possible.
(For the algorithm, see atat/src/kmesh.c++).
You can also specify KPPRA = UPDIR which indicates that the KPOINTS file
found one directory above should be used.
(This is useful for cell distorsions used in elastic constant calculations of constituent strain runs).
If this token is ommited, you need to specify a [KPOINT] section in the input file that contains what
you want the KPOINT file to be.
2) DOSTATIC indicates that a static run must be done after the relaxation run (NSW tag is removed and the ISIF and IBRION
token are ajusted accordingly). The output files named *.relax contain the result of the (first)
relaxation run while the files named *.static contain the results of the (second) static run.
When DOSTATIC is not specified, all output files are named *.static , whether the VASP input parameters
allow relaxations or not.
3) KSCHEME specifies the type mesh to use: Gamma shift or Monkorst-Pack. The default is Gamma if KSCHEME is ommited. You can
also specify (on a separate line) KZ1 to force one k-point along the 3rd axis, which is useful for slabs.
4) MAGATOM is similar to the usual token MAGMOM used to specify the moment on each atom. The novelty is that you specify the
moments in the POSCAR section. (In version 3.15 and above, this token can be ommited. Having spins specified in the POSCAR
section turns this on automatically. It also set ISPIN=2 automatically.)
The usual MAGMOM token is still available (but you cannot use both MAGMOM and MAGATOM).
5) USEPOT
selects the potentials used: LDA GGA PAWLDA PAWGGA PAWPBE (or any other potential defined in .ezvasp.rc)
By default, LDA (without PAW) is used.
For backward compatibility, you can also use the tag DOGGA instead of USEPOT = GGA
6) The SUBATOM token lets you specify a sed-like substitution command to be
applied to the name of the atomic species.
For instance, SUBATOM= s/Fe$/Fe_h/g will cause ezvasp to use the Fe_h
pseudopotential instead of the Fe one. Multiple SUBATOM token can be given,
one for each substitution. Don't forget the s/ and /g and the $ after the first element name
(to avoid F matching Fe, or Y matching Yb).
There are also familiar VASP tokens that are robustified. For instance ISTART = 2 does not work unless you force
the FFT grid size to match the earlier run.
To help with this, ezvasp fetches the right NGX,NGY,NGZ from the previous run's OUTCAR or CHGCAR in the current directory.
There are new features in the POSCAR section as well.
1) The line that specify the number of atoms (here 1 2) can be ommited (it is ignored).
2) The atomic species are specified to the right of the atom positions.
The corresponding POTCAR are automatically copied. You can specify pseudopotentials like Li_h or O_s.
3) The number following the species is the magnetic moment on the atom (if MAGMOM is in the INCAR section).
Identical species with different moments will be considered symmetrically distinct to allow for
symmetry-breaking relaxations.
4) Do not specify "selective dynamics". It will be written to the INCAR file
automatically if you include T's and F's after the atom species, e.g.:
0.5 0.5 0.5 Al T T F
5) The element "Vac" or "Va" stands for vacancy. It is ignored for everything but
to compute the k-point mesh with the KPPRA option.
extract_vasp
把已有 VASP 结果转成 ATAT 属性文件。
输入与结果: OUTCAR、OSZICAR、CONTCAR/POSCAR,优先 .static → energy、force.out、stress.out、dos.out 等。
调用格式:
extract_vasp
当前 energy 取 OSZICAR 最后一个 F,保留晶胞总量。检查原子顺序和计算收敛;解析成功并不自动保证物理结果可用。
checkerr_vasp
对 ATAT 接口日志中的若干已知错误进行快速检查。
输入与结果: vasp.out.static/vasp.out.relax → 退出状态,可选 error 文件。
调用格式:
checkerr_vasp -p
-p 打印错误路径;-e 创建 error 标记。它检查的关键词有限,不能代替 EDIFF、离子弛豫和输出完整性检查;只有普通 vasp.stdout 而无接口日志时也会报错。
cleanvasp
删除一组 VASP 大文件与中间文件。
输入与结果: 当前目录中的 VASP 文件 → 删除或精简。
调用格式:
cleanvasp
默认会删 CHG/CHGCAR/WAVECAR/POTCAR、INCAR/POSCAR/KPOINTS、XML 等;-v 还删除更多输出;-s 精简 OUTCAR。先保存重现输入。没有安全的 -h 模式,不能在珍贵原始数据目录里试参数。
atat-vasp
集群提供的 CPU VASP 执行入口。
输入与结果: Slurm 分配和 VASP 输入 → 由 Intel MPI 启动 VASP 6.4.2。
调用格式:
atat-vasp
自动使用 SLURM_NTASKS;只在 Slurm 作业内调用。它是环境启动器,不是新的 VASP 版本或额外科学算法;外部不要再套 mpirun。
fitfc
从有限位移受力拟合力常数并计算声子/振动自由能。
输入与结果: str.out、str_relax.out;生成位移后补齐 force.out → fc.out、vdos.out、fvib 等。
调用格式:
fitfc -er=9 -ns=1 -dr=0.01 -nrr
不带 -f 生成;-f 拟合;-fr 作用范围;-df 色散路径;-ns>1 为准谐流程。默认频率 Hz;-fn 允许展示不稳定模,不能使负频变稳定。
展开本命令的完整参数表
FIT Force Constants 3.52, by Axel van de Walle
-f Fit force constants (otherwise, generate pertubations) (Default: Off)
-si=[string] Input file defining the ideal structure (default: str.out)
-sr=[string] Input file defining the relaxed structure (default: str_relax.out)
-er=[real] Minimum distance between displaced atoms (Default: 0)
-ernn=[real] Minimum distance between displaced atoms in multiple of nearest neighbor distance (Default: 0)
-fr=[real] Force constant range (Default: 0)
-frnn=[real] Force constant range (in multiple of nearest neighbor distance) (Default: 0)
-dr=[real] Displacement of the perturbed atom (default: 0.2)
-ms=[real] Strain of the maximum volume sampled (default: 0.01)
-dv Specified strain above is volumetric (Default: Off)
-ns=[int] Number of volume sample (default: 2)
-iu Include Unperturbed structure in generated structures (Default: Off)
-nrr Do not rerelax structures at each new volume (Default: Off)
-cs Check for Singular matrix in fit (Default: Off)
-ncs No check for singular matrix in fit (this is the default, option included for backward compatibility) (Default: Off)
-wm Write fitting Matrices (Default: Off)
-sf=[string] Extra strain file (Default: )
-m=[string] Input file defining the atomic masses (default: ${atatdir}/data/masses.in)
-ccut=[string] Character marking the species label suffix that must be cut (Default: )
-T0=[real] Minimum temperature (default: 0)
-T1=[real] Maximum temperature (default: 2000)
-dT=[real] Temperature step (default: 100)
-P=[real] Pressure (in GPa, default: 0)
-kp=[real] Number of k-points per reciprocal atom (default: 1000)
-kx=[int] k-point mesh (along 1st recip lat. vect.) if <>0 then overrides -kp=... (Default: 0)
-ky=[int] k-point mesh (along 2nd recip lat. vect.) (Default: 0)
-kz=[int] k-point mesh (along 3rd recip lat. vect.) (Default: 0)
-fp=[int] Power of polynomial to fit free energy (Default: -1)
-s0 Use a gamma-centered k-point mesh (default shift: 1/2 1/2 1/2) (Default: Off)
-sx=[real] k-point shift (along 1st recip lat. vect.) (Default: 0.5)
-sy=[real] k-point shift (along 2nd recip lat. vect.) (Default: 0.5)
-sz=[real] k-point shift (along 3rd recip lat. vect.) (Default: 0.5)
-df=[string] Phonon dispersion curve calculation input file. (Default: )
-hp=[real] Planck's constant (default in (eV s))
-kb=[real] Boltzman's constant (default in eV/K)
-cfk=[real] Conversion factor for force constants into energy/dist^2 (default: converts eV/A^2 into J/m^2)
-mu=[real] Mass units (default: converts a.u. mass into kg)
-rl=[real] Robust Length algorithm parameter for soft modes (beta) (Default: 0)
-rls=[real] Quadratic strain-dependence of robust length for positive strain (beta) (Default: 0)
-cP=[real] Conversion factor from pressure*volume into eV (Default: 0.00624151)
-pa Output free energy per atom instead of per unit cell (Default: Off)
-pe Print energy in 3rd column of fitfc.out (Default: Off)
-sc=[real] Correction factor if spectator ion are present (default: 1)
-me0 Subtract energy at 0K (Default: Off)
-no Print number of atom in supercell only (Default: Off)
-w1 Flag first perturbation wait1 instead of wait file (Default: Off)
-w2 Flag negative perturbation directions with wait2 instead of wait file (Default: Off)
-fn Force continuation of calculations even if unstable (Default: Off)
-fu Find unstable modes (Default: Off)
-gu=[int] Generate unstable modes number n (Default: 0)
-gn Also Generate Negative displacements for mode specified by -gu=... (Default: Off)
-mau=[int] Maximum number of atom per supercell for unstable mode generation (Default: 64)
-sfc=[int] Simplify force constants: 1=streching+bending, 2=symmetric (Default: 0)
-apd Atom-Projected DOS (Default: Off)
-sig=[int] Number of significant digits printed (default: 5)
-z=[real] Tolerance for finding symmetry operations (default: 1e-3)
-h Display more help (Default: Off)
fitsvsl
从多种键长的受力数据拟合刚度—键长关系。
输入与结果: lat.in、strname.in、各结构及位移受力 → slspring.out、拟合诊断。
调用格式:
fitsvsl -er=9 -ns=3 -ms=0.02 -dr=0.01
生成模式先建位移;计算完后 fitsvsl -f -op=1 拟合。物种对、键长范围和结构代表性决定可迁移范围。
展开本命令的完整参数表
Fit Stiffness VS Length transferable force constants 3.52, by Axel van de Walle
-f Fit force constants (otherwise, generate pertubations) (Default: Off)
-l=[string] Input file defining the lattice (default: lat.in)
-dn=[string] Input file listing the directories containing the structures used to calculate force constants (default: strname.in)
-er=[real] Minimum distance between displaced atoms (Default: 0)
-dr=[real] Displacement of the perturbed atom (default: 0.2)
-ms=[real] Strain of the maximum volume sampled (default: 0.01)
-ns=[int] Number of volume sample (default: 2)
-op=[int] Order of the polynomial used to fit stiffness vs length (Default: 1)
-dd Use direction-dependent force constants (Default: Off)
-pc=[int] Maximum power of composition used in fit (default: no composition dependence)
-msl=[real] Maximum spring length (Default: Off)
-sf=[string] Extra strain file (Default: )
-eqt=[real] Tolerance for excluding force constants in plots. (Default: 2)
-sig=[int] Number of significant digits printed (default: 5)
-z=[real] Tolerance for finding symmetry operations (default: 1e-3)
-ncs No check for singular matrix in fit (Default: Off)
-od Use older 1-level only directory tree (Default: Off)
-h Display more help (Default: Off)
svsl
使用已拟合的刚度—键长模型计算振动性质。
输入与结果: str.out、str_relax.out、slspring.out 和元素质量 → svsl.out、fvib、vdos.out。
调用格式:
svsl -ns=1 -T1=1000 -dT=100 -kp=4000
-ns=1 谐近似;多体积用于准谐;-df 色散;-pa 每原子。它不会自动执行 VASP,输入弹簧模型必须已适用于该物种和结构。
展开本命令的完整参数表
Vibrational free energy calculator using the Stiffness VS Length method 3.52, by Axel van de Walle
-l=[string] Input file defining the lattice (defaults: lat.in, ../lat.in, str.out)
-us=[string] Input file defining the unrelaxed structure (default: str.out)
-rs=[string] Input file defining the relaxed structure (default: str_relax.out)
-sp=[string] Input file defining the springs (default: slspring.out)
-m=[string] Input file defining the atomic masses (default: ${atatdir}/data/masses.in)
-b=[real] Bulk modulus (Default: 0)
-bf=[string] Bulk modulus file (Default: )
-ms=[real] Maximum stretching of the lattice parameter (default: 0.05)
-ns=[int] Number of lattice parameter stretching step (default: 1 => harmonic approximation)
-T0=[real] Minimum temperature (default: 0)
-T1=[real] Maximum temperature (default: 2000)
-dT=[real] Temperature step (default: 100)
-kp=[real] Number of k-points per reciprocal atom (default: 1000)
-s0 Use a gamma-centered k-point mesh (default shift: 1/2 1/2 1/2) (Default: Off)
-sx=[real] k-point shift (along 1st recip lat. vect.) (Default: 0.5)
-sy=[real] k-point shift (along 2nd recip lat. vect.) (Default: 0.5)
-sz=[real] k-point shift (along 3rd recip lat. vect.) (Default: 0.5)
-hp=[real] Planck's constant (default in (eV s))
-kb=[real] Boltzman's constant (default in eV/K)
-cfk=[real] Conversion factor for force constants into energy/dist^2 (default: converts eV/A^2 into J/m^2)
-mu=[real] Mass units (default: converts a.u. mass into kg)
-rl=[real] Robust Length algorithm parameter for soft modes (beta) (Default: 0)
-pa Output free energy per atom instead of per unit cell (Default: Off)
-sc=[real] Correction factor if spectator ion are present (default: 1)
-fn Force continuation of calculations even if unstable (Default: Off)
-df=[string] Phonon dispersion curve calculation input file. (Default: )
-sf=[string] Extra strain file (Default: )
-msl=[real] Maximum spring length (Default: Off)
-sig=[int] Number of significant digits to print in output files (Default: 5)
-up=[string] User-specified Potential Plug-in (optional) (Default: )
-d Use all default values (Default: Off)
-h Display more help (Default: Off)
felec
在温度不改变能带的近似下求电子自由能。
输入与结果: ATAT 格式 dos.out → felec、felec.log、plotdos.out。
调用格式:
felec -T1=1000 -dT=100
dos.out 不是 DOSCAR。-sd 可平滑 DOS;-pa 改每原子;../Trange.in 统一温度网格。低温 DOS 细节和空带范围要足够。
展开本命令的完整参数表
Electronic free energy calculator 3.52, by Axel van de Walle
-dos=[string] DOS input file name (default: dos.out)
-T0=[real] Minimum temperature (default: 0)
-T1=[real] Maximum temperature (default: 2000)
-dT=[real] Temperature step (default: 100)
-kb=[real] Boltzman's constant (default: in eV/K)
-pa Output free energy per atom instead of per unit cell (Default: Off)
-sc=[real] Correction factor if spectator ion are present (Default: 1)
-sd=[real] Smooth DOS with a Gaussian this width (Default: 0)
-nf Do not calculate free energy (Default: Off)
-sig=[int] Number of significant digits to print in output files (Default: 5)
-h Display more help (Default: Off)
-d Use all default values (Default: Off)
mkteci
把静态 ECI 与温度相关自由能 ECI 组合。
输入与结果: eci.out、Trange.in、一个或多个 *.eci → teci.out。
调用格式:
mkteci felec.eci
确保所有项使用相同团簇、顺序、温度点和单位。MC 看到 teci.out 时优先读取它,比较不同物理项时使用独立目录。
展开本命令的完整参数表
Syntax: mkteci file1.eci ...
where file1.eci etc. is a list of T-dependent eci files obtained with
the clusterexpand command, e.g.
clusterexpand fvib in the case of vibrational free energy or
clusterexpand felec in the case of electronic free energy.
Usually the file list is: fvib.eci felec.eci
^vibrational ^electronic free energy
calcbulk
自动创建等比例应变结构,调用能量程序并拟合体模量。
输入与结果: str.out、应变区间/步长、能量命令 → bulkmod、strain.out、energy、str_relax.out。
调用格式:
calcbulk -0.02 0.02 0.01 runstruct_vasp
默认 B 为 eV/ų,乘 160.21766208 转 GPa。检查生成目录的能量是否齐全,不能只看命令结束。原脚本还尝试复制最近结构的 dos.out。
展开本命令的完整参数表
Calculates bulk modulus.
Syntax: calcbulk mins maxs ds runcommand
where mins and maxs are the minimum and maximum strains (e.g. 0.00 0.01)
ds is the step size (e.g. 0.005)
runcommand is the command to run the ab initio code (e.g. runstruct_vasp)
robustrelax_vasp
组织普通弛豫、体积处理、路径和不稳定结构处理。
输入与结果: 不同用途的 VASP wrap 与结构 → 分步骤目录、目标能量/结构。
调用格式:
robustrelax_vasp -mk
-mk 先生成可编辑模板,必须检查各 wrap。完整算法需要对应 VASP 计算,可能反复触发多次求解;-id 调用 infdet,不是简单的“万能收敛”开关。
展开本命令的完整参数表
This command implements the "inflection-detection" method introduced in
A. van de Walle, Q. Hong, S. Kadkhodaei and R. Sun, "The free energy of mechanically unstable phases"
Nat. Com. 6, 7559 (2015) doi:10.1038/ncomms8559 .
and
A. van de Walle and S. Kadkhodaei and R. Sun and Q.-J. Hong, "Epicycle method for elasticity limit calculations",
Phys. Rev. B 95 144113 (2017) doi:10.1103/PhysRevB.95.144113 .
It calculates the energy of a structure that is potentially mechanically unstable.
In a nutshell: the method finds either a local minimum (for a mechanically stable phase)
or the inflection point on a path joining the unrelaxed and fully relaxed structures
(for a mechanically unstable phase).
Syntax: robustrelax_vasp [options] command_prefix
where options are
-id Inflection Detection method
-idop "options" Options passed to the infdet command.
-neb Use the Nudged Elastic Band method to find minimum energy path
Otherwise: simply interpolate linearly.
-ex Only extract data form VASP files. Do not run anything.
-c [real] Relaxation magnitude cutoff needed to activate robust relax algorithm (default: 0).
-ni [integer] Number of images in the minimum energy path (default: 6).
-rc [string] Command for full relaxation (Default: runstruct_vasp -w vasp.wrap).
-vc [string] Command for volume only relaxation (Default: runstruct_vasp -w vaspvol.wrap).
-cc [string] Command for chain (neb) calculations (Default: runstruct_vasp -w vaspneb.wrap).
-sc [string] Command for static runs (Default: runstruct_vasp -w vaspstatic.wrap).
-ic [string] Command for inflection-detection runs (-id option) (Default: runstruct_vasp -p -w vaspid.wrap).
-idf [real] Starting point fraction for inflection detection (default: 0.5)
-ja
-jc By how much to jitter atoms (-ja) and cell parameters (-jc) for the initial conditions
for inflection-detection method.
-vib Update vibrational data in svib_ht file from vol_0/svib_ht file.
-mk Make auxiliary vasp input files (vaspvol.wrap, vaspneb.wrap, vaspstatic.wrap, vaspf.wrap, vaspid.wrap)
from vasp.wrap. Does not run anything.
-cln clean files for a full restart.
-cip continue (an prior run) if possible (only implemented for -id algorithm).
-d Use all defaults values.
-h Display more help.
command_prefix Prefix needed for vasp to run on a remote machine or in parallel (e.g. mpirun).
Note: the commands specified by -rc,-vc,-cc,-sc can be set to empty "" to skip the corresponding
calculation step (useful to restart an aborted run).
This command does the following:
1) Fully relax the structure (in str_hint.out or str.out) to create str_relax.out,
just like runstruct_vasp.
2) If the relaxation cutoff (-c=...) no exceeded, stop. Typically, should be set to -c=0.05.
3) Relax the volume only of structure in str_sup.out or str.out. Results are in directory 00/
4) Do a neb (-neb) or infection detection (-id) calculation between the two structures obtained in step 1 and 3
or just a linear interpolation between them (if no -neb or -id). Results are in directories ??/
Note that you need VTST Tools from http://theory.cm.utexas.edu/vtsttools/ for the neb method
with variable cell shape.
5) Do static calculations in each directory ??/
6) Find the inflection point on the path optimized in step 4. If it does not exist, find the
minimum energy along that path.
7) Report the energy found in 6 in the file energy and the corresponding geometry in str_relax.out
Notes:
1) str_beg.out and str_end.out contain the extremities of the path.
If you want to restart from scratch, delete these files.
2) For high symmetry phases (e.g. bcc,fcc,hcp) you may need to break the symmetry of the phase for it to relax.
For that purpose, you can use, e.g.,
symbrklib W fcc bcc
or
cellcvrt -ja=0.01 -jc=0.01 < str.out > str_hint.out .
Sometimes a supercell is needed (a phonon analysis will tell you that - or symbrklib for bcc,fcc,hcp).
infdet
用 epicycle 方法寻找最软模曲率为零约束下的几何。
输入与结果: 结构、与外部能量/受力程序交互的文件 → 约束优化路径和结构。
调用格式:
infdet [已设置的迭代参数]
属于高级机械不稳定相方法,通常由 robustrelax_vasp -id 驱动。-e* 控制内层,-i* 控制外层;调试用 -aex 不是材料算例。本文解释接口与参数,不把模板生成写成已算出失稳自由能。
展开本命令的完整参数表
INFlection DETection method 3.52, by Axel van de Walle
-h Display more help (Default: Off)
-egt=[real] Epicycle Gradient Tolerance (Default: 0.04)
-ets=[real] Epicycle Trial Step (Default: 0.1)
-ems=[real] Epicycle Maximum Step multiplier (Default: 5)
-eml=[real] Epicycle Multiplier in Line minimization (Default: 2)
-ebl=[int] Epicycle maximum number of Bracketing steps in Line minimizations (Default: 5)
-eil=[int] Epicycle maximum number of Iterations in Line minimizations (Default: 3)
-eic=[int] Epicycle maximum number of Iterations in Conjugate gradient (Default: 20)
-ebf=[int] Epicycle motion Bad step Forgiveness (Default: 2)
-eir=[int] Epicycle iterations between conjugate gradient reset (Default: 5)
-el=[real] Epicycle Length (Default: 0.1)
-ism=[real] Ion motion Steepest descent Multiplier (Default: 0.003)
-isi=[int] Ion motion Steepest maximum number of Iterations (Default: 0)
-igt=[real] Ion motion Gradient Tolerance (Default: 0.1)
-its=[real] Ion motion Trial Step (Default: 0.005)
-ims=[real] Ion motion Maximum Step multiplier (Default: 5)
-iml=[real] Ion motion Multiplier in Line minimization (Default: 2)
-ibl=[int] Ion motion maximum number of Bracketing steps in Line minimizations (Default: 5)
-iil=[int] Ion motion maximum number of Iterations in Line minimizations (Default: 3)
-iic=[int] Ion motion maximum number of Iterations in Conjugate gradient (Default: 40)
-ibf=[int] Ion motion Bad step Forgiveness (Default: 2)
-iir=[int] Ion motion iterations between conjugate gradient reset (Default: 5)
-ics=[real] Ion motion Curvature constraint Stiffness (0=automatic) (Default: 30)
-ff=[real] Force scale Factor (Default: 3)
-ds=[int] Dimension of the strain relaxation allowed (0: none, 1: along x, 2: along y,z, 3: along x,y,z (default))
-ns Do Not Scale tolerance with number of atoms (Default: Off)
-st=[int] Sleep Time between read access (Default: 5)
-d Use all default values (Default: Off)
-os Output Structure defined by epipos.out into str.out (Default: Off)
-r Relax to minimum (Default: Off)
For debugging only:
-db debug (Default: Off)
-aex Analytical Example (for debugging) (Default: Off)
-t1=[real] Temp param 1 (Default: 1.9)
-t2=[real] Temp param 2 (Default: -2)
CALPHAD 和图形转换
sqs2tdb
从预制 SQS、结构性质和组分模型构建 CALPHAD TDB。
输入与结果: species.in、所选数据库、结构性质、terms.in → 晶格模型及合并 TDB。
调用格式:
sqs2tdb -cp -l=FCC_A1 -lv=1
-cp 复制;-fit 拟合;-tdb 合并;-oc 提高 OpenCalphad 可移植性。首次复制/拟合会先创建需编辑的文件,按提示检查后重跑。只生成文件不代表数据库具有完整材料覆盖。
展开本命令的完整参数表
sqs2tdb version 3.52 by Axel van de Walle and with contributions to the SQS database
from Ruoshi Sun, Qijun Hong and Sara Kadkhodaei.
Usage: sqs2tdb [options] where the available options are:
-h : More help.
-cp : Copy SQS from the database to the current directory. Must specify:
-lv=[level]
level indicates how fine of composition mesh to use (0: only end members, 1: mid points, etc.)
-l=[lattice]
Available lattices
AUCD_B19
AUCD_B19.tar
AUCU_L10
BCC_A2
BETASN_A5
CDI2_C6
CHI_A12
CR3SI_A15
CSCL_B2
CUPRITE_C3
CUPT_B22
CUPT_L11
DIAMOND_A4
DUMMY
FCC_A1
FE3AL_D03
FLUORITE_C1
GA3PT5
GAMMA_L12
HCP_A3
HEUSLER_D022
HEUSLER_L21
LIQUID
MGCU2_C15
MGZN2_C14
NI3SN_D019
NI4MO_D1A
NIAS_D81
OMEGA_C32
PEROVSKITE_E21
PYRITE_C2
REO3_D09
ROCKSALT_B1
RUTILE_C4
SIGMA_D8B
WURTZITE_B4
ZINCBLENDE_B3
ZINTL_B32
ZIRCONIA_TET
Optional: -sp=Element,Element,... to indicate which elements to consider
(otherwise read from species.in if it exists).
-fit : Fit solution model from SQS energies (to be run within the desired lattice directory)
The -sro option can also be specified (with -fit) to include short-range order effects.
The -ew=[real] option (default: 5) lets you set the increased weight given to endmembers in the fit.
-tdb : Combine solution models from one or multiple lattices into a single .tdb file.
add the -oc (Open Calphad) option to generate a more portable tdb file.
-mk : Generate input file for SQS generation with mcsqs. (Usually not needed - only for experts.)
To be run in the SQS database directory:
/public/software/atat/3.52/gcc-13.3/8173m/share/atat/data/sqsdb/[lattice name]
Note that -h,-mk,-cp,-fit,-tdb are mutually exclusive.
For more information see user guide published in:
A. van de Walle, R. Sun, Q.-J. Hong, and S. Kadkhodaei.
Software tools for high-throughput calphad from first-principles data.
Calphad, 58:70, 2017.
https://doi.org/10.1016/j.calphad.2017.05.005
(Also, this paper should be cited in any publication resulting from this code's use.)
EXAMPLES
-> A simple session of sqs2tdb could be:
cp ~/atat/example/vasp.wrap .
emacs vasp.wrap #edit as needed
echo Al,Ni > species.in
sqs2tdb -cp -l=FCC_A1 -lv=1
sqs2tdb -cp -l=FCC_A1 -lv=1
cd FCC_A1
foreachfile wait pwd \; runstruct_vasp
sqs2tdb -fit
Edit the file terms.in to read
1,0
2,0
sqs2tdb -fit
cd ..
(repeat the above for other lattices if necessary)
sqs2tdb -tdb
The file AL_NI.tdb would contain a valid .tdb file.
-> In a more advanced example, the runstruct_vasp command could be replaced
by a job script submission containing the runstruct_vasp command.
-> When there are lattice instabilities, the runstruct_vasp could be replaced by
robustrelax_vasp -mk #this is to be run only once (see robustrelax_vasp -h for instructions)
robustrelax_vasp -id
-> If phonons are to be included (for end members) one could do:
foreachfile endmem pwd \; fitfc -si=str_relax.out -ernn=4 -ns=1 -nrr
foreachfile -d 3 wait \; runstruct_vasp -lu -w vaspf.wrap
where vaspf.wrap contains parameters for a static run to calculate forces.
foreachfile endmem pwd \; fitfc -si=str_relax.out -f -frnn=2
foreachfile endmem pwd \; robustrelax_vasp -vib
sqs2tdb -fit
OPTIONAL input files (to placed in the topmost directory):
exfromsgte.in : specify which phases should NOT be copied from SGTE database
(by default all phases for each relevant element are included,
but you may want to use ab initio data for virtual phase).
Phases are specified in the form: SGTE_[lattice]_[element]
e.g. SGTE_BCC_A2_AL
subref.sed : substitution rule (sed command to be applied to final tdb file)
OUTPUT FILES
In addition to the *.tdb files, there is some diagnostic info available in the files fit_[property].out where property could be
energy, svib_ht, etc.
ADVANCED FEATURES
In each sqs subdirectory created, there may be a file called link that contains the path to
another directory where energy data can be found. This is useful if another structure is
known be equivalent by symmetry. This file is created by default for equivalence within a
given structure type can even find symmetries across structure types.
You can also create the file yourself and the code will follow your link.
There may also be a file called bump which indicates that a structure must be moved up in energy by the
amount specified by the -bv option (or 5e-3 by default) to avoid degeneracy with an equivalent higher symmetry structure.
This file is created by default (during the -cp step) when the code detects higher symmetry (e.g. a GAMMA_L12 phase with all sites occupied
with the same type of atom is just FCC). You can delete this file if the higher-symmetry structure is not in your
set of structures. This file is read during the -fit step.
In summary, if you see a bump file, ask yourself if you have that structure elsewhere and put an appropriate link file.
If you don't have that structure elsewhere, you can delete the bump file.
The code will still work and give the right answer if you don't do this, but it will spend more computer time.
During the -fit step, one can specify the -sro option to include a low-order CVM approximation to the short range order.
One can also specify the weights used to enforce better fit of the end members with the -ew option (a weight of 10 is the default).
The default lower and upper temperature limits of 298.15K and 10000K can be changed with the -Tl=... and -Tu=... options, respectively.
This code now allows for the input free energies to general CALPHAD-compatible T-dependent functions. To use this feature, place your functions
in 'func' files and do not specify th 'energy' or 'svib_ht' files
(or specify the -jf option to force the code to ignore the 'energy' and 'svib_ht' files).
ocplotpd
调用 OpenCalphad 扫描平衡并组织相图网格/绘图。
输入与结果: TDB、组分与温度设置、外部 oc 命令及配置 → 平衡数据与图形文件。
调用格式:
ocplotpd -tdb=AU_CU.tdb -n=20 -T0=300 -T1=1500 -e=AU,CU
OpenCalphad 是外部依赖,ATAT 安装本身不提供这个求解器。先检查 ~/.ocplotpd 或程序旁配置,确认数据库完整性;不要把几何绘图样例当成已求解相图。
展开本命令的完整参数表
A front-end to OpenCalphad for PLOTting Phase Diagrams.
Usage: ocplotpd [-ha] [-nt] [-tlf=fraction] [-1f] [-vtk] [-rmax=r_max] [-rmin=r_min] [-np=nb_of_proc] -tdb=tdbfile -n=nb_of_samples -T0=min_temperature -T1=max_temperature -e=element,element,...
Mandatory parameters:
tdbfile: name of the Thermodynamic DataBase (TDB) file to use
element,element,... : a list of the elements (and associated phases) to extract from the TDB file
nb_of_samples: Number of phase equilibria sampled to generate the phase diagram
min_temperature: lower bound on the temperature axis
max_temperature: upper bound on the temperature axis (if min_temperature=max_temperature, a cross section is plotted)
optional parameters:
-ha: high accuracy calculations
-nt: no tie lines
-tlf: fraction of tie lines displayed (between 0.0 and 1.0)
-1f: generate a single gnuplot file
-vtk: generate vtk files (instead of gnuplot)
-rmax: max distance between points in triangulation
-rmin: discard points closer to each other than this cutoff
-np: launch nb_of_proc copies of opencalphad
-noc: do not run OpenCalphad - just create the graphs from the *.dat files
-nd: general n-dimensional phase diagram (generate input files for ndviewer - experimental)
-debug:do not delete temporary files
-mpi: use mpi for simplexize code (experimental)
mkaxes
生成 Gibbs 三角形/四面体等坐标轴和坐标变换。
输入与结果: 轴类型、标签、尺度或输入坐标 → 网格/变换结果。
调用格式:
mkaxes -tri -ef=bi > axes.bi
-tetra 四面体;-trans 坐标变换;-mat 矩阵;-ef 选 vtk/bi/stl 等导出。仅生成几何图件。
展开本命令的完整参数表
MaKe Axes 3.52, by Axel van de Walle
-h Display more help (Default: Off)
-trans Transform to coordinate system (Default: Off)
-mat Output transformation matrices (Default: Off)
-tri Gibbs triangle (Default: Off)
-tetra Gibbs tetrahedron (Default: Off)
-hidim=[int] Dimension (Default: 3)
-col=[real] Color (Default: 0)
-rgb=[real],... RGB Color (Default: )
-vl=[string] Vertices labels (Default: )
-zmax=[real] (Default: 1000)
-zmin=[real] (Default: 0)
-zscale=[real] (Default: 1000)
-cs Cross-Section (Default: Off)
-cf=[string] Cross section input File (Default: cut.in)
-font=[string] font file (Default: )
-ef=[string] Export format (default: vtk)
-sig=[int] Number of significant digits printed (Default: 5)
-d Use all default values (Default: Off)
simplexize
将点集或分段线转换成可绘图的单纯形/线网格。
输入与结果: tab.in 中的点和空行分段 → VTK、内置 bi 等网格。
调用格式:
simplexize -l -ef=bi > lines.bi
-l 连线;-tie 连系线;-rmax/-rmin 控制网格;-cs 截面。网格生成不包含相平衡物理求解。
展开本命令的完整参数表
Simplexize 3.52, by Axel van de Walle
-t=[string] Input table file (Default: tab.in)
-col=[real] Color (Default: 0)
-rgb=[real],... RGB Color (Default: )
-rmax=[real] Maximum radius of curvature (Default: 0.1)
-rmin=[real] Minimum distance between points kept (Default: 0.001)
-l Plot lines (Default: Off)
-tie Plot tie lines (Default: Off)
-tiew=[real] Tie line width (Default: 0.01)
-sig=[int] Number of significant digits printed (default: 5)
-ef=[string] Export format (default: vtk)
-cs Cross-Section (Default: Off)
-cf=[string] Cross section input File (Default: cut.in)
-h Display more help (Default: Off)
-d Use all default values (Default: Off)
triph
把温度—三元组分分支数据三角化为曲面。
输入与结果: tab.in 分段表格 → VTK/bi 等曲面。
调用格式:
triph -sc=1 -ef=vtk > surface.vtk
表格首列为唯一轴,后两列为三元组分坐标;-sc 缩放首轴,-bf 生成背面。输入必须已正确分支和排序。
展开本命令的完整参数表
TRIangulate PHase 3.52, by Axel van de Walle
-t=[string] Input table file (Default: tab.in)
-sc=[real] Scale for the unique axis (1st) (Default: 1000)
-col=[int] Color (Default: 0)
-nfn do Not fix Normal vector (Default: Off)
-bf generate back face (Default: Off)
-sig=[int] Number of significant digits printed (default: 5)
-ef=[string] Export format (default: vtk)
-h Display more help (Default: Off)
-d Use all default values (Default: Off)
3d2gnu
把 ATAT 内置三维网格转换成 gnuplot 绘图脚本。
输入与结果: -if 指定 bi 网格、视角/光照设置 → gnuplot 脚本。
调用格式:
3d2gnu -if=lines.bi > plot.gnu
-tc 设置终端和输出,-eye/-at/-up 调整视角。不能把任意 CSV 或 VTK 直接当成 bi 输入。
展开本命令的完整参数表
3D to GNUplot 3.52, by Axel van de Walle
-if=[string] Input table file (Default: tri.bi)
-tc=[string] set terminal command (Default: set term postscript eps color ; set out 'test.eps')
-eye=[real],... Eye position (Default: 0,-5,0)
-at=[real],... Lookat position (Default: 0,0,0)
-up=[real],... Up direction (Default: 0,0,1)
-fov=[real] Field of View (in degrees) (Default: 30)
-lit=[real],... Light direction (Default: 0,0.707107,-0.707107)
-amb=[real] Ambiant light level (Default: 0.5)
-h Display more help (Default: Off)
-d Use all default values (Default: Off)
任务组织和 MPI
pollmach
监控 wait/busy 等文件并向可用计算环境派发命令。
输入与结果: 结构目录、任务命令、可选机器列表 → 计算启动与状态标记。
调用格式:
pollmach -e -m .local-only runstruct_vasp
不存在的显式机器文件用于限定本地顺序模式;-e 无任务即结束;-il 交互循环;-w 等子进程;stoppoll 正常停。集群中应在 Slurm 已分配资源内使用,不配置越过调度的机器列表。
展开本命令的完整参数表
Syntax: pollmach [-f] [-e] [-m alternate_machine_configuration_file] [-s] [-w] command_to_run
This command periodically checks the load on various machines
(specified in the file ~/.machines.rc)
and looks for subdirectories containing a file called "wait".
If the load on a machine is sufficiently low, it executes command_to_run
on that machine, in the directory where the oldest wait file lies.
A default ~/.machines.rc file is created the first time the chl command
is run. The format of the file is explained in the comments therein.
If no ~/.machines.rc file exists, command_to_run is run sequentially on
the local computer in each directory containing a "wait" file.
This is the single-machine mode.
When using this command with maps, command_to_run will typically be runstruct_vasp
The -m option overrides the default ~/.machines.rc (it is optional).
The -e option specifies that the command should terminate when no more
"wait" files are to be found (only works in single-machine (sequential) mode,
when no ~/.machines.rc file is given).
The -f option forces the command to run even if of pollmach_is_running file exists.
The -s option cause pollmach to self-manage the load (it does not poll the nodes for their loads
but instead keeps track of where it sends a job and does not send any other job to that node until it is done.
The first column in the machine_configuration_file is ignored and can be omitted.
The -w option tells pollmach to wait until all sub processes have finished before quitting.
The -il interactive loop option (beta). Here pollmach waits for a file called 'busy' to be created,
then runs command and then deletes 'busy'.
This repeats itself until a stop or stoppoll file is created.
The -t "command" option first runs "command" and, only if its return code is 0, runs command_to_run.
To cleanly stop this program, type
touch stoppoll
chl
按照机器配置中的命令查询负载。
输入与结果: -m 配置或 ~/.machines.rc → 负载与运行前缀列表。
调用格式:
chl -m machines.test
配置中的命令会被执行。旧式多机管理工具,常规集群任务使用 Slurm;随文仅用本地固定输出演示格式。首次缺配置可能创建默认文件。
minload
从负载配置中选择当前最低负载对应的命令前缀。
输入与结果: 同 chl → 命令前缀或 none。
调用格式:
minload -m machines.test
-w 等待可用条目。不会替你申请 Slurm 资源;不能拿它在未分配节点上启动生产计算。
展开本命令的完整参数表
Syntax: minload [-m alternate_machine_config_file] [-w]
Returns the command prefix needed to run a command on the remote
machine having the minimum load, among the
machines listed in the ~/.machines.rc file
(or as specified by the -m option).
A default ~/.machines.rc file is created the first time
the chl command is run and the file format is described
in the comments therein.
node
在远端同一路径执行命令的旧式包装。
输入与结果: 主机、命令,可选复制设置 → 远端执行结果。
调用格式:
node -s user@host command
-s 使用 SSH;-r 复制当前目录后执行。需要明确的远程访问和计算资源权限。本文常规工作流使用 Slurm,不依赖该命令派发科学计算。
展开本命令的完整参数表
This command is basically like rsh, except that the command
makes sure that the current directory on the remote machine
is the same as on the local machine.
(If the two machines do not share the same disk space, use the -r option.)
Syntax: node [-s] [-r] user@host command
-s: use ssh instead of rsh
-r: copy files in current directory to remote host before running command
if user is the same on remote host, use may use
node [-s] [-r] host command
atat-mpigenstr
集群的 MPI 结构枚举入口。
输入与结果: Slurm 核数和 genstr 参数 → 枚举结构。
调用格式:
atat-mpigenstr -n=4 > genstr.out
包装 libexec/mpi/mpigenstr,自动选择独立 OpenMPI。不要再次 mpirun;不代表每个小枚举任务都会因 MPI 更快。
atat-mpimmaps
集群的 MPI 多元簇展开入口。
输入与结果: Slurm 分配和 mmaps 输入 → 拟合与结构选择结果。
调用格式:
atat-mpimmaps -d
包装底层 mpimmaps,状态文件约定与 mmaps 一致。不要与正在工作的串行 mmaps 共用一个计算目录。
atat-dispatch
动态分配命令列表给 MPI 工作进程。
输入与结果: Slurm 分配、每行一条命令的文件 → 各命令结果。
调用格式:
atat-dispatch jobs.in
底层 dispatch 使用一个调度进程,其余为执行进程,所以至少需要两个 rank。每个子命令自身并行时要防止总核数超出分配。命令列表应可信且以换行结束。
splitjob
按行号轮转分配命令列表给各 MPI rank。
输入与结果: 每行一条命令的文件 → 各条目执行结果。
调用格式:
mpirun -np 2 splitjob jobs.in
需要与其构建匹配的 OpenMPI 环境,外部 mpirun 是必要的。与 dispatch 不同,它是静态划分;不能指望空闲 rank 动态接手长任务。空行可能结束列表读取,没有通用 -h 模式。
文本和批量处理
calc
用 awk 计算一条数值表达式。
输入与结果: 带引号的表达式 → 数值。
调用格式:
calc "2+3*4"
使用 awk 运算函数和语法;浮点结果并非任意精度。表达式参数应加引号,避免 shell 提前解释。
展开本命令的完整参数表
Syntax: calc "mathematical expression"
getvalue
从文本中提取指定标签后的数值。
输入与结果: 标签和标准输入 → 每次匹配后的数值。
调用格式:
getvalue F < OSZICAR
标签与数值间可有等号、冒号或空白。必要时再取最后一行,避免把中间 SCF 值当最终值。
展开本命令的完整参数表
Syntax: getvalue [label]
Script that scans standard input for a given label and
write, to standard output, the numerical value following
every occurence of that label.
Any number of : = spaces or tabs can separate the label and the number.
Example: getvalue "Final energy" < gulp.output
getlines
选取某个标记之前、之后或两个标记之间的文本。
输入与结果: 选项、一个或两个标记、标准输入 → 选定行。
调用格式:
getlines -jbt BEGIN END < text.in
-af 后面;-bf 前面;-bt 中间;j 前缀排除边界标记行。标记中的空格和正则字符需要合适引用。
展开本命令的完整参数表
Syntax: getlines [-h] [ -af | -bf | -bt | -jaf | -jbf | -bt ] string1 string2
Copies selected lines of standard input to standard output.
-h print this help.
-af print all lines located *after* a line containing string1
-bf print all lines located *before* a line containing string1
-bt print all lines located between a line containing string1 and a line containing string2
(If there are multiple blocks of lines braketed by [begin string]
and [end string] they are all copied.)
The prefix j means "just", indicating that the line(s) containing the matching string(s) is (are) ommited.
Don't forget to quote your strings if they contain spaces.
blanktonl
把连续空白分隔的项目转换为逐行输出。
输入与结果: 标准输入 → 每个字段一行。
调用格式:
blanktonl < row.txt
用于处理短数值列表;会改变排版,不应直接用于需要保留列结构的完整科学文件。
nltoblank
把换行列表连接成一行。
输入与结果: 标准输入 → 空格分隔文本。
调用格式:
nltoblank < column.txt
这是轻量文本脚本,不是通用 CSV 解析器;不要用于含特殊格式控制符的任意字符串。
fixeol
转换文本换行符。
输入与结果: 标准输入或文件列表 → Unix/Windows 换行文本。
调用格式:
fixeol -u windows.txt
-u 转 Unix;-p 转 PC/DOS。指定文件时会创建 .bak 并写回原名,先确认文件范围;避免把二进制文件传入。
lookup
从当前目录向上查找同名文件。
输入与结果: 文件名 → 首个找到的相对路径。
调用格式:
lookup vasp.wrap
查找深度由当前脚本限定,最多尝试六个位置;它只返回路径,不读取或修改文件。
foreachfile
在含指定文件的子目录逐个执行命令。
输入与结果: 目标文件名和命令 → 各目录的执行输出。
调用格式:
foreachfile energy cat energy
-e 跳过 error,-n 跳过另一个文件,-a 要求另一个文件存在,-d 控制深度。带多个命令时注意分号引用;先 foreachfile 文件 pwd 检查范围。
展开本命令的完整参数表
Syntax: foreachfile [-e] [-n filename_to_skip] [-a and_filename] [-d depth] filename command
Execute the specified command in every first-level subdirectory containing the file filename.
The -e option cause foreachfile to skip directories containing the file "error".
The -n option cause foreachfile to skip directories containing the file filename_to_skip.
The -a option specifies that the file and_filename must also exist.
The -d option specifies to go down to lower level subdirectories as well (the default is 1).
MPI 底层名称与上游附加接口
| 底层程序 | 常用入口 | 关系 |
|---|---|---|
mpigenstr |
atat-mpigenstr |
相同 MPI 枚举程序,后者配置本集群运行环境 |
mpimmaps |
atat-mpimmaps |
相同 MPI 多元拟合程序,后者处理调度核数与 MPI |
dispatch |
atat-dispatch |
相同动态派发程序,后者是集群包装 |
splitjob |
splitjob |
已经在 78 个入口中列出,由匹配的 MPI 启动 |
底层程序保存在 ATAT 安装前缀的 libexec/mpi。一般用户优先使用现行作业模板;底层 MPI 程序的存在不表示任意 MPI 版本都能混用。
上游还附有 Quantum ESPRESSO、ABINIT、CASTEP 等接口脚本,以及未安装到当前 PATH 的开发工具。这些不属于本模块的 78 个命令入口,也不能据此声称本集群已配置对应的端到端工作流。切换能量程序时,关键是保持结构、能量单位、原子顺序、受力格式与统计模型一致。
原始参数清单来源:ATAT 3.52 本机程序输出;作者 Axel van de Walle 及各工具贡献者。中文说明为鸢算科技独立编写,算法出处与引用见完整教程。
