24小时热门版块排行榜    

查看: 2095  |  回复: 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 的主题更新
信息提示
请填处理意见