24小时热门版块排行榜    

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

Yelong_Wu

银虫 (初入文坛)

[交流] 【求助】lammps中多元化合物的晶格创建问题 已有9人参与

lattice custom 3.104 a1 0.8660254037844386 -0.5 0 a2 0 1.0 0 a3 0 0 1.602448454 &
basis 0.3333333333 0.6666666667 0.3826000000 &
basis 0.6666666667 0.3333333333 0.8826000000 &
basis 0.3333333333 0.6666666667 0.0000000000 &
basis 0.6666666667 0.3333333333 0.5000000000

region box block 0 3 0 3 0 3
create_box 2 box

create_atoms 1 box basis 1 1 basis 2 1
create_atoms 2 box basis 3 2 basis 4 2


我想创建一个二元化合物,建立了一个晶格,晶格中有四个basis,我想在第1个和第2个的basis上创建A原子,在3、4上创建B原子,我上边的代码却始终不成功,The Fuc*ing Manual 上写的create_atoms 中basis的参数是:

  basis values = M itype
    M = which basis atom
    itype = atom type (1-N) to assign to this basis atom

我不知道我是哪里错了,新人,望大家指教,谢谢!
回复此楼

» 猜你喜欢

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

bluewhale

铁杆木虫 (正式写手)

★ ★ ★ ★
小木虫: 金币+0.5, 给个红包,谢谢回帖
zh1987hs: 金币+3, 谢谢 2012-12-09 15:01:53
create_atoms 1 region box basis 1 1 basis 2 1
create_atoms 2 region box basis 3 2 basis 4 2
写成一行即可:
create_atoms 1 region box basis 1 1 basis 2 1 basis 3 2 basis 4 2
前面default type 1在这里没有用到。这也可认为是Lammps的一个bug。
一般的理解,分几行写是可以的,但实际上,这两个create_atoms产生的格点原子重叠在一起,这也是为什么出现nan之类的thermo输出。

[ Last edited by bluewhale on 2012-12-6 at 19:40 ]
11楼2012-12-06 19:39:01
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 15 个回答

老虎大王

木虫 (著名写手)

★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
ghcacj(金币+1):谢谢 2010-05-08 21:34:01
把运行后的出错信息贴出来。

另外,也可以用其它的工具生成起始构型,然后用read_data读进来。
2楼2010-05-08 21:29:48
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

Yelong_Wu

银虫 (初入文坛)

首先谢谢上边的回复,我的模拟是要对晶格的尺寸做变化的,其实在我正式模拟的in文件中晶格参数里面是有变量的,所以我的原子坐标没有采用read_data读入,上边贴出的代码只是我做测试用的,经过测试后发现是create_atoms命令使用不正确,下边是我测试的代码,运行时没有问题的,我的box当中原则上只有162个basis,可是由运行的结果来看两个create_atoms都创建了162个atoms,共324个atoms,第一个creat_atoms我是想让他在在第一种和第二种类型的basis上创建Ga原子上,第一种类型和第二种类型的basis加起来才162/2个,可是他却创建了162个,所以我想请问大家create_atoms带basis参数的命令应该是怎么用,谢谢!

units                   metal
boundary                p p p

atom_style              atomic

lattice custom 3.104 a1 0.8660254037844386 -0.5 0 a2 0 1.0 0 a3 0 0 1.602448454 basis 0.3333333333 0.6666666667 0.3826000000 basis 0.66666666
67 0.3333333333 0.8826000000 basis 0.3333333333 0.6666666667 0.0000000000 basis 0.6666666667 0.3333333333 0.5000000000
Lattice spacing in x,y,z = 2.68814 4.656 4.974

region box block 0 3 0 3 0 3
create_box 2 box
Created orthogonal box = (0 0 0) to (8.06443 13.968 14.922)
  1 by 1 by 1 processor grid

create_atoms 1 box basis 1 1 basis 2 1
Created 162 atoms
create_atoms 2 box basis 3 2 basis 4 2
Created 162 atoms

pair_style              tersoff
pair_coeff              * * GaN.tersoff Ga N

mass                    1 69.723
mass                    2 14.0067

neighbor                1.0 bin
neigh_modify            every 1 delay 5 check yes

dump                    1 all cfg 1 a*.cfg id type xs ys zs
#dump_modify            1 element Al N

run                     0
Memory usage per processor = 1.831 Mbytes
Step Temp E_pair E_mol TotEng Press
       0            0          nan            0          nan          nan
Loop time of 0 on 1 procs for 0 steps with 324 atoms

Pair  time (%) = 0 (0)
Neigh time (%) = 0 (0)
Comm  time (%) = 0 (0)
Outpt time (%) = 0 (0)
Other time (%) = 0 (0)

Nlocal:    324 ave 324 max 324 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost:    1188 ave 1188 max 1188 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: 17364 ave 17364 max 17364 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 17364
Ave neighs/atom = 53.5926
Neighbor list builds = 0
Dangerous builds = 0
3楼2010-05-09 12:47:27
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

老虎大王

木虫 (著名写手)

★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
lei0736(金币+1):谢谢 2010-05-21 10:57:04
不好意思,我刚写的有误,我删了重新来。

为什么你的体系中有162个原子?这个是从什么地方算来的?

[ Last edited by 老虎大王 on 2010-5-9 at 21:34 ]
4楼2010-05-09 21:13:29
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见