上一篇文章(​​thermo命令详解​​)主要介绍了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]

lammps教程:模拟量实时显示之thermo_style custom命令详解(2)_自定义

例如,每100步在屏幕上输出步数(step)、温度(temp)、压力(press)、势能(pe)、体积(vol),三个方向尺寸(lx ly lz)可以写为:


thermo 100
thermo_style custom step temp press pe vol lx ly lz

显示结果如下:

lammps教程:模拟量实时显示之thermo_style custom命令详解(2)_微信公众号_02

thermo命令不仅把数据显示到屏幕上,同时把显示数据保存到log.lammps中,便于后期进行数据处理。

lammps教程:模拟量实时显示之thermo_style custom命令详解(2)_数据_03

打开log.lammps文件,找到输出数据部分,复制到绘图软件即可。


END


不定期分享lammps小技巧,敬请扫码关注微信公众号:lammps加油站。

lammps教程:模拟量实时显示之thermo_style custom命令详解(2)_自定义_04