小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

開始進行l(wèi)ammps手冊的學習啦,跟著Manual一邊翻譯一邊做吧!

 day_day__UP 2015-03-26
     

注明:黃色部分基本上為不懂的部分,紅色字體為所做注釋

一、各種文件的介紹:

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         每個處理器中特定原子的數(shù)目  

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  (顯示初終能量以及next-to-last 循環(huán)的能量)

Gradient 2?norm init/final= 1920.78 20.9992  (給出能量梯度,即所有原子的受力)

Gradient inf?norm init/final= 304.283 9.61216   2-form是力向量的長度,inf-form是最大構成?

Iterations = 36              循環(huán)次數(shù)                         

Force evaluations = 177    對力進行評定的次數(shù)

 

當程序中有kspace_style long?range Coulombics solve,將會顯示以下語句:

FFT time (% of Kspce) = 0.200313 (8.34477)  完成3d FFT計算的時間及在總時間中占的百分比

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)介紹(*

一般來說指令的順序并不重要,膽在以下幾種情況中必須注意:

        LAMMPS并不是全部讀完所有指令才執(zhí)行,而是讀一行執(zhí)行一次,因此下面的兩組語句是不同的:

    timestep 0.5   以下的兩個模擬其步長均為0.5 fmsec

    run 100

    run 100

 

    run 100         第一個模擬采用缺省值步長為1 fmsec

    timestep 0.5

    run 100         第二個采用步長為0.5 fmsec

        某些指令只在其他指令之后才生效,如要得到系統(tǒng)溫度必須先進行各種定義

        若A指令在B之前,B可以引用A定義的變量

 

四、語法規(guī)則

  在LAMMPS中要區(qū)分大小寫,一般指令名稱用小寫字母,文件及用戶定義ID

Strings 用大寫。

 

  LAMMPS對每行語句的語法要求如下:

        當語句太長一行放不下時,在語句一行結束的時候輸入字符 “” 表示下一行的語句接著上一行繼續(xù)。

        在#之后輸入的字符認為是評論語句,是無用的,但有例外

        緊跟在$后定義變量(之前講過)

        單詞間用空格隔開

        第一個詞為指令名,接下來的字母全都為自變量(arguments)

        If you want text with spaces to be treated as a single argument, it can be enclosed in double quotes

 

五、輸入的語句結構

 

    一個普通的LAMMPS程序通常由以下四部分組成:

1 初始化

2 原子定義

3 設定

4 進行模擬

 

初始化階段:設定所需參數(shù),相關各項命令,引入所需的力場參數(shù)

相關命令介紹:

units command

語句形式:

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類型

 

        語句形式:

    dimension N

· N = 2 or 3   例如:dimension 2

一般缺省為3d模擬,2d模擬的話要在建立simulation box之前進行設定(其余省略)

 

COMMANDS LISTED BY CATEGORY

 以下列出的LAMMPS命令以按類分好,其分類情況如下:

初始化指令: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  fix, fix_modify, unfix

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  使用restart command將binary files存入硬盤中,之后用read-restart命令可將binary file讀出。或者可轉為text data files,經(jīng)read-data命令讀出。restart2data

    涉及到的命令:

        run command

syntax

    run N keyword values……(N= # of timesteps; zero or more keyword/value pairs may be appended; keyword= upto or start or stop or pre or post or every)

Examples:

run 10000  # 運行10000步;N=0意味著直接把現(xiàn)系統(tǒng)的熱力學值輸出

run 1000000 upto  # 從當前開始一直運行至upto所指定的數(shù)值(該語句意為運行至10000000步止)

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  ID是用戶自己定義的名字,便于通過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     這兩個指令的功能是在接下來的1000步運行中,每

run 1000                              步的溫度都要從200度升到300度

 

fix 1 all nvt 200.0 300.0 1.0      對于左側的一組指令,溫度隨著從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ù))  但是如果該run指令是第一個指令是,該設定會被忽略。

注意:當兩次運行指令之間使用了修改設定值的命令時(比如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.   在run語句中的缺省值

 

2 restart command (將binary files存入硬盤)  restart文件是lammps的一種輸出文件形式

Syntax:

restart 0          N = write a restart file every this many timesteps

restart N root    root = filename to which timestep # is appended

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的情況下成立)

 

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內容均由用戶發(fā)布,不代表本站觀點。請注意甄別內容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內容,請點擊一鍵舉報。
    轉藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多