| 5 | 1/1 | 返回列表 |
| 查看: 4235 | 回復(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 我不知道我是哪里錯了,新人,望大家指教,謝謝! |
|
首先謝謝上邊的回復(fù),我的模擬是要對晶格的尺寸做變化的,其實在我正式模擬的in文件中晶格參數(shù)里面是有變量的,所以我的原子坐標沒有采用read_data讀入,上邊貼出的代碼只是我做測試用的,經(jīng)過測試后發(fā)現(xiàn)是create_atoms命令使用不正確,下邊是我測試的代碼,運行時沒有問題的,我的box當中原則上只有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 |
木蟲 (著名寫手)
木蟲 (著名寫手)
木蟲 (著名寫手)
|
好的。 你搞的是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), 這說明你生成的是一個方盒子。實際上,你要的盒子是個什么盒子呢?你是六角晶系,當然應(yīng)是一個平行 六面體(你可以照著你自己寫的lattice語句,在紙上畫畫)。 所以,你region box block 0 3 0 3 0 3這一句當中的style用bolck也是不對的,正確的設(shè)置應(yīng)該用 prism,至于如何用,請你讀Manual。 以上意見供參考。若仍有問題,可以繼續(xù)討論。 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 283求調(diào)劑(080500) +7 | A child 2026-03-27 | 7/350 |
|
|---|---|---|---|---|
|
[考研] 考研調(diào)劑 +7 | 小蠟新筆 2026-03-29 | 7/350 |
|
|
[考研] 一志愿:西北大學,英一數(shù)一408-284分求調(diào)劑 +4 | 12.27 2026-03-27 | 4/200 |
|
|
[考研] 309求調(diào)劑 +7 | 誰不是少年 2026-03-29 | 7/350 |
|
|
[考研] 298求調(diào)劑 +4 | 種圣賜 2026-03-28 | 4/200 |
|
|
[考研] 085701求調(diào)劑初試286分 +4 | secret0328 2026-03-28 | 4/200 |
|
|
[考研] 083000學碩274求調(diào)劑 +8 | Li李魚 2026-03-26 | 8/400 |
|
|
[考研] 壓國家一區(qū)線,求導(dǎo)師收留,有恩必謝! +7 | 迷人的哈哈 2026-03-28 | 7/350 |
|
|
[考研] 317求調(diào)劑 +6 | 十閑wx 2026-03-24 | 6/300 |
|
|
[考研] 286求調(diào)劑 +12 | PolarBear11 2026-03-26 | 12/600 |
|
|
[考研] 291求調(diào)劑 +6 | HanBeiNingZC 2026-03-24 | 6/300 |
|
|
[考研] 330一志愿中國海洋大學 化學工程 085602 有讀博意愿 求調(diào)劑 +3 | wywy.. 2026-03-27 | 4/200 |
|
|
[考研] 279 分 求調(diào)劑 +4 | 睡個好覺_16 2026-03-24 | 4/200 |
|
|
[考研] 化學308分求調(diào)劑 +8 | 你好明天你好 2026-03-23 | 9/450 |
|
|
[考研] 一志愿吉大071010,316分求調(diào)劑 +3 | xgbiknn 2026-03-27 | 3/150 |
|
|
[考研] 286求調(diào)劑 +4 | lim0922 2026-03-26 | 4/200 |
|
|
[考研] 求調(diào)劑,一志愿 南京航空航天大學大學 ,080500材料科學與工程學碩 +4 | @taotao 2026-03-26 | 5/250 |
|
|
[考研] 325求調(diào)劑 +3 | Aoyijiang 2026-03-23 | 3/150 |
|
|
[考研] 打過很多競賽,085406控制工程300分,求調(diào)劑 +3 | askeladz 2026-03-26 | 3/150 |
|
|
[考研] 一志愿武理085500機械專業(yè)總分300求調(diào)劑 +3 | an10101 2026-03-24 | 7/350 |
|