24小时热门版块排行榜    

查看: 2169  |  回复: 0

ytudou

银虫 (小有名气)

[求助] 运行金刚石晶格常数计算的脚本出错,请教~

网上能人给出的计算金刚石晶格常数的程序:
# This input script is used to calculate
# the lattice constant of diamond
# Powered by Xianbao Duan
# Email: xianbao.d@gmail.com
# Website: http://www.52souji.net/

units           metal
boundary        p p p
atom_style      atomic

variable        i loop 20
#variable       x equal 2.5+0.1*$i
variable        x equal 3.5+0.01*$i

# build the model
lattice         diamond $x
region          box block 0 10 0 10 0 10
create_box      1 box
create_atoms    1 box

# specify the potential
pair_style      tersoff
pair_coeff      * * SiC.tersoff C
mass            1 12

variable        n equal count(all)
variable        P equal pe/$n
#variable       v equal vol

timestep        0.005
thermo          10

# minimize the total energy
min_style       cg
minimize        1.0e-12 1.0e-12 1000 1000

print           "@ $x $P"

# loop
clear
next            i
jump            in.diamond

帖子地址:http://www.52souji.net/how-to-ca ... stant-using-lammps/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
下面是我操作的返回信息+我是将in文件内容直接粘贴到双击打开的lmp_serial里运行得……
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


LAMMPS (11 Sep 2014-ICMS)
WARNING: OMP_NUM_THREADS environment is not set. (../comm.cpp:88)
  using 1 OpenMP thread(s) per MPI task
units         metal
boundary      p p p
atom_style    atomic

variable      i loop 20
variable      x equal 3.5+0.01*$i
variable      x equal 3.5+0.01*1

lattice       diamond $x
lattice       diamond 3.51
Lattice spacing in x,y,z = 3.51 3.51 3.51
region        box block 0 10 0 10 0 10
create_box    1 box
Created orthogonal box = (0 0 0) to (35.1 35.1 35.1)
  1 by 1 by 1 MPI processor grid
create_atoms  1 box
Created 8000 atoms

pair_style    tersoff
pair_coeff    * * SiC.tersoff C
mass          1 12

variable      n equal count(all)
variable      P equal pe/$n
variable      P equal pe/8000

timestep      0.005
thermo        10

min_style     cg
minimize      1.0e-12 1.0e-12 1000 1000
WARNING: Resetting reneighboring criteria during minimization (../min.cpp:168)
Memory usage per processor = 3.60593 Mbytes
Step Temp E_pair E_mol TotEng Press
       0            0   -58806.339            0   -58806.339    221109.42
       1            0   -58806.339            0   -58806.339    221109.42

Loop time of 0.253015 on 1 procs for 1 steps with 8000 atoms
98.7% CPU use with 1 MPI tasks x 1 OpenMP threads

Minimization stats:
  Stopping criterion = energy tolerance
  Energy initial, next-to-last, final =
        -58806.3394422     -58806.3394422     -58806.3394422
  Force two-norm initial, final = 1.42961e-011 1.52336e-009
  Force max component initial, final = 2.65066e-013 2.7639e-011
  Final line search alpha, max atom move = 1 2.7639e-011
  Iterations, force evaluations = 1 1

MPI task timings breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 0.25201    | 0.25201    | 0.25201    |   0.0 | 99.60
Neigh   | 0          | 0          | 0          |   0.0 |  0.00
Comm    | 7.4739e-008| 7.4739e-008| 7.4739e-008|   0.0 |  0.00
Output  | 0          | 0          | 0          |   0.0 |  0.00
Modify  | 0          | 0          | 0          |   0.0 |  0.00
Other   |            | 0.001      |            |       |  0.40

Nlocal:    8000 ave 8000 max 8000 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost:    6725 ave 6725 max 6725 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs:    0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
FullNghs:  368000 ave 368000 max 368000 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 368000
Ave neighs/atom = 46
Neighbor list builds = 0
Dangerous builds = 0

print         "@ $x $P"
@ 3.51 -7.35079243027224

clear
WARNING: OMP_NUM_THREADS environment is not set. (../comm.cpp:88)
  using 1 OpenMP thread(s) per MPI task
next          i
jump          in.diamond


+++++++++++++++++++++++++++++++++++++++++++++++++
请问,1 运行方式是不是有误?
             是运行窗口lmp_serial -in in.diamond?
             还是运行窗口lmp_serial<in.diamond?
             还是复制粘贴到打开的lmp_serial?
          2  帖子说让把@开头的对象提取出来,可运行后的log里@行只有一行?
在线等解答~~~
             是只循环了一次吗?为什么in文件末尾的循环语句没起作用呢?
     求指导~~~~~~


或者邮箱联系;  ytudou@yeah.net
回复此楼
要给力啊,MS~LAMMPS~
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

相关版块跳转 我要订阅楼主 ytudou 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 投票:  有多少人是今天查系统知道结果的? +17 爱看书的可乐 2026-08-26 19/950 2026-09-02 00:19 by xiangy672
[基金申请] 面上函评意见出来了,像什么等级? 20+4 Tsingking1 2026-08-27 17/850 2026-09-01 19:51 by 超级无敌华子
[文学芳草园] 梦想 +5 myrtle 2026-08-26 7/350 2026-09-01 15:18 by myrtle
[基金申请] 学科评审组评审是指会评吗? +4 瞬息宇宙 2026-08-31 4/200 2026-09-01 14:58 by jiaoxg
[基金申请] 麻烦专家们看看评委们的意见(F口面上) +7 gdd2018 2026-08-28 12/600 2026-09-01 08:32 by 尼古拉斯小虫
[基金申请] 国社科又开始会评了,不知道这次命运如何 +7 雨打竹帘 2026-08-30 11/550 2026-08-31 23:16 by hittle2008
[基金申请] 面上意见出来了 +12 黄鸟于飞Chao 2026-08-29 23/1150 2026-08-31 18:57 by 黄鸟于飞Chao
[基金申请] 能否申诉? +7 echo8914667 2026-08-30 8/400 2026-08-31 17:00 by yihongxu
[基金申请] 基金不中,共勉 +12 eulota 2026-08-26 12/600 2026-08-31 08:42 by ZJTJZ
[基金申请] 为什么到现在没收到通知? +5 tannykie 2026-08-29 5/250 2026-08-30 21:05 by purplejack
[基金申请] 有没有仍没收到信息的 +7 德尚中行 2026-08-27 8/400 2026-08-30 20:52 by purplejack
[基金申请] 2026年叶企孙基金 +4 bud_bud 2026-08-27 7/350 2026-08-29 07:23 by foolishmani
[基金申请] 系统查不到 +11 董八千 2026-08-26 11/550 2026-08-28 18:06 by Leogzhya
[基金申请] 基金系统什么内容也没有 30+4 winsaint 2026-08-27 9/450 2026-08-28 11:06 by maolC
[基金申请] 怎么查啊 +6 huang1991js 2026-08-26 6/300 2026-08-28 08:42 by winsaint
[基金申请] 为什么 国际(地区)合作与交流项目 没有放榜? 10+3 majunge000 2026-08-26 11/550 2026-08-27 08:42 by 北京莱茵编辑
[基金申请] 我不理解! +15 Edward_pc 2026-08-26 23/1150 2026-08-26 20:34 by zzuzxg
[基金申请] 国际合作可查了,中了面上 (EPI+1)(金币+50) +18 Ldrop2023 2026-08-26 18/900 2026-08-26 11:15 by cmrandy
[基金申请] 国合可查了 +3 paperzjh 2026-08-26 3/150 2026-08-26 10:41 by LemmonTr
[基金申请] 牛来!米来!面来! +8 beefly 2026-08-26 8/400 2026-08-26 08:37 by xuzhipiao
信息提示
请填处理意见