Lammps程序.ppt_第1頁
Lammps程序.ppt_第2頁
Lammps程序.ppt_第3頁
Lammps程序.ppt_第4頁
Lammps程序.ppt_第5頁
已閱讀5頁,還剩44頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、lammps程序 關(guān)于lammps基礎(chǔ)知識 lammps的輸入文件一般分為4個部分 initialization, atom definition, settings, run a simulation,后面的兩個部分可以按照需要 多次重復(fù); (1) initialization 在你的模擬體系定義之前, 一些參數(shù)必須要被 設(shè)置. 相關(guān)的命令有:units, dimension, newton, processors, boundary, atom_style, atom_modify。 其中,units: 選擇單位系統(tǒng), lammps提供了lj、 real、metal三種單位系統(tǒng);dimen

2、sion: 2d模擬 還是3d模擬, 默認是3d;boundary: 邊界條件: 周期性邊界or自由邊界;atom_style: 定義你的 模擬體系中的原子屬性, 注意這個style要區(qū)分 后面設(shè)置力場參數(shù)時命令里提到的atom type; 還有, 這些命令告訴lammps在你的模擬中使用 何種力場: pair_style, bond_style, angle_style, dihedral_style, improper_style. 在lj類型中,所有變量都是無單位的,實際 量換算成簡化單位量有系列公式 缺省狀態(tài)默認為lj類型 (2)atom definition lammps提供3種方式

3、定義原子: 通過 read_data或read_restart命令從data或restart 文件讀入, 這些文件可以包含分子拓撲結(jié)構(gòu) 信息. 按照晶格的方式創(chuàng)建原子(不包含 分子拓撲信息), 你會用到這幾個命令: lattice, region, create_box, create_atoms. 已經(jīng)設(shè) 置好的原子可以用replicate命令復(fù)制以生成 一個更大規(guī)模的模擬體系. (3)settings 原子和分子的拓撲信息定義好后, 你要制定 一系列的設(shè)置: 力場系數(shù)、模擬參數(shù)、輸出 選項 等等. 力場系數(shù)可以通過這些命令定 義: pair_coeff, bond_coeff, angle

4、_coeff, dihedral_coeff, improper_coeff, kspace_style, dielectric, special_bonds. 注意, 其實力場系數(shù) 也可以在data文件中制定; 各種模擬參 數(shù)由這些命令設(shè)置: neighbor, neigh_modify, group, timestep, reset_timestep, run_style, min_style, min_modify. suppliment fix命令是lammps中很重要的一個命令, 它包括很多 子命令, 可以施加一系列的邊界條件、時間積分、 診斷選項等等; fix指令的用途是對一組原子

5、進行定義,可以用于更 新原子的位置、速度、控制溫度、加常力、施加邊 界條件等。當(dāng)兩個或更多fix在同一過程中作用時, 根據(jù)程序中的先后順序執(zhí)行fix指令。fix指令可通過 unfix指令來消除,形式為unfix fix-id) 模擬過程中通過下面的命令制定lammps進行各種計 算: compute, compute_modify, variable. 輸出選項由thermo, dump, restart命令設(shè)置. fix id groupid style args id = userassigned name for the fix id是用戶自己定義的 名字,便于通過fix定義 group

6、id = id of the group of atoms to apply the fix to style = one of a long list of possible style names (see below) args = arguments used by a particular style examples: fix 1 all nve fix 3 all nvt temp 300.0 300.0 0.01 fix mine top setforce 0.0 null 0.0 對于run 100 start 0 stop 1000 這個語句來說, 主要與fix語句配合使用

7、。 fix 1 all nvt 200.0 300.0 1.0 這兩個指令的功 能是在接下來的1000步運行中,每 run 100步,溫度都要從200度升到300度 fix 1 all nvt 200.0 300.0 1.0 對于左側(cè)的一組指令, 溫度隨著從0到10000步的執(zhí)行 run 1000 start 0 stop 10000 逐漸升至300.0度, 是一個發(fā)生在整個過程的漸變行為 run 1000 start 0 stop 10000 . run 1000 start 0 stop 10000(共10個) 至于pre and post大概是這樣的,pre no 的 意思是跳過初始設(shè)定

8、階段,如果以下的計 算是承接之前運行命令的話(意思是采用 之前的參數(shù)) 但是如果該run指令是第一個 指令是,該設(shè)定會被忽略。 若是post no,則跳過full timing summary, 輸 出one-line summary timing every 的作用是將一個run分成一系列較短的 runs variable q equal x run 6000 every 2000 print coord = $q 每運行2000步輸出一次某原子的x坐標值 要設(shè)定一組原子的溫度, 那么用group命令定 義哪些原子屬于這個組才行; 每個命令的詳細介紹中的restrictions部分會 說明要

9、使用該命令定義的時候哪些命令必 須要被預(yù)先定義; 如果你的輸入文件書寫的格式有問題, lammps在執(zhí)行的時候會提示error或者 warning , 出現(xiàn)類似信息時, 你可以到手冊 的第九章中查詢原因; (4)run a simulation 使用run命令開始一個分子動力學(xué)模擬, 用 minimize命令來實施能量最小化(molecular statics), 使用temper命令來進行parallel tempering(replica-exchange) simulation. commands listed by category initialization: atom_modif

10、y, atom_style, boundary, dimension, newton, processors, units; atom definition: create_atoms, create_box, lattice, read_data, read_restart, region, replicate; force fields: angle_coeff, angle_style, bond_coeff, bond_style, dielectric, dihedral_coeff, dihedral_style, improper_coeff, improper_style, k

11、space_modify, kspace_style, pair_coeff, pair_modify, pair_style, pair_write, special_bonds; settings: communicate, dipole, group, mass, min_modify, min_style, neigh_modify, neighbor, reset_timestep, run_style, set, shape, timestep, velocity; fixes: fix, fix_modify, unfix; computes: compute, compute_

12、modify, uncompute; output: dump, dump_modify, restart, thermo, thermo_modify, thermo_style, undump, write_restart; actions: delete_atoms, delete_bonds, displace_atoms, displace_box, minimize, run, temper; miscellaneous: clear, echo, if, include, jump, label, log, next, print, shell, variable. lammps

13、中特殊符號含義 (1) 命令行后的 thermo_style輸出的press是整個系統(tǒng)(包括邊界)全部原 子的勢能應(yīng)力6方向合力的平均值,為標量; compute stress/atom算出來的是每個原子的6個方向應(yīng) 力值(注意lammps算出來的這個值是沒有除體積的), 每個原子都有一個這樣的vector, 里面有6個量. thermo_modifynorm yes set options for how thermodynamic information is computed and printed by lammps為熱動力學(xué)信息的計算設(shè)置選項norm keyword determin

14、es whether various thermodynamic output values are normalized by the number of atoms or not, depending on whether it is set to yes or no. different unit styles have different defaults for this setting (see below). even if norm is set to yes, a value is only normalized if it is an extensive quantity,

15、 meaning that it scales with the number of atoms in the system.norm關(guān)鍵詞 設(shè)置為是或者否,決定不同的熱動力學(xué)結(jié)果的數(shù)值是否通過原 子的數(shù)量進行歸一化求解。不同的單位類型有對于設(shè)置具有不 同的默認值,即使被設(shè)定為是,數(shù)值也只有在數(shù)值很大時才被 歸一化,即它可以和體系的原子數(shù)目相比時才要歸一化。 velocityall create 10.1 2398378 set or change the velocities of a group of atoms in one of several styles. for each sty

16、le, there are required arguments and optional keyword/value parameters.the create style generates an ensemble of velocities using a random number generator with the specified seed as the specified temperature.設(shè)置及改 變一種或多種原子類型的原子的速度。 對于每種類 型的原子,有特定自變量和特定的關(guān)鍵詞或參量。 creat類型通過一個隨機數(shù)生成設(shè)備,利用特定的初 始溫度創(chuàng)建一個整體速度。

17、thermo 1 n = output thermodynamics every n timesteps 每n步輸出一次熱動力學(xué)量的結(jié)果 run 10 運行10次 the end of pure cu supliment ps的輸出文件主要可以分為三種:一種是 log.lammps,這里面記錄了 整個計算過程屏幕上顯示的所有信息,可 由thermo、thermo_modify等命令控制;另 一種是輸出應(yīng)力、能量、原子位置、速度 等等信息,由dump命令控制輸出文件;第 三種是斷點續(xù)算的restart文件輸出信息, 由write_restart命令控制 dump dump命令主要是用來輸出計算后

18、單個原子的相關(guān)信 息的。 dump id group-id style n file args id :自己給這個dump命令定義的一個代號(隨便?。?group-id:那些信息需要被輸出的原子群(預(yù)先定 義好group) style:類型 n:沒經(jīng)過多少時間步輸出信息 file:輸出名稱 args:相關(guān)參數(shù)(每個類型不同) 注意:對于周期性邊界條件而言,輸出的原子 坐標可能不在盒子定義的范圍之中,因為 because periodic boundary conditions are enforced only on timesteps when neighbor lists are rebu

19、ilt,(個人翻譯,不很確定:只有當(dāng)臨 位原子列表被更新的時候,周期性邊界條件才 執(zhí)行)。同時還需注意的是,當(dāng)lammps并行運 算的時候,輸出的原子信息的秩序可能有點混 亂。因為,同一個量的相關(guān)信息可能來自于不 同的處理器。一般這種情況多出現(xiàn)在atom, bond, and custom styles。對于style xyz,當(dāng) group的值不是all的時候也會出現(xiàn)這種情況。 而dcd and xtc styles這兩種類型輸出的原子都是 按順序排列好的。當(dāng)xyz的group是all的時候, 原子也是按序排列的。 style這個關(guān)鍵詞定義了輸出量以及相關(guān)的 格式。通過dump_modify

20、可以改變輸出值以 及文件本身的格式。 atom, bond, and custom styles這些類型輸出 的都是比較簡單的文本格式,直接打開就 可以閱讀里面的內(nèi)容。一些lammps的后處 理工具例如pizza.py也可以處理這種文件。 對于atom 類型,原子的坐標,id,以及類 型被輸出到dump文件中。默認情況下,原 子的坐標以分數(shù)坐標的形式顯示。 舉個簡單例子,如果定義的盒子長度=xh-xl, 則原子的分數(shù)坐標x0=(x-xl)/(xh-xl) 。通 過dump_modify可以把分數(shù)坐標變?yōu)榻^對坐 標。同時,image flags也可以在 dump_modify中進行相應(yīng)的設(shè)置。 對于bond類型,原子間的鍵拓撲信息輸入 到文件中,格式與在read-data命令中的data 中指明的格式一致。(簡單點就是與data中 設(shè)置的bond的格式一致)。同時與鍵有關(guān) 的原子的信息也會輸入到dump文件中。運 行過程中,一旦有bond被破壞了,那么 bond style會被置零,同時該鍵不輸入到file 中。而那些被turn off的鍵(see the f

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論