| 查看: 4237 | 回復(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)建一個(gè)二元化合物,建立了一個(gè)晶格,晶格中有四個(gè)basis,我想在第1個(gè)和第2個(gè)的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 我不知道我是哪里錯(cuò)了,新人,望大家指教,謝謝! |
木蟲 (著名寫手)
木蟲 (著名寫手)
|
好的。 你搞的是GaN,建立的是一個(gè)六方的晶格,。原子位置的設(shè)置是正確的。晶格尺寸不是實(shí)驗(yàn)值,因?yàn)槟阋?br /> 研究晶格尺寸的變化,是的吧? 我對你這個(gè)script有這樣幾個(gè)評論: 一、 首先 create_atoms 1 box basis 1 1 basis 2 1 這樣的用法是錯(cuò)誤的。 請看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 這兩個(gè)語句,結(jié)果都是一樣的。說明后面的basis好像不起作用。我不知道這是程序的bug還是這個(gè)地方確實(shí)不能用box。 反正,經(jīng)測試,create_atoms 1 box basis 1 1 basis 2 1 這一句中,不能用box,而要用region。 二、你改了上述錯(cuò)誤之后(即把這兩句中的box 改成region box,其中后面的box是region的ID),仍然 會(huì)發(fā)現(xiàn)有問題。因?yàn)樯傻脑觽(gè)數(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), 這說明你生成的是一個(gè)方盒子。實(shí)際上,你要的盒子是個(gè)什么盒子呢?你是六角晶系,當(dāng)然應(yīng)是一個(gè)平行 六面體(你可以照著你自己寫的lattice語句,在紙上畫畫)。 所以,你region box block 0 3 0 3 0 3這一句當(dāng)中的style用bolck也是不對的,正確的設(shè)置應(yīng)該用 prism,至于如何用,請你讀Manual。 以上意見供參考。若仍有問題,可以繼續(xù)討論。 |

新蟲 (初入文壇)
|
首先謝謝上邊的回復(fù),我的模擬是要對晶格的尺寸做變化的,其實(shí)在我正式模擬的in文件中晶格參數(shù)里面是有變量的,所以我的原子坐標(biāo)沒有采用read_data讀入,上邊貼出的代碼只是我做測試用的,經(jīng)過測試后發(fā)現(xiàn)是create_atoms命令使用不正確,下邊是我測試的代碼,運(yùn)行時(shí)沒有問題的,我的box當(dāng)中原則上只有162個(gè)basis,可是由運(yùn)行的結(jié)果來看兩個(gè)create_atoms都創(chuàng)建了162個(gè)atoms,共324個(gè)atoms,第一個(gè)creat_atoms我是想讓他在在第一種和第二種類型的basis上創(chuàng)建Ga原子上,第一種類型和第二種類型的basis加起來才162/2個(gè),可是他卻創(chuàng)建了162個(gè),所以我想請問大家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 運(yùn)行結(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 這個(gè)結(jié)果里面有300個(gè)原子,不是lz所說的162*2個(gè)原子。而且貌似沒有在一個(gè)晶胞中定義成功2個(gè)原子。 誰給看看! 謝謝 |
銀蟲 (小有名氣)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 085600,專業(yè)課化工原理,320分求調(diào)劑 +4 | 大饞小子 2026-03-29 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 一志愿華東師范大學(xué)有機(jī)化學(xué)專業(yè),初試351分,復(fù)試被刷求調(diào)劑! +5 | 真名有冰 2026-03-29 | 6/300 |
|
|
[基金申請] 面上5B能上會(huì)嗎? +4 | redcom 2026-03-29 | 4/200 |
|
|
[考研] 085600 材料與化工 329分求調(diào)劑 +14 | Mr. Z 2026-03-25 | 14/700 |
|
|
[考研] 375求調(diào)劑 +4 | 雨夏整夜 2026-03-29 | 4/200 |
|
|
[考研] 352分-085602-一志愿985 +5 | 海納百川Ly 2026-03-29 | 5/250 |
|
|
[考研] 材料學(xué)碩333求調(diào)劑 +11 | 北道巷 2026-03-24 | 11/550 |
|
|
[考研] 調(diào)劑求院校招收 +6 | 鶴鯨鴿 2026-03-28 | 6/300 |
|
|
[考研] 一志愿華理,數(shù)一英一285求A區(qū)調(diào)劑 +8 | AZMK 2026-03-25 | 12/600 |
|
|
[考研] 材料求調(diào)劑 一志愿哈工大總分298分,前三科223分 +5 | dongfang59 2026-03-27 | 5/250 |
|
|
[考研] 070300化學(xué)求調(diào)劑 +4 | 起個(gè)名咋這么難 2026-03-27 | 4/200 |
|
|
[考研] 調(diào)劑 +3 | 李嘉圖·S·路 2026-03-27 | 3/150 |
|
|
[考研] 325求調(diào)劑 +5 | 李嘉圖·S·路 2026-03-23 | 5/250 |
|
|
[考研] 中國科學(xué)院深圳先進(jìn)技術(shù)研究院-光纖傳感課題組招生-中國科學(xué)院大學(xué)、深圳理工大學(xué)聯(lián)培 +5 | YangTyu1 2026-03-26 | 5/250 |
|
|
[考研] 一志愿 南京郵電大學(xué) 288分 材料考研 求調(diào)劑 +3 | jl0720 2026-03-26 | 3/150 |
|
|
[考研] 打過很多競賽,085406控制工程300分,求調(diào)劑 +3 | askeladz 2026-03-26 | 3/150 |
|
|
[考研] 340求調(diào)劑 +5 | 話梅糖111 2026-03-24 | 5/250 |
|
|
[考研] 上海電力大學(xué)材料防護(hù)與新材料重點(diǎn)實(shí)驗(yàn)室招收調(diào)劑研究生(材料、化學(xué)、電化學(xué),環(huán)境) +4 | 我愛學(xué)電池 2026-03-23 | 4/200 |
|
|
[考研] 300分,材料,求調(diào)劑,英一數(shù)二 +5 | 超贊的 2026-03-24 | 5/250 |
|
|
[考研] 344求調(diào)劑 +3 | desto 2026-03-24 | 3/150 |
|