上一篇文章主要介绍了thermo以及thermo_style默认显示形式,如果需要在屏幕输出自定义的数据,需要用到thermo_style custom命令。
thermo_style custom命令格式为:
thermo_style custom 输出量1 输出量2 输出量3 ……
能够在thermo_style custom命令中输出的量不仅包含系统已经定义好的变量,还包括通过compute、fix、variable等命令生成的自定义变量。
主要有:
step, elapsed, elaplong, dt, time,
cpu, tpcpu, spcpu, cpuremain, part, timeremain,
atoms, temp, press, pe, ke, etotal,
evdwl, ecoul, epair, ebond, eangle, edihed, eimp,
emol, elong, etail,
enthalpy, ecouple, econserve,
vol, density, lx, ly, lz, xlo, xhi, ylo, yhi, zlo, zhi,
xy, xz, yz, xlat, ylat, zlat,
bonds, angles, dihedrals, impropers,
pxx, pyy, pzz, pxy, pxz, pyz,
fmax, fnorm, nbuild, ndanger,
cella, cellb, cellc, cellalpha, cellbeta, cellgamma,
c_ID, c_ID[I], c_ID[I][J],
f_ID, f_ID[I], f_ID[I][J],
v_name, v_name[I]
例如,每100步在屏幕上输出步数(step)、稳定(temp)、压力(press)、势能(pe)、体积(vol),三个方向尺寸(lx ly lz)可以写为:
thermo 100
thermo_style custom step temp press pe vol lx ly lz
显示结果如下:
thermo命令不仅把数据显示到屏幕上,同时把显示数据保存到log.lammps中,便于后期进行数据处理。
打开log.lammps文件,找到输出数据部分,复制到绘图软件即可。
更多lammps教程,关注公众号:lammps加油站