24小时热门版块排行榜    

查看: 2117  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 材料与化工085600,总分304,本科有两篇sci参与,求调剂 +4 幸运的酱酱 2026-03-22 5/250 2026-03-22 20:15 by edmund7
[考研] 一志愿华中农业071010,总分320求调剂 +5 困困困困坤坤 2026-03-20 6/300 2026-03-22 17:41 by hxsm
[考研] 287求调剂 +8 晨昏线与星海 2026-03-19 9/450 2026-03-22 17:01 by i_cooler
[考研] 一志愿东华大学化学070300,求调剂 +6 2117205181 2026-03-21 7/350 2026-03-22 14:59 by allen-yin
[考研] 285求调剂 +6 ytter 2026-03-22 6/300 2026-03-22 12:09 by 星空星月
[考研] 化学调剂 +5 yzysaa 2026-03-21 5/250 2026-03-21 22:12 by peike
[考研] 0805 316求调剂 +3 大雪深藏 2026-03-18 3/150 2026-03-21 18:55 by 学员8dgXkO
[考研] 297求调剂 +3 喜欢还是不甘心 2026-03-20 3/150 2026-03-21 18:33 by 学员8dgXkO
[考研] 336求调剂 +5 rmc8866 2026-03-21 5/250 2026-03-21 17:24 by 学员8dgXkO
[考研] 279分求调剂 一志愿211 +14 chaojifeixia 2026-03-19 15/750 2026-03-21 13:24 by zhukairuo
[考研] 301求调剂 +10 yy要上岸呀 2026-03-17 10/500 2026-03-21 03:14 by JourneyLucky
[考研] 083200学硕321分一志愿暨南大学求调剂 +3 innocenceF 2026-03-17 3/150 2026-03-21 02:35 by JourneyLucky
[考研] 一志愿中国石油大学(华东) 本科齐鲁工业大学 +3 石能伟 2026-03-17 3/150 2026-03-21 02:22 by JourneyLucky
[考研] 304求调剂 +6 曼殊2266 2026-03-18 6/300 2026-03-21 00:32 by JourneyLucky
[考研] 290求调剂 +7 ^O^乜 2026-03-19 7/350 2026-03-20 21:43 by JourneyLucky
[考研] 288求调剂,一志愿华南理工大学071005 +5 ioodiiij 2026-03-17 5/250 2026-03-19 18:22 by zcl123
[考研] 0703化学调剂 +4 18889395102 2026-03-18 4/200 2026-03-19 16:13 by 30660438
[考研] 344求调剂 +6 knight344 2026-03-16 7/350 2026-03-18 20:13 by walc
[考博] 26博士申请 +3 1042136743 2026-03-17 3/150 2026-03-17 23:30 by 轻松不少随
[考研] 070300化学学硕求调剂 +6 太想进步了0608 2026-03-16 6/300 2026-03-16 16:13 by kykm678
信息提示
请填处理意见