| 查看: 4233 | 回復(fù): 14 | |||
[交流]
【求助】lammps中多元化合物的晶格創(chuàng)建問題 已有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 我想創(chuàng)建一個二元化合物,建立了一個晶格,晶格中有四個basis,我想在第1個和第2個的basis上創(chuàng)建A原子,在3、4上創(chuàng)建B原子,我上邊的代碼卻始終不成功,The Fuc*ing Manual 上寫的create_atoms 中basis的參數(shù)是: basis values = M itype M = which basis atom itype = atom type (1-N) to assign to this basis atom 我不知道我是哪里錯了,新人,望大家指教,謝謝! |
木蟲 (著名寫手)
木蟲 (著名寫手)
|
好的。 你搞的是GaN,建立的是一個六方的晶格,。原子位置的設(shè)置是正確的。晶格尺寸不是實驗值,因為你要 研究晶格尺寸的變化,是的吧? 我對你這個script有這樣幾個評論: 一、 首先 create_atoms 1 box basis 1 1 basis 2 1 這樣的用法是錯誤的。 請看Manual中create_atoms的說明: For the box style, the create_atoms command fills the entire simulation box with atoms on the lattice. 我測試了 create_atoms 1 box basis 1 1 basis 2 1 create_atoms 1 box 這兩個語句,結(jié)果都是一樣的。說明后面的basis好像不起作用。我不知道這是程序的bug還是這個地方確實不能用box。 反正,經(jīng)測試,create_atoms 1 box basis 1 1 basis 2 1 這一句中,不能用box,而要用region。 二、你改了上述錯誤之后(即把這兩句中的box 改成region box,其中后面的box是region的ID),仍然 會發(fā)現(xiàn)有問題。因為生成的原子個數(shù)不對。這是為什么呢? 你看你的script,其中有: region box block 0 3 0 3 0 3 create_box 2 box 這兩句。 系統(tǒng)執(zhí)行了以后,返回的信息是:Created orthogonal box = (0 0 0) to (8.06443 13.968 14.922), 這說明你生成的是一個方盒子。實際上,你要的盒子是個什么盒子呢?你是六角晶系,當(dāng)然應(yīng)是一個平行 六面體(你可以照著你自己寫的lattice語句,在紙上畫畫)。 所以,你region box block 0 3 0 3 0 3這一句當(dāng)中的style用bolck也是不對的,正確的設(shè)置應(yīng)該用 prism,至于如何用,請你讀Manual。 以上意見供參考。若仍有問題,可以繼續(xù)討論。 |

新蟲 (初入文壇)
|
首先謝謝上邊的回復(fù),我的模擬是要對晶格的尺寸做變化的,其實在我正式模擬的in文件中晶格參數(shù)里面是有變量的,所以我的原子坐標(biāo)沒有采用read_data讀入,上邊貼出的代碼只是我做測試用的,經(jīng)過測試后發(fā)現(xiàn)是create_atoms命令使用不正確,下邊是我測試的代碼,運行時沒有問題的,我的box當(dāng)中原則上只有162個basis,可是由運行的結(jié)果來看兩個create_atoms都創(chuàng)建了162個atoms,共324個atoms,第一個creat_atoms我是想讓他在在第一種和第二種類型的basis上創(chuàng)建Ga原子上,第一種類型和第二種類型的basis加起來才162/2個,可是他卻創(chuàng)建了162個,所以我想請問大家create_atoms帶basis參數(shù)的命令應(yīng)該是怎么用,謝謝! 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 |
木蟲 (著名寫手)
新蟲 (初入文壇)
新蟲 (初入文壇)
|
我剛剛把lz的lammps輸入文件按照老虎大王的建議修改了一下,貼出來如下。 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.6666666667 0.3333333333 0.8826000000 basis 0.3333333333 0.6666666667 0.0000000000 basis 0.6666666667 0.3333333333 0.5000000000 region box prism 0 3 0 3 0 3 1 0 0 create_box 2 box create_atoms 1 region box basis 1 1 basis 2 1 create_atoms 2 region box basis 3 2 basis 4 2 pair_style tersoff pair_coeff * * ../../potentials/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 1 運行結(jié)果如下: LAMMPS (5 Mar 2012) Lattice spacing in x,y,z = 2.68814 4.656 4.974 Created triclinic box = (0 0 0) to (8.06443 13.968 14.922) with tilt (2.68814 0 0) 1 by 1 by 1 MPI processor grid Created 150 atoms Created 150 atoms WARNING: No fixes defined, atoms won't move (verlet.cpp:52) Setting up run ... Memory usage per processor = 2.08799 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 nan 0 nan nan 1 0 nan 0 nan nan Loop time of 0.013598 on 1 procs for 1 steps with 300 atoms Pair time (%) = 0.0132082 (97.1333) Neigh time (%) = 0 (0) Comm time (%) = 1.00136e-05 (0.0736403) Outpt time (%) = 0.000373125 (2.74398) Other time (%) = 6.67572e-06 (0.0490935) Nlocal: 300 ave 300 max 300 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 1068 ave 1068 max 1068 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: 15132 ave 15132 max 15132 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 15132 Ave neighs/atom = 50.44 Neighbor list builds = 0 Dangerous builds = 0 這個結(jié)果里面有300個原子,不是lz所說的162*2個原子。而且貌似沒有在一個晶胞中定義成功2個原子。 誰給看看! 謝謝 |
銀蟲 (小有名氣)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 329求調(diào)劑,一志愿西北工業(yè)大學(xué),材料工程(085601) +3 | 小小機靈蟲 2026-03-29 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 296求調(diào)劑 +5 | 彼岸t 2026-03-29 | 5/250 |
|
|
[考研] 各位老師好,我的一志愿為北京科技大學(xué)085601材料專碩 +8 | Koxui 2026-03-28 | 8/400 |
|
|
[考研] 一志愿華東師范大學(xué)有機化學(xué)專業(yè),初試351分,復(fù)試被刷求調(diào)劑! +3 | 真名有冰 2026-03-29 | 4/200 |
|
|
[考研] 321求調(diào)劑 +7 | 璞玉~~ 2026-03-25 | 8/400 |
|
|
[碩博家園] 招收生物學(xué)/細(xì)胞生物學(xué)調(diào)劑 +4 | IceGuo 2026-03-26 | 5/250 |
|
|
[考研] 0703 化學(xué) 求調(diào)劑,一志愿山東大學(xué) 342 分 +4 | Shern—- 2026-03-28 | 4/200 |
|
|
[考研] 332求調(diào)劑 +4 | @MZB382400 2026-03-28 | 4/200 |
|
|
[考研] 352分 化工與材料 +5 | 海納百川Ly 2026-03-27 | 5/250 |
|
|
[考研] 307求調(diào)劑 +8 | 超級伊昂大王 2026-03-24 | 9/450 |
|
|
[考研] 化學(xué)308分求調(diào)劑 +8 | 你好明天你好 2026-03-23 | 9/450 |
|
|
[考研] 085601 材料工程 313分 求調(diào)劑 +5 | Ong3 2026-03-27 | 5/250 |
|
|
[考研] 286求調(diào)劑 +4 | lim0922 2026-03-26 | 4/200 |
|
|
[考研] 359求調(diào)劑 +4 | 王了個楠 2026-03-25 | 4/200 |
|
|
[考研] 351求調(diào)劑 +4 | 麥克阿磊 2026-03-24 | 4/200 |
|
|
[考研] 281求調(diào)劑 +3 | 亞克西good 2026-03-26 | 5/250 |
|
|
[考研] 考研一志愿蘇州大學(xué)初始315(英一)求調(diào)劑 +3 | sbdksD 2026-03-24 | 4/200 |
|
|
[考研] 285求調(diào)劑 +3 | AZMK 2026-03-24 | 3/150 |
|
|
[考研] 300分,材料,求調(diào)劑,英一數(shù)二 +5 | 超贊的 2026-03-24 | 5/250 |
|
|
[考研] 一志愿河北工業(yè)大學(xué)0817化工278分求調(diào)劑 +7 | jhybd 2026-03-23 | 12/600 |
|