lammp中文手册(6)

来源:网络收集 时间:2025-08-15 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xuecool-com或QQ:370150219 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

c_ID[] per?atom scalar from a per?atom compute c_ID[][M] per?atom vector component from a per?atom compute 对于变量的引用说明如下表。 v_ID scalar value of a non atom?style variable v_ID[N] single atom's scalar value from an atom?style variable v_ID[] per?atom value from an atom?style variable

next variables

next x

next a t x myTemp

给变量指派下一个值,如果后面接多个变量,这几个变量必须是同一类型的变量。 如果next后面的变量用尽了,将导致跳过下一个jump命令。 variable d index run1 run2 run3 run4 run5 run6 run7 run8 shell cd $d read_data data.polymer run 10000 shell cd .. clear next d jump in.polymer

jump file label

转到别的输入文件,如果含label就会跳转到文件的label中。如果label不存在,将终止计算。 注意和include不同,跳过去后,不回返回到原来文件处继续执行。

对于loop变量,当变量值通过next都使用完了,会跳过下一个jump命令。

label string

定义某行为一个标签。用于jump命令。 variable a loop 10 label loop dump 1 all atom 100 file.$a run 10000 undump 1 next a jump in loop 双重循环: label loopa variable a loop 5 label loopb variable b loop 5 print \run 10000 if $b > 2 then \next b jump in loopb label break variable b delete next a jump in loopa

if value1 operator value2 then command1 else command2

if ${steps} > 1000 then exit

if $x <= $y then \if ${eng} > 0.0 then \

26

if ${eng} > ${eng_previous} then \value1 = 1st value

operator = \\ value2 = 2nd value then = required word

command1 = command to execute if condition is met else = optional word

command2 = command to execute if condition is not met (optional argument) 如果命令不是有效的lammps命令,将会导致程序终止。比如exit。

include filename

插入别的输入文件,类似于Fortran。

文件名可以是变量,这样可以 用于不同处理器计算不同任务。可以设计用于循环。

shell cd/mkdir/mv/rm/rmdir

shell cd sub1 shell cd ..

shell mkdir tmp1 tmp2 tmp3 shell rmdir tmp1

shell mv log.lammps hold/log.1 shell rm TMP/file1 TMP/file2

Linux shell,执行基本的linux命令。

lammps不会检测是否执行成功,以及错误信息。

10. 模拟方法论

缺陷的生成

# vacancy

region 1 sphere 0 0 0 0.01 delete_atoms region 1 # interstitial

create_atoms 2 single 0 0 0 # substitutional set atom 1 type 2

或者: vacancy + interstitial

晶格常数

variable i loop 100

variable latcont equal 4.0+$i*0.001 lattice fcc ${latcont} minimize 1e-8 1e-8 100 1000

关键原理:做一个循环,计算不同晶格常数下体系的能量,最低的就是稳定结构。

迁移

方法一:fix ID group?ID setforce fx fy fz,设置原子在迁移方向的力为0 1. 间隙原子从四面体间隙途径八面体间隙迁移至四面体间隙 lattice bcc 3.1650

create_atoms 2 single $x 0.5 0.0

27

fix 2 diffusion setforce 0.0 NULL NULL

关键原理:设置迁移原子X方向的力为0,让其只能在yz平面移动。 2. 间隙原子从四面体间迁移至四面体间隙

lattice bcc 3.165 orient x 1 1 0 orient y -1 1 0 orient z 0 0 1 create_atoms 2 single $x 0.5 0.0

fix 2 diffusion setforce 0.0 NULL NULL

关键原理:变换点阵的基矢,逆顺时针转45度,这样可以保证迁移方向为x方向。再设置x方向力为0。 方法二:fix ID group?ID planeforce x y z,设置原子只能在某个平面内移动。

表面

(100)表面

boundary p p fm lattice bcc 3.165 (110)表面

lattice bcc 3.165 orient x -1 1 0 orient y 0 0 1 orient z 1 1 0 (112)表面

lattice bcc 3.165 orient x -1 1 0 orient y -1 -1 1 orient z 1 1 2

关键原理:设置Z方向为非周期性边界条件。变换点阵的基矢,使Z轴垂直于表面。

28

百度搜索“70edu”或“70教育网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,70教育网,提供经典综合文库lammp中文手册(6)在线全文阅读。

lammp中文手册(6).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.70edu.com/wenku/346812.html(转载请注明文章来源)
Copyright © 2020-2025 70教育网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:370150219 邮箱:370150219@qq.com
苏ICP备16052595号-17
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:7 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219