24小时热门版块排行榜    

查看: 2168  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 国社科又开始会评了,不知道这次命运如何 +7 雨打竹帘 2026-08-30 11/550 2026-08-31 23:16 by hittle2008
[公派出国] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +3 EZ67DG6CvcKL 2026-08-31 3/150 2026-08-31 22:22 by o3EMxHUAQDtS
[基金申请] 投票:  有多少人是今天查系统知道结果的? +17 爱看书的可乐 2026-08-26 19/950 2026-08-31 21:30 by xiangy672
[基金申请] 哪位高人中了,把查询到的截图贴出来让我看看,让我长长见识 +6 yuleib84 2026-08-26 7/350 2026-08-31 19:46 by 鱼翔浅底1
[基金申请] 能否申诉? +7 echo8914667 2026-08-30 8/400 2026-08-31 17:00 by yihongxu
[文学芳草园] 梦想 +5 myrtle 2026-08-26 5/250 2026-08-31 14:40 by hahaboy
[基金申请] 基金不中,共勉 +12 eulota 2026-08-26 12/600 2026-08-31 08:42 by ZJTJZ
[基金申请] 我就是申请一个面上项目而已,这评审意见是按照杰青的条件评的吧? +6 gouxfjh 2026-08-28 11/550 2026-08-30 07:57 by gouxfjh
[基金申请] 国自然面上复盘~欢迎讨论 (金币+15) +15 晴天加油 2026-08-26 16/800 2026-08-29 18:28 by symmetry
[基金申请] 国自然评审意见 +13 wangmingqi 2026-08-28 19/950 2026-08-29 10:22 by Poppy1104
[基金申请] 基金系统什么内容也没有 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
[基金申请] 面上合作单位盖章 +5 ssyjh 2026-08-27 5/250 2026-08-27 20:50 by gdfollow
[基金申请] 看板上这么多中的,有点像50人群里49个人都是骗子的那种感觉…… +5 a089 2026-08-26 6/300 2026-08-27 14:05 by jonewore
[基金申请] 怎么看青基中了没有啊 +5 叶九微 2026-08-26 5/250 2026-08-27 10:35 by l_zh2008
[基金申请] 为什么 国际(地区)合作与交流项目 没有放榜? 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
[基金申请] 今天务委会开完了,明天出结果吗 +19 angus9576 2026-08-25 23/1150 2026-08-26 10:03 by zp519
[基金申请] 牛来!米来!面来! +8 beefly 2026-08-26 8/400 2026-08-26 08:37 by xuzhipiao
[基金申请] 在坚冰还盖着北海的时候,我看到了怒放的梅花。 (金币+10) +6 ziyangfang 2026-08-25 9/450 2026-08-25 20:26 by huagongfeihu
信息提示
请填处理意见