本篇內容來自微信公眾號“LAMMPS全能助手”,學習LAMMPS,收穫in和data檔案,照亮你的模擬之路。

該in檔案模擬水體系中銅奈米顆粒。水的模型採用SPC/E,銅採用EAM勢能。文末是完整的in檔案內容,初始和弛豫後的data檔案較大,請私信本人獲取。

利用弛豫完成後的data檔案可進一步得到發表論文的結果。

銅顆粒個數為25個。模型的初始構型如下圖所示:

LAMMPS的in和data檔案之奈米流體(水+銅奈米顆粒)分子動力學模擬

在正式模擬該奈米流體的性質之前需要對模型進行弛豫。由於模擬盒子和水分子個數並沒有保證正確的水密度,因此需要採用npt系綜進行弛豫。但是,如果僅採用npt系綜進行弛豫,奈米顆粒需要很長時間才能隨機分散在水中。因此需要採用fix move命令直接將奈米顆粒隨機移動分散至水體系中。

根據molecule關鍵詞對25個銅顆粒分組,然後以隨機的速度對25個銅顆粒在z方向上進行移動

,並跑12000步。然後unfix掉所有的fix move命令,繼續弛豫500000步,得到弛豫後的模型,如下圖。圖中為方便顯示銅奈米顆粒的位置水分子中氧原子和氫原子設定為了小點。在in檔案末尾寫出弛豫後的data檔案,然後基於新的data檔案繼續進行奈米流體粘度和熱導率等性質的模擬。透過region,delete_atoms,write_data命令組合還可以修改data檔案的規模以及奈米顆粒的體積分數。

LAMMPS的in和data檔案之奈米流體(水+銅奈米顆粒)分子動力學模擬

以下是data檔案內容

# ————————- Init Section ————————-

units

metal

boundary

p

p

p

neighbor

3

bin

neigh_modify

every

1

delay

0

check

yes

atom_style

full

bond_style

harmonic

angle_style

harmonic

pair_style

hybrid

lj

/

cut

/

coul

/

long

10。0

8。0

eam

kspace_style

pppm

0。0001

# ————————- Atom Definition Section ————————-

read_data

“system。data”

# ————————- Settings Section ————————-

bond_coeff

1

600。0

1。0

angle_coeff

1

75。0

109。47

pair_coeff

1

1

lj

/

cut

/

coul

/

long

0。00674

3。166

pair_coeff

1

2

lj

/

cut

/

coul

/

long

0。0

0。0

pair_coeff

1

3

lj

/

cut

/

coul

/

long

0。00674

3。166

pair_coeff

2

2

lj

/

cut

/

coul

/

long

0。0

0。0

pair_coeff

2

3

lj

/

cut

/

coul

/

long

0。0

0。0

pair_coeff

3

3

eam

Cu_u3

eam

group

gSPCE

type

1

2

group

cu

type

3

# ————————- Run Section ————————-

fix

fShakeSPCE

gSPCE

shake

0。0001

10

0

b

1

a

1

timestep

0。001

group

cu1

molecule

174241

group

cu2

molecule

174242

group

cu3

molecule

174243

group

cu4

molecule

174244

group

cu5

molecule

174245

group

cu6

molecule

174246

group

cu7

molecule

174247

group

cu8

molecule

174248

group

cu9

molecule

174249

group

cu10

molecule

174250

group

cu11

molecule

174251

group

cu12

molecule

174252

group

cu13

molecule

174253

group

cu14

molecule

174254

group

cu15

molecule

174255

group

cu16

molecule

174256

group

cu17

molecule

174257

group

cu18

molecule

174258

group

cu19

molecule

174259

group

cu20

molecule

174260

group

cu21

molecule

174261

group

cu22

molecule

174262

group

cu23

molecule

174263

group

cu24

molecule

174264

group

cu25

molecule

174265

fix

1

cu1

move

linear

0

0

0。08983251

units

box

fix

2

cu2

move

linear

0

0

1。033781702

units

box

fix

3

cu3

move

linear

0

0

0。482576846

units

box

fix

4

cu4

move

linear

0

0

0。334826836

units

box

fix

5

cu5

move

linear

0

0

0。812951092

units

box

fix

6

cu6

move

linear

0

0

0。537887812

units

box

fix

7

cu7

move

linear

0

0

1。034783019

units

box

fix

8

cu8

move

linear

0

0

0。348687209

units

box

fix

9

cu9

move

linear

0

0

0。717941483

units

box

fix

10

cu10

move

linear

0

0

0。578053483

units

box

fix

11

cu11

move

linear

0

0

0。137766905

units

box

fix

12

cu12

move

linear

0

0

0。462107571

units

box

fix

13

cu13

move

linear

0

0

0。920794478

units

box

fix

14

cu14

move

linear

0

0

0。579969177

units

box

fix

15

cu15

move

linear

0

0

0。679897353

units

box

fix

16

cu16

move

linear

0

0

0。405460791

units

box

fix

17

cu17

move

linear

0

0

0。663973968

units

box

fix

18

cu18

move

linear

0

0

0。352701278

units

box

fix

19

cu19

move

linear

0

0

0。350471979

units

box

fix

20

cu20

move

linear

0

0

1。011024934

units

box

fix

21

cu21

move

linear

0

0

0。194110638

units

box

fix

22

cu22

move

linear

0

0

0。534711756

units

box

fix

23

cu23

move

linear

0

0

0。187280787

units

box

fix

24

cu24

move

linear

0

0

0。66274587

units

box

fix

25

cu25

move

linear

0

0

0。227476212

units

box

dump

1

all

custom

10000

dump

lammpstrj

id

mol

type

x

y

z

compute

mytemp

gSPCE

temp

fix

fxnpt

gSPCE

npt

temp

300。0

300。0

0。1

iso

1。0

1。0

1。0

drag

1。0

fix_modify

fxnpt

temp

mytemp

run

120000

unfix

1

unfix

2

unfix

3

unfix

4

unfix

5

unfix

6

unfix

7

unfix

8

unfix

9

unfix

10

unfix

11

unfix

12

unfix

13

unfix

14

unfix

15

unfix

16

unfix

17

unfix

18

unfix

19

unfix

20

unfix

21

unfix

22

unfix

23

unfix

24

unfix

25

unfix

fxnpt

fix

fxnpt

all

npt

temp

300。0

300。0

0。1

iso

1。0

1。0

1。0

drag

1。0

run

500000

write_data

after_relax

data