24小时热门版块排行榜    

查看: 2296  |  回复: 10
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

liuchenhan

新虫 (小有名气)

[求助] 有关create_atoms相关命令 已有1人参与

本人脚本中先读结构文件nanonew.xyz,原子类型1-12,然后利用create_atoms命令生成一些其他原子,想安排这些原子的类型为13,但总是报错,请各位帮忙指导一下,实现我想要的功能,非常感谢。
units           metal
dimension       3
boundary        s s s
neighbor        2.0 nsq

#force field *******************************************************
atom_style      atomic

read_data       nanonew.xyz
lattice         custom 4.32 a1 1.0 0.0 0.0 a2 0.0 0.577350269 0.0 a3 0.0 0.0 1.0 basis 0.0 0.5 0.0 basis 0.3333333333333 0.5 0.0 basis 0.5 0.0 0.0 basis 0.83333333333 0.0 0.0
#lattice         custom 3.52 a1 1.0 0.0 0.0 a2 0.0 0.577350269 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0
region          boxx block 0 3 0 3 0 2
#create_box      1 box
create_atoms    13 region boxx

mass            13 28.0
pair_style      lj/cut 3.0
pair_coeff      * * 0.024 3.4

velocity          all  create  300 58127640 mom yes  rot yes dist gaussian units box #300K

fix               3 all temp/berendsen  300 300 0.05 #set the T of mobile is 300K while the initial value is300K

thermo_style      custom step temp etotal vol
#thermo_modify     lost warn
thermo            100

timestep          0.0005

dump                    id1 all custom 1000 dump.lammpstrj id type x y z

compute           mytempall all temp/com
fix               Tall all ave/time 1 100 100 c_mytempall file Tall.txt

dump              last all custom 40000 dump.last type x y z

run               40000


报错信息如下:
LAMMPS (14 May 2013)
Reading data file ...
  orthogonal box = (-0.1 -0.1 -0.1) to (28.7 40.7 100)
  1 by 1 by 1 MPI processor grid
  240 atoms
Lattice spacing in x,y,z = 4.32 2.49415 4.32
ERROR: Illegal create_atoms command (../create_atoms.cpp:109)
回复此楼

» 收录本帖的淘帖专辑推荐

分子动力学

» 猜你喜欢

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

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

liuchenhan

新虫 (小有名气)

引用回帖:
2楼: Originally posted by LoogCat at 2014-06-25 19:51:23
应该先设定盒子,然后再在盒子里加region,在region里加原子。参考命令:
region          boxx block 0 5 0 5 0 4
create_box      1 box
region          boxx block 1 4 1 4 1 3
create_atoms    13 region  ...

但是box建立后是不能够读入read_data的啊。
3楼2014-06-26 08:30:16
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 11 个回答

LoogCat

铁虫 (小有名气)

【答案】应助回帖


感谢参与,应助指数 +1
liuchenhan: 金币+1, 有帮助, 没有解决问题 2014-06-26 09:36:54
应该先设定盒子,然后再在盒子里加region,在region里加原子。参考命令:
region          boxx block 0 5 0 5 0 4
create_box      1 box
region          boxx block 1 4 1 4 1 3
create_atoms    13 region boxx

另外,一般是先建立box,然后才能read_data导入数据,所以你需要调整输入命令的顺序!
2楼2014-06-25 19:51:23
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

liuchenhan

新虫 (小有名气)

引用回帖:
3楼: Originally posted by liuchenhan at 2014-06-26 08:30:16
但是box建立后是不能够读入read_data的啊。...

已经解决了,直接在data file里面说明有13中原子类型,但里面只有前12中原子的坐标,第13种用create_atoms命令创建就行了。
4楼2014-06-26 09:38:16
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

fei5122917

新虫 (初入文坛)

学习了 解决了我得一个疑问 谢谢
7楼2014-12-11 15:10:39
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 本子写完了,给DS兄弟看了,得了92分 +3 Doma 2026-03-01 7/350 2026-03-02 00:00 by jnzsy
[考研] 求调剂 +5 yunziaaaaa 2026-03-01 6/300 2026-03-01 23:57 by ccp273206157
[考研] 292求调剂 +6 yhk_819 2026-02-28 6/300 2026-03-01 23:23 by 向上的胖东
[考研] 265分求调剂不调专业和学校有行学上就 +6 礼堂丁真258 2026-02-28 8/400 2026-03-01 22:50 by jian_
[考研] 275求调剂 +3 明远求学 2026-03-01 3/150 2026-03-01 22:29 by 刘兵
[考研] 26考研报考西工大材料308分求调剂 +3 weizhong123 2026-03-01 3/150 2026-03-01 21:42 by 公瑾逍遥
[考研] 0805总分292,求调剂 +7 幻想之殇 2026-03-01 7/350 2026-03-01 21:22 by 公瑾逍遥
[考研] 化工299分求调剂 一志愿985落榜 +5 嘻嘻(*^ω^*) 2026-03-01 5/250 2026-03-01 19:47 by 无际的草原
[考研] 298求调剂 +6 axyz3 2026-02-28 6/300 2026-03-01 19:00 by 18137688336
[考博] 26申博 +4 想申博! 2026-02-26 6/300 2026-03-01 17:32 by 想申博!
[考研] 328求调剂 +3 aaadim 2026-03-01 5/250 2026-03-01 17:29 by njzyff
[考研] 290求调剂 +9 材料专硕调剂; 2026-02-28 11/550 2026-03-01 17:21 by sunny81
[考研] 0856材料求调剂 +4 麻辣鱿鱼 2026-02-28 4/200 2026-03-01 16:51 by caszguilin
[考研] 285求调剂 +8 满头大汗的学生 2026-02-28 8/400 2026-03-01 16:47 by caszguilin
[考研] 307求调剂 +5 wyyyqx 2026-03-01 5/250 2026-03-01 15:21 by Fff-1
[考研] 303求调剂 +4 今夏不夏 2026-03-01 4/200 2026-03-01 14:46 by 嘟嘟小浣熊
[考研] 课题组接收材料类调剂研究生 +3 gaoxiaoniuma 2026-02-28 4/200 2026-03-01 14:30 by jjj三跨
[考研] 304求调剂 +3 52hz~~ 2026-02-28 5/250 2026-03-01 00:00 by 52hz~~
[考研] 264求调剂 +3 巴拉巴拉根556 2026-02-28 3/150 2026-02-28 21:31 by gaoxiaoniuma
[考研] 276求调剂 +3 路lyh123 2026-02-28 4/200 2026-02-28 19:45 by 路lyh123
信息提示
请填处理意见