| 查看: 3483 | 回復(fù): 13 | ||
tina張新蟲 (小有名氣)
|
[求助]
lammps讀data文件求助! 已有1人參與
|
|
|
求助: 在lammps上用read_data命令,讀入多個文件時,出現(xiàn)以下錯誤: Error :Expected floating point parameter in input or data file . . /read_data.cpp 164 |

新蟲 (小有名氣)
|
十分感謝。!我還有一個問題,就是多次讀入data文件,atom_ID設(shè)置在哪里比較合適,我如果用add offset的命令后,老出現(xiàn)非法定義的錯誤,我如果要讀入data文件是另一個元素,應(yīng)該在第一個read_data命令,加上keyword extra/atom/types 9(總共九個元素) 這個data文件設(shè)置的對么 LAMMPS data file from restart file: timestep=10000,procs=1 16679 atoms 1 atom types -10e-01 32.517e+01 xlo xhi -7e-01 14.85e+01 ylo yhi -10-10e-01 20.244e+01 zlo zhi Masses 1 15.999400 # o* 2 1.007970 # h* 3 63.546 # Cu 4 63.546 # Cu 5 63.546 # Cu 6 63.546 # Cu 7 63.546 # Cu 8 63.546 # Cu 9 12 # C Atoms 1 9 3.56 14.24 24.92 0 0 0 2 9 3.56 14.24 28.48 0 0 0 3 9 3.56 14.24 32.04 0 0 0 4 9 3.56 14.24 35.6 0 0 0 |

新蟲 (小有名氣)
送紅花一朵 |
你看,這是一部分data文件,但是要讀入一個data文件的話,data文件并沒有任何問題啊 LAMMPS data file from restart file: timestep = 100000, procs = 8 (30 25 30) 16679 atoms 9 atom types 1 bond types 1 angle types Masses 1 15.999400 # o* 2 1.007970 # h* 3 63.546 # Cu 4 63.546 # Cu 5 63.546 # Cu 6 63.546 # Cu 7 63.546 # Cu 8 63.546 # Cu 9 12 # C ATOMS 1 7 3.56 14.24 24.92 0 0 0 2 7 3.56 14.24 28.48 0 0 0 3 7 3.56 14.24 32.04 0 0 0 4 7 3.56 14.24 35.6 0 0 0 5 7 3.56 17.8 21.36 0 0 0 6 7 3.56 17.8 24.92 0 0 0 7 7 3.56 17.8 28.48 0 0 0 8 7 3.56 17.8 32.04 0 0 0 9 7 3.56 17.8 35.6 0 0 0 10 7 3.56 17.8 39.16 0 0 0 11 7 3.56 21.36 17.8 0 0 0 12 7 3.56 21.36 21.36 0 0 0 13 7 3.56 21.36 24.92 0 0 0 14 7 3.56 21.36 28.48 0 0 0 15 7 3.56 21.36 32.04 0 0 0 16 7 3.56 21.36 35.6 0 0 0 17 7 3.56 21.36 39.16 0 0 0 18 7 3.56 21.36 42.72 0 0 0 19 7 3.56 24.92 17.8 0 0 0 20 7 3.56 24.92 21.36 0 0 0 21 7 3.56 24.92 24.92 0 0 0 22 7 3.56 24.92 28.48 0 0 0 23 7 3.56 24.92 32.04 0 0 0 24 7 3.56 24.92 35.6 0 0 0 25 7 3.56 24.92 39.16 0 0 0 26 7 3.56 24.92 42.72 0 0 0 27 7 3.56 28.48 17.8 0 0 0 28 7 3.56 28.48 21.36 0 0 0 29 7 3.56 28.48 24.92 0 0 0 30 7 3.56 28.48 28.48 0 0 0 31 7 3.56 28.48 32.04 0 0 0 32 7 3.56 28.48 35.6 0 0 0 |

|
貌似是data文件里少了盒子邊界的定義,我加上 -1.7046925403980140e-01 8.0636966986120024e+01 xlo xhi -1.8855463730960764e-01 4.0308151492031038e+01 ylo yhi -2.5465666718138280e-01 6.2554656666639701e+01 zlo zhi 以后是可以讀的,另外你的read_data格式寫對了嗎? |
新蟲 (小有名氣)
送紅花一朵 |
那為什么我用你的命令怎么還說我非法定義 variable sphere string data.dat variable waterbe string water1.data variable waterup string water2.data read_data ${waterbe} read_data water1.data Reading data file ... orthogonal box = (-1 -1 -1) to (325.17 148.5 202.44) 4 by 4 by 1 MPI processor grid reading atoms ... 37200 atoms scanning bonds ... 2 = max bonds/atom scanning angles ... 1 = max angles/atom reading bonds ... 24800 bonds reading angles ... 12400 angles Finding 1-2 1-3 1-4 neighbors ... 2 = max # of 1-2 neighbors 1 = max # of 1-3 neighbors 1 = max # of 1-4 neighbors 2 = max # of special neighbors read_data ${waterup} add 0 read_data water2.data add 0 ERROR: Illegal read_data command (../read_data.cpp:164) 這是第一個data文件 LAMMPS data file. msi2lmp v3.9.6 / 11 Sep 2014 / CGCMM for Sketch 37200 atoms 24800 bonds 12400 angles 0 dihedrals 0 impropers 9 atom types 1 bond types 1 angle types -10e-01 32.517e+01 xlo xhi -10e-01 14.85e+01 ylo yhi -10e-01 20.244e+01 zlo zhi Masses 1 15.999400 # o* 2 1.007970 # h* 3 63.546 # Cu 4 63.546 # Cu 5 63.546 # Cu 6 63.546 # Cu 7 63.546 # Cu 8 63.546 # Cu 9 12 # C Bond Coeffs # harmonic 1 540.6336 0.9600 # o*-h* Angle Coeffs # harmonic 1 50.0000 104.5000 # h*-o*-h* Atoms # full 1 1 1 -0.820000 8.018998451 2.540890217 0.955299609 0 0 0 # o* 2 1 2 0.410000 8.609850421 3.119996727 0.452578854 0 0 0 # h* 3 1 2 0.410000 7.374236306 2.239286862 0.299946918 0 0 0 # h* 4 1 1 -0.820000 39.118998451 2.540890217 0.955299609 0 0 0 # o* 5 1 2 0.410000 39.709850421 3.119996727 0.452578854 0 0 0 # h* 這是第二個data文件 LAMMPS data file. msi2lmp v3.9.6 / 11 Sep 2014 / CGCMM for Sketch 37200 atoms 24800 bonds 12400 angles 0 dihedrals 0 impropers 9 atom types 1 bond types 1 angle types -10e-01 3.25E+02 xlo xhi -1.00E+00 1.49E+02 ylo yhi -1.00E+00 2.02E+02 zlo zhi Masses 1 15.9994 # o* 2 1.00797 # h* 3 63.546 # Cu 4 63.546 # Cu 5 63.546 # Cu 6 63.546 # Cu 7 63.546 # Cu 8 63.546 # Cu 9 12 # C Bond Coeffs # harmonic 1 540.6336 0.96 # o*-h* Angle Coeffs # harmonic 1 50 104.5 # h*-o*-h* Atoms # full # # # # # # # 37201 1 1 -0.82 8.018998451 2.540890217 0.955299609 0 0 0 # o* 37202 1 2 0.41 8.609850421 3.119996727 0.452578854 0 0 0 # h* 37203 1 2 0.41 7.374236306 2.239286862 0.299946918 0 0 0 # h* 37204 1 1 -0.82 39.11899845 2.540890217 0.955299609 0 0 0 # o* 37205 1 2 0.41 39.70985042 3.119996727 0.452578854 0 0 0 # h* |

新蟲 (小有名氣)

新蟲 (小有名氣)

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] A區(qū)線材料學(xué)調(diào)劑 +5 | 周周無極 2026-03-20 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 0817 化學(xué)工程 299分求調(diào)劑 有科研經(jīng)歷 有二區(qū)文章 +22 | rare12345 2026-03-18 | 22/1100 |
|
|
[考研] 求調(diào)劑 +3 | @taotao 2026-03-20 | 3/150 |
|
|
[考研] 281求調(diào)劑(0805) +14 | 煙汐憶海 2026-03-16 | 25/1250 |
|
|
[考博] 招收博士1-2人 +3 | QGZDSYS 2026-03-18 | 3/150 |
|
|
[考研] 085410人工智能專碩317求調(diào)劑(0854都可以) +4 | xbxudjdn 2026-03-18 | 4/200 |
|
|
[考研] 材料專碩英一數(shù)二306 +6 | z1z2z3879 2026-03-18 | 6/300 |
|
|
[考博] 申博26年 +3 | 八6八68 2026-03-19 | 3/150 |
|
|
[考研] 本科鄭州大學(xué)物理學(xué)院,一志愿華科070200學(xué)碩,346求調(diào)劑 +4 | 我不是一根蔥 2026-03-18 | 4/200 |
|
|
[考研] 304求調(diào)劑 +6 | 司空. 2026-03-18 | 6/300 |
|
|
[考研] 354求調(diào)劑 +4 | Tyoumou 2026-03-18 | 7/350 |
|
|
[考研] 【同濟(jì)軟件】軟件(085405)考研求調(diào)劑 +3 | 2026eternal 2026-03-18 | 3/150 |
|
|
[考研] 一志愿武理材料305分求調(diào)劑 +5 | 想上岸的鯉魚 2026-03-18 | 6/300 |
|
|
[考研]
|
胡辣湯放糖 2026-03-15 | 6/300 |
|
|
[考研] 材料專碩326求調(diào)劑 +6 | 墨煜姒莘 2026-03-15 | 7/350 |
|
|
[考研] 085601求調(diào)劑 +4 | Du.11 2026-03-16 | 4/200 |
|
|
[考研] 考研調(diào)劑 +3 | 淇ya_~ 2026-03-17 | 5/250 |
|
|
[考研] 藥學(xué)383 求調(diào)劑 +3 | 藥學(xué)chy 2026-03-15 | 4/200 |
|
|
[考研] 288求調(diào)劑 +4 | 奇點(diǎn)0314 2026-03-14 | 4/200 |
|
|
[考研] 289求調(diào)劑 +4 | 這么名字咋樣 2026-03-14 | 6/300 |
|