LAMMPS中的默认变量

LAMMPS中的默认变量

    step = timestep
    elapsed = timesteps since start of this run
    elaplong = timesteps since start of initial run in a series of runs
    dt = timestep size
    time = simulation time
    cpu = elapsed CPU time in seconds since start of this run
    tpcpu = time per CPU second
    spcpu = timesteps per CPU second
    cpuremain = estimated CPU time remaining in run
    part = which partition (0 to Npartition-1) this is
    timeremain = remaining time in seconds on timer timeout.
    atoms = # of atoms
    temp = temperature
    press = pressure
    pe = total potential energy
    ke = kinetic energy
    etotal = total energy (pe + ke)
    enthalpy = enthalpy (etotal + press*vol)
    evdwl = van der Waals pairwise energy (includes etail)
    ecoul = Coulombic pairwise energy
    epair = pairwise energy (evdwl + ecoul + elong)
    ebond = bond energy
    eangle = angle energy
    edihed = dihedral energy
    eimp = improper energy
    emol = molecular energy (ebond + eangle + edihed + eimp)
    elong = long-range kspace energy
    etail = van der Waals energy long-range tail correction
    vol = volume
    density = mass density of system
    lx,ly,lz = box lengths in x,y,z
    xlo,xhi,ylo,yhi,zlo,zhi = box boundaries
    xy,xz,yz = box tilt for triclinic (non-orthogonal) simulation boxes
    xlat,ylat,zlat = lattice spacings as calculated by lattice command
    bonds,angles,dihedrals,impropers = # of these interactions defined
    pxx,pyy,pzz,pxy,pxz,pyz = 6 components of pressure tensor
    fmax = max component of force on any atom in any dimension
    fnorm = length of force vector for all atoms
    nbuild = # of neighbor list builds
    ndanger = # of dangerous neighbor list builds
    cella,cellb,cellc = periodic cell lattice constants a,b,c
    cellalpha, cellbeta, cellgamma = periodic cell angles alpha,beta,gamma
LAMMPS(Large-scale Atomic/Molecular Massively Parallel Simulator),`compute stress`主要用于计算系统的应力张量,这是一个3x3的矩阵,表示了各个方向的应力。默认情况下,`compute stress`的结果会在`thermo_style`的输出显示出来,但并不包含作为原子尺度矢量的形式。 如果你需要将`compute stress`的结果以每个原子的力场矢量的形式存储在dump文件,你可以这样做: 1. 首先,在你的input文件添加一个新的`dump`命令,指定你想保存的位置和格式。例如,假设你想在每一步模拟后都将原子位置和应力矢量一起保存到一个名为"my.dump"的二进制文件: ```lmpscript dump my.dump all custom 1000 binary "positions_stress.bin" ``` 这里的`all`指所有粒子,`custom`表明自定义内容,`1000`是写入频率,`binary`指定二进制格式。 2. 然后,使用`variable`来创建一个新的变量,以便储存原子坐标和每个原子的应力矢量分量。例如,你可以创建三个变量`stress_xx`, `stress_yy`, 和 `stress_zz`分别对应于x、y、z方向的主应力: ```lmpscript variable stress_xx = c_stress[0][0] variable stress_yy = c_stress[1][1] variable stress_zz = c_stress[2][2] # 如果你想计算切应力,还可以创建更多变量 variable shear_xy = c_stress[0][1] / 2.0 variable shear_xz = c_stress[0][2] / 2.0 variable shear_yz = c_stress[1][2] / 2.0 ``` 这里`c_stress`是你之前定义的计算应力的`compute`名称,如`compute stress/atom`。 3. 最后,在`dump my.dump`的`variable`部分,添加你刚刚创建的变量名,格式化成你想要的矢量形式。例如: ```lmpscript dump my.dump all custom 1000 binary "positions_stress.bin" position 1 id type stress_xx stress_yy stress_zz shear_xy shear_xz shear_yz ``` 请注意,这将把每个原子的信息都存储下来,可能会占用大量磁盘空间。同时,你可能需要额外处理这些数据以提取出所需的信息。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Mr. Material

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值