计算化学公社

 找回密码 Forget password
 注册 Register
Views: 850|回复 Reply: 5
打印 Print 上一主题 Last thread 下一主题 Next thread

[Lammps] lammps报错ERROR on proc 0: Not a valid floating-point number。

[复制链接 Copy URL]

4

帖子

0

威望

59

eV
积分
63

Level 2 能力者

lammps运行报错结果
D:\Lammps\CFRP-X>lmp -in in.CFRPX
LAMMPS (2 Aug 2023 - Update 3)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
  using 1 OpenMP thread(s) per MPI task
Loaded 1 plugins from D:\Users\C\AppData\Local\LAMMPS 64-bit 2Aug2023-MSMPI\plugins
Reading data file ...
  orthogonal box = (0 0 0) to (31.0997 31.0997 56.507)
  1 by 1 by 1 MPI processor grid
  reading atoms ...
  5211 atoms
  scanning bonds ...
  3 = max bonds/atom
  scanning angles ...
  6 = max angles/atom
  scanning dihedrals ...
  13 = max dihedrals/atom
  scanning impropers ...
  4 = max impropers/atom
  reading bonds ...
  5285 bonds
  reading angles ...
  9684 angles
  reading dihedrals ...
  16599 dihedrals
  reading impropers ...
  3840 impropers
Finding 1-2 1-3 1-4 neighbors ...
  special bond factors lj:    0        0        0
  special bond factors coul:  0        0        0
     4 = max # of 1-2 neighbors
     8 = max # of 1-3 neighbors
    18 = max # of 1-4 neighbors
    21 = max # of special neighbors
  special bonds CPU = 0.002 seconds
  read_data CPU = 0.109 seconds
ERROR on proc 0: Not a valid floating-point number: 'alfa;gammavdW;valency;Eunder;Eover;chiEEM;etaEEM;n.u.' (src/REAXFF/reaxff_ffield.cpp:596)
Last command: pair_coeff                    * * ffield.ff Al C C C C H H H N O O O O S

job aborted:
[ranks] message

[0] application aborted
aborting MPI_COMM_WORLD (comm=0x44000000), error 1, comm rank 0

具体浮点错误怎么都找不到,已经修改过力场格式了。求大神帮忙找找错误的地方,谢谢。

lichang.txt

25.55 KB, 下载次数 Times of downloads: 9

4

帖子

0

威望

59

eV
积分
63

Level 2 能力者

6#
 楼主 Author| 发表于 Post on 2024-12-11 16:10:49 | 只看该作者 Only view this author
jrfjrf123 发表于 2024-12-11 15:33
第一个字面意思,超过这种算法的迭代次数了,就会抛出错误,imax就是你设置的maxiter值,默认为200:

感谢您的回答

48

帖子

0

威望

451

eV
积分
499

Level 3 能力者

5#
发表于 Post on 2024-12-11 15:33:08 | 只看该作者 Only view this author
第一个字面意思,超过这种算法的迭代次数了,就会抛出错误,imax就是你设置的maxiter值,默认为200:


但因为我没看过这篇文献,不太清楚为什么出错,你可以看看:

fix qeq/reaxff command: doi:10.1016/j.parco.2011.08.005\n\n"
  "@Article{Aktulga12,\n"
  " author = {H. M. Aktulga and J. C. Fogarty and S. A. Pandit and A. Y. Grama},\n"
  " title = {Parallel Reactive Molecular Dynamics: {N}umerical Methods and Algorithmic Techniques},\n"
  " journal = {Parallel Computing},\n"
  " year =    2012,\n"
  " volume =  38,\n"
  " pages =   {245--259}\n"


第二个就是明显的压力炸了,一般是初始结构不合适或者力场参数不合适,具体问题要看你的结构和in文件综合来看,原因可能有很多

4

帖子

0

威望

59

eV
积分
63

Level 2 能力者

4#
 楼主 Author| 发表于 Post on 2024-12-11 15:03:10 | 只看该作者 Only view this author
jrfjrf123 发表于 2024-12-11 11:19
哦对了,附一个以前van Duin做的CHO体系的力场文件,
因为开头有6行多余的字符,所以也是不能直接复制下来 ...

感谢您的回答,我还想问一下,我修改力场之后能运行,但是后面运行基本上就会出现两种情况,一种是警告WARNING: Fix qeq/reaxff CG convergence failed after 200 iterations at step 1 (src/REAXFF/fix_qeq_reaxff.cpp:775),一种是报错ERROR on proc 0:Non-numeric atom coords- simulation unstable (src/0PENMP/domain_omp.cpp:58),能麻烦您解答一下吗,谢谢。

48

帖子

0

威望

451

eV
积分
499

Level 3 能力者

3#
发表于 Post on 2024-12-11 11:19:13 | 只看该作者 Only view this author
哦对了,附一个以前van Duin做的CHO体系的力场文件,
因为开头有6行多余的字符,所以也是不能直接复制下来用的,
所以很多以前的力场文件因为程序的变动有可能会出错,需要修改

48

帖子

0

威望

451

eV
积分
499

Level 3 能力者

2#
发表于 Post on 2024-12-11 11:15:29 | 只看该作者 Only view this author
你的力场文件有一些问题,在29Aug2024版的lammps中,在reaxff_ffield.cpp里写了这一段:

        // check if header comment line is present

        auto line = reader.next_line();
        if (strmatch(line, "^\\s*[0-9]+\\s+!.*general parameters.*"))
          THROW_ERROR("First line of ReaxFF potential file must be a comment or empty");
        ++lineno;



然后是读取39行第一个值并储存:


我估摸着这一步因为你文件开头少了一行,导致读到的“general parameters”,也就是文件中的n=50(第二行)
所以读到 “9 ! Nr of atoms; cov.r; valency;a.m;Rvdw;Evdw;gammaEEM;cov.r2;# ”这一行之后了,
因为它只会读取第一个数字,所以这行还没报错,
下一行“alfa;gammavdW;valency;Eunder;Eover;chiEEM;etaEEM;n.u. ”就因为不能转化为double格式而报错
所以你可以在文件第一行空一行或者随便写点什么试一下


另外之后是读取原子种类数量这一行+三行注释:
        // next line is number of atom types followed by 3 lines of comments

        values = reader.next_values(0);
        n = values.next_int();
        reax->num_atom_types = n;
        reader.skip_line();
        reader.skip_line();
        reader.skip_line();
        lineno += 4;

也就是说必须是4行且紧跟着上面的参数,数量不能错

评分 Rate

参与人数
Participants 1
eV +5 收起 理由
Reason
Weldingspock + 5 好物!

查看全部评分 View all ratings

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2025-8-15 16:43 , Processed in 0.301418 second(s), 31 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list