|
注明:黃色部分基本上為不懂的部分,紅色字體為所做注釋 一、各種文件的介紹: 1 in file:建立該文件以便程序的寫入 2 log file:寫入狀態(tài)信息(if the switch is used?) 3 screen file 4 var name file 定義一個變量,name指變量名,可為字母也可為字符串,形式$x / $ {abc} 二、屏幕輸出: 結果顯示在屏幕上,同時在log file 中。開始前LAMMPS計算出所需的存儲空間,運行中每隔幾個時步顯示一次熱力學狀態(tài),直至輸出最終狀態(tài)。 Loop time of 49.002 on 2 procs for 2004
atoms Pair time (%) = 35.0495 (71.5267) Bond time (%) = 0.092046 (0.187841) Kspce time (%) = 6.42073 (13.103) Neigh time (%) = 2.73485 (5.5811) Comm time (%) = 1.50291 (3.06703) Outpt time (%) = 0.013799 (0.0281601) Other time (%) = 2.13669 (4.36041) Nlocal: 1002 ave, 1015 max, 989
min Histogram: 1 0 0 0 0 0 0 0 0
1 Nghost: 8720 ave, 8724 max, 8716 min Histogram: 1 0 0 0 0 0 0 0 0 1 Neighs: 354141 ave, 361422 max, 346860 min Histogram: 1 0 0 0 0 0 0 0 0 1 Total # of neighbors =
708282 Ave neighs/atom = 353.434 Ave special neighs/atom = 2.34032 Number of reneighborings = 42 Dangerous reneighborings = 2 當運用了能量最小化命令進行能量最小化時,還將出現(xiàn)如下所示語句: Minimization stats: E initial, next?to?last, final = ?0.895962 ?2.94193
?2.94342 Gradient 2?norm init/final= 1920.78
20.9992 Gradient inf?norm init/final= 304.283
9.61216 Iterations =
36 Force evaluations =
177 當程序中有kspace_style long?range Coulombics solve,將會顯示以下語句: FFT time (% of Kspce) = 0.200313
(8.34477) FFT Gflps 3d 1d?only = 2.31074
9.19989 每秒執(zhí)行的浮點指令次數(shù)(flops)為5N*log(2N),N為3維晶體中的節(jié)點數(shù) The 3d rate is with communication; the 1d rate iswithout (just the 1d FFTs). 在GPU(圖形處理單元)上的運行 三、指令系統(tǒng)介紹(*) 一般來說指令的順序并不重要,膽在以下幾種情況中必須注意:
1
2
3 四、語法規(guī)則 Strings 用大寫。
1
2
3
4
5
6 五、輸入的語句結構 1 初始化 2 原子定義 3 設定 4 進行模擬 初始化階段:設定所需參數(shù),相關各項命令,引入所需的力場參數(shù) 相關命令介紹: 1 語句形式: units style · style = lj or real or metal or si or cgs or electron Examples: units metal units lj 該語句定義了單元類型,除了LJ類型,其他物理常量來自于某網(wǎng),定義實際單元的熱能=4.184J。 而在LJ類型中,所有變量都是無單位的(參考陳義龍的論文) 實際量換算成簡化單位量有系列公式。 以下列出了換算關系及其它各種類型中所使用的標準單位。 This command cannot be used after the simulation box is defined by a read_data or create_box command. 缺省狀態(tài)默認為LJ類型
2
· N = 2 or 3 一般缺省為3d模擬,2d模擬的話要在建立simulation box之前進行設定(其余省略) COMMANDS LISTED BY CATEGORY 初始化指令:atom_modify, atom_style, boundary, dimension, newton, processors, units 原子定義指令:create_atoms, create_box, lattice, read_data, read_restart, region, replicate 力場指令:angle_coeff, angle_style, bond_coeff, bond_style, dielectric, dihedral_coeff, dihedral_style, improper_coeff, improper_style, kspace_modify, kspace_style, pair_coeff, pair_modify, pair_style, pair_write, special_bonds 設定指令:communicate, dipole, group, mass, min_modify, min_style, neigh_modify, neighbor, reset_timestep, run_style, set, shape, timestep, velocity FIXES Computes: compute, compute_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, prd, run, temper Miscellaneous: clear, echo, if, include, jump, label, log, next, print, shell, variable 六 how to discussions()
重啟一個模擬。有3種方法繼續(xù)長的LAMMPS程序。在同一個程序中可多次使用運行命令。每次運行都會接著上一條運行指令(run
command)進行。Binary file
1 syntax
Examples: run 10000 run 1000000 upto run 100 start 0 stop 1000 run 1000 pre no post yes run 100000 start 0 stop 1000000 every 1000 "print Protein Rg = $r" run 100000 every 1000 NULL (補充說明 fix 指令: Syntax: fix ID group?ID style args · ID = user?assigned name for the fix
· group?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 fix指令的用途是對一組原子進行定義,可以用于更新原子的位置、速度、控制溫度、加常力、施加邊界條件等。當兩個或更多fix在同一過程中作用時,根據(jù)程序中的先后順序執(zhí)行fix指令。Fix指令可通過unfix指令來消除,形式為unfix fix-ID) 對于run 100 start 0 stop 1000 這個語句來說,主要與fix語句配合使用。 fix 1 all nvt 200.0 300.0 1.0 run 1000
fix 1 all nvt 200.0 300.0
1.0 run 1000 start 0 stop
10000 run 1000 start 0 stop 10000 ... run 1000 start 0 stop 10000(共10個) 至于pre and post大概是這樣的,pre no
的意思是跳過初始設定階段,如果以下的計算是承接之前運行命令的話(意思是采用之前的參數(shù)) 注意:當兩次運行指令之間使用了修改設定值的命令時(比如fix等),pre
no是不允許的,必須重新設定,否則報錯 若是post no,則跳過full timing summary, 輸出one-line summary timing Every 的作用是將一個run分成一系列較短的runs variable q equal
x[100] run 6000 every 2000 "print Coord = $q" 每運行2000步輸出一次某原子的x坐標值 Default: The option defaults are start = the current
timestep, stop = current timestep + N, pre = yes, and post =
yes. 2 restart command (將binary files存入硬盤)
Syntax: restart
0 restart N root restart N file1 file file1,file2 = two full filenames, toggle between them when writing file Examples: restart 0 restart 1000 poly.restart restart 1000 restart.*.equil restart 10000 poly.%.1 poly.%.2 restart 0 意味著不輸出restart files。與dump文件一樣,restart不能包含兩個wild card characters(即通配符)。若filename中含有*號,則它會被目前的值所代替(該情況只在僅有一個filename的情況下成立) |
|
|
來自: day_day__UP > 《website source》