22. Lammps命令学习-7之read_restart

来源: “码农不会写诗”公众号
链接:Lammps命令学习-7之read_restart

read_restart file

  从restart文件中读取先前保存的系统配置从而可以继续先前的模拟。
  https://docs.lammps.org/read_restart.html


Syntax

read_restart file

Description
从restart文件中读取先前保存的系统配置从而可以继续先前的模拟。

此操作会重新创建模拟盒,包括其中所有的原子及其属性,以及一些相关的全局设置,所有这些设置会跟前一次模拟写入restart文件时一样。

read_restart file
  • file = name of binary restart file to read in

restart文件是二进制格式,可以使用lammps命令行-r2data参数将restart文件转换为data文件。
例如在以下情况都可以将其转化为data文件后使用:1. 在不同机器运行模拟,二进制文件可能无法通用时;2. 利用其他软件进行可视化或进行如原子筛选等后处理时。

lmp -h  # 查看lammps可执行文件帮助信息

通过以下命令之一可将restart文件(file.restart)转换为data文件(file.data)。

lmp -restart2data file.restart file.data
lmp -r2data file.restart file.data

以下是restart文件中已经存储的信息,即这些量在读取restart文件时,输入脚本中不需要重新指定。当然了,在读取restart文件后,可以重新定义这些设置中的许多项,比如将timestep重新设置为0等。

  • units
  • newton bond
  • atom style and atom_modify settings id, map, sort
  • comm style and comm_modify settings mode, cutoff, vel
  • simulation box size and shape and boundary settings
  • atom group definitions
  • per-type atom settings such as mass
  • per-atom attributes including their group assignments and molecular topology attributes (bonds, angles, etc)
  • force field styles (pair, bond, angle, etc)
  • force field coefficients (pair, bond, angle, etc) in some cases (see below)
  • pair_modify settings, except the compute option
  • special_bonds settings

以下是restart文件中未存储的信息,即在读取restart文件之后,必须在输入脚本中重新执行相关命令。

  • newton pair
  • fix commands
  • compute commands
  • variable commands
  • neighbor list criteria including neigh_modify settings
  • kspace_style and kspace_modify settings
  • info for thermodynamic, dump, or restart output

简而言之,与系统配置相关的信息会存储在restart文件中,否则将需要重新定义或设置。

关于更细节的知识,本系列不会用到,姑且不细讲,以后有机会再共同探讨。

Example

read_restart save.10000
read_restart restart.*

Default
none


书山有路勤为径,学海无涯苦作舟。今天就到这里啦,拜了个拜~

上一篇:Lammps命令学习-6之read_data
下一篇:Lammps命令学习-8之read_dump

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

码农不会写诗

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

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

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

打赏作者

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

抵扣说明:

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

余额充值