24小时热门版块排行榜    

查看: 4159  |  回复: 4

Materialman

新虫 (初入文坛)

[求助] Lammps运行结果问题!无数据,出现nan! 已有1人参与

本人在进行能量优化的时候,有输出的结果但是输出的数据都为nan,不知道是什么回事,请各位大神指点迷津!

以下为相应的in文件
#------模拟环境初始化------
boundary    p p p     #边界周期性设定,自由非周期、自由非周期、自由非周期
units       real      #模型单元模式设定为real
dimension   3       #几何维度设定为3D
atom_style  full      #原子模式设定为full
neighbor    2.0 bin   #设定neighbor截断半径-力场截断半径(类似MS中Buffer width)
#------微观模型的建立------
#  定义原子结构
pair_style   lj/class2/coul/cut 10.0 10.0
#设定PCFF势函数的对势(类似MS中的Nonbond potential)信息:对势包含相互作用为范德华力和库仑力,范德华力和库仑力截断半径(类似MS中Cutoff distance)
bond_style      class2   
angle_style     class2  
dihedral_style  class2   
improper_style  class2   
read_data   ../bench/WJ/PP.lammps05  
#------设置原子相关参数------
velocity   all create 500 102486 rot yes dist &
             gaussian units box   

#------动力学设置------
#  能量优化
fix NPT all npt temp 500.0 500.0 100.0 iso 1.0 1.0 1000.0  compute pe all pe            
variable en equal c_ke+c_pe   
fix 1 all ave/time 1 10000 10000 c_temp c_ke c_pe v_en file ../bench/WJ/data/relax_PE20.dat1

minimize 1.0e-7 0 1000000 1000000
thermo    100000         
thermo_modify lost warn      
timestep 1                  
run 1000000      
运行结果:
LAMMPS (8 Jul 2013)
Scanning data file ...
  1 = max bonds/atom
  6 = max angles/atom
  9 = max dihedrals/atom
  4 = max impropers/atom
Reading data file ...
  orthogonal box = (0 0 0) to (39.0755 39.0755 39.0755)
  1 by 2 by 2 MPI processor grid
  7320 atoms
  7260 bonds
  14400 angles
  21060 dihedrals
  9600 impropers
Finding 1-2 1-3 1-4 neighbors ...
  4 = max # of 1-2 neighbors
  6 = max # of 1-3 neighbors
  12 = max # of 1-4 neighbors
  16 = max # of special neighbors
WARNING: Resetting reneighboring criteria during minimization (../min.cpp:173)
Setting up minimization ...
Memory usage per processor = 20.985 Mbytes
Step Temp E_pair E_mol TotEng Press Volume
       0          500    43041.617    45689.834    99639.726    200249.35    59664.174
     236          500    8978.4944    9795.6924    29682.461    64908.573    59664.174
Loop time of 40.9642 on 4 procs for 236 steps with 7320 atoms

Minimization stats:
  Stopping criterion = energy tolerance
  Energy initial, next-to-last, final =
         88731.4515056      18774.1886865      18774.1868369
  Force two-norm initial, final = 3071.24 323.327
  Force max component initial, final = 870.624 81.8178
  Final line search alpha, max atom move = 1.5559e-08 1.273e-06
  Iterations, force evaluations = 236 548

Pair  time (%) = 22.6427 (55.2744)
Bond  time (%) = 7.31013 (17.8451)
Neigh time (%) = 0.33576 (0.819642)
Comm  time (%) = 10.531 (25.7078)
Outpt time (%) = 0 (0)
Other time (%) = 0.144612 (0.353019)

Nlocal:    1830 ave 2187 max 1564 min
Histogram: 1 0 1 0 1 0 0 0 0 1
Nghost:    13004 ave 13494 max 12423 min
Histogram: 1 0 0 0 0 1 1 0 0 1
Neighs:    819009 ave 1.10617e+06 max 669830 min
Histogram: 2 0 0 1 0 0 0 0 0 1

Total # of neighbors = 3276035
Ave neighs/atom = 447.546
Ave special neighs/atom = 11.6721
Neighbor list builds = 7
Dangerous builds = 0
Setting up run ...
Memory usage per processor = 19.4735 Mbytes
Step Temp E_pair E_mol TotEng Press Volume
     236          500    8978.4944    9795.6924    29682.461    64908.573    59664.174
  100000         -nan            0         -nan         -nan         -nan         -nan
  200000         -nan            0         -nan         -nan         -nan         -nan
  300000         -nan            0         -nan         -nan         -nan         -nan
  400000         -nan            0         -nan         -nan         -nan         -nan
  500000         -nan            0         -nan         -nan         -nan         -nan
  600000         -nan            0         -nan         -nan         -nan         -nan
  700000         -nan            0         -nan         -nan         -nan         -nan
  800000         -nan            0         -nan         -nan         -nan         -nan
  900000         -nan            0         -nan         -nan         -nan         -nan
1000000         -nan            0         -nan         -nan         -nan         -nan
1000236         -nan            0         -nan         -nan         -nan         -nan
Loop time of 22495.5 on 4 procs for 1000000 steps with 7320 atoms

Lammps运行结果问题!无数据,出现nan!
2.png
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

issp-hao

银虫 (正式写手)

【答案】应助回帖

感谢参与,应助指数 +1
可能是你没有设置相关的bond,angle等的系数,只设置了类型
你加上相应的bond_coeff。。。。。。。
试试看,一般情况下遇到0作分母情况就会出nan
2楼2014-09-25 09:43:25
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

Materialman

新虫 (初入文坛)

引用回帖:
2楼: Originally posted by issp-hao at 2014-09-25 09:43:25
可能是你没有设置相关的bond,angle等的系数,只设置了类型
你加上相应的bond_coeff。。。。。。。
试试看,一般情况下遇到0作分母情况就会出nan

好的,我试一下,非常感谢!
3楼2014-09-28 09:00:41
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

wangluwei

新虫 (初入文坛)

引用回帖:
2楼: Originally posted by issp-hao at 2014-09-25 09:43:25
可能是你没有设置相关的bond,angle等的系数,只设置了类型
你加上相应的bond_coeff。。。。。。。
试试看,一般情况下遇到0作分母情况就会出nan

请问lj势用的时候可以不涉及到具体的原子么?两种类型的原子该怎么写呢?我先用了具体的原子这样写的
# LJ 12-6 system with npt ensemble
units lj
atom_style atomic
boundary                p p p

lattice  fcc 1.073
lattice  fcc  0.8
region box block 0 10 0 5 0 5
create_box 2 box

create_atoms 1 box

create_atoms 2 box

mass 1 1.0
mass 2 1.0

velocity                 all create 0.01 872877
timestep                0.01
dump                     1 all xyz 1000   lj.xyz

pair_style lj/cut 2.5
pair_coeff  1 1 1.0 1.0 2.5
pair_coeff  2 2 1.6 1.1765 2.5
pair_coeff  1 2 0.2 1.0882 2.5

#pair_modify shift yes mix geometric

neighbor 0.3 bin
neigh_modify every 10 delay 0 check yes
thermo                  1000

fix                   1 all npt temp 0.01 0.01 1.00 iso 0.0024 0.0024 100.0  
run                   50000
unfix                   1
thermo                  1000
运行结果总出现nan怎么回事?不用具体的原子怎么写代码呢?
新手跪谢!!!!
4楼2017-04-15 21:43:32
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

Stoudemire29

金虫 (小有名气)

请问楼主解决问题了吗?同新手
共同进步
5楼2018-11-10 11:11:56
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 Materialman 的主题更新
信息提示
请填处理意见