上次介紹了,非平衡做功的方法計算自由能,其實fix smd繼承了fix

spring的一些功能,也可以進行傘狀抽樣,進而用wham方法分析,獲得比較好的自由能(PMF)曲線。umbrella方法是目前比較成功,且應用比較廣的加強抽樣方法,在定義反應座標之後(可以是兩個group的距離,或者某一方面上的距離),採用彈簧勢限制位置進行抽樣即可。傘狀抽樣,可以克服在高能壘下抽樣不充分的缺陷。

對於大粒子體系,比如奈米粒子與膜作用;兩個奈米粒子的有效相互作用等等,比較常用。

技術上比較簡單。大致步驟如下:

1。 利用steered MD cvel速度不為0,慢拉,獲得每個反應座標上,每個視窗下的初始結構(比如距離是 5 4 3 2 1下的初始結構)

2。 每個視窗下,限制距離跑平衡,然後輸出要處理的資料資訊

3。WHAM方法進行資料處理。

下面是一個傘狀抽樣的例項。供大家學習(注:例項中,熱浴、相互作用等設定只求簡單,不求合理)。

## example steered MD for two particles

echo screen

units lj

atom_style atomic

atom_modify map array

dimension 2

region box block 0 20 0 20 -0。5 0。5 units box

create_box 2 box

create_atoms 1 random 300 12345 box units box

set atom 10 type 2

set atom 20 type 2

mass 1 1。0

mass 2 5。0

# multi neighbor and comm for efficiency

neighbor 1 multi

neigh_modify delay 0

comm_modify mode multi

# interaction

pair_style lj/cut 2。5

pair_coeff 1 1 1。0 1。0 2。5

pair_coeff 1 2 1。0 1。0 2。5

pair_coeff 2 2 1。0 1。0 2。5

# minimize and equilibrium

minimize 10e-4 10e-6 10000 100000

velocity all create 1。0 87287 loop geom

fix 10 all nve

fix 20 all temp/rescale 1 1。0 1。0 0。05 1。0

fix 30 all enforce2d

run 10000

write_restart restart。data

timestep 0。001

thermo 1000

thermo_style custom step temp

group pull1 id 10

group pull2 id 20

###loop for umbrella windows 採用label, next,jump方法進行多視窗抽樣,輸出多個檔案利於進一步資料分析。

label loop

variable dr0 index 6。5 6。0 5。5 #不同視窗:兩粒子間距離

# fix smd umbrella / equilibrium

fix 40 pull1 smd cvel 20。0 0。0 couple pull2 auto auto auto ${dr0}

run 1000

# output data

variable tt equal dt*step

variable dr equal f_40[6]

fix 50 pull1 print 10 “${tt} ${dr}” file umbrella。${dr0}。pmf screen no

dump ${dr0} all custom 100 smd。${dr0}。lammpstrj id type x y z

run 5000

next dr0

jump

http://

umbrella。in

loop

注:該迴圈會生成一系列的umbrella。${dr0}。pmf檔案,這個檔案是用於wham方法進行資料分析的基礎檔案,軌跡檔案也有一系列,供大家分析結構