in文件——生成水盒子的快捷方法、各種水分子參數spc、spc/e、tip4p等


生成水盒子的in文件代碼和data文件見以下鏈接:

https://files.cnblogs.com/files/sysu/creat-water-box.zip?t=1698124054&download=true

 

1.in文件

# TIP4P/2005 water system

variable temp index 300.0
variable filename1 index nve

units real
atom_style full
boundary p p p

pair_style lj/cut/tip4p/long 1 2 1 1 0.1546 10.5 8.0       #如果是其他類型水分子,需要修改   pair_style lj/cut/coul/long  10  8.5
pair_modify mix arithmetic tail yes
kspace_style pppm/tip4p 1.0e-6                                    #其他水分子      kspace_style ewald  1.0e-6
bond_style harmonic
angle_style harmonic

read_data tip4p-2005.data
replicate 20 10 10 #復制擴胞為20a*10b*10c = 62*31*31,6000 atoms,2000個水分子

pair_coeff 1 1 0.1852 3.1589                                       #其他水分子  pair、bond、angle、mass也要修改
pair_coeff * 2 0 0

bond_coeff 1 0 0.9572 # o*-h*
angle_coeff 1 0 104.5200 # h*-o*-h*

mass 1 15.9994
mass 2 1.008

set type 1 charge -1.1128 #TIP4P/2005 的水模型,data文件中也要相應修改 pair、bond、angle系數
set type 2 charge 0.5564


neighbor 1.0 bin
neigh_modify delay 0 every 1 check yes

write_data waterbox.data #輸出

################################# nve equilibrium ############################
#模擬過程中,水分子的鍵長和健角使用shake方法保持不變
fix WT all shake 0.0001 100 0 b 1 a 1 #約束bond、angle和原子質量,設置剛性

velocity all create 300.0 4928459 rot yes dist gaussian
variable density equal mass(all)*10/(6.0221417930*vol)
timestep 1
thermo 1000
thermo_style custom step temp lx ly lz press pxx pyy pzz vol epair ebond eangle pe ke etotal density v_density
dump 1 all atom 1000 ${filename1}.lammpstrj

fix 1 all nve
run 100000

write_restart ${filename1}.restart
write_data ${filename1}.data

 

2.另外准備一個元胞的data

#LAMMPS 'data.' description

3 atoms
2 bonds
1 angles

2 atom types
1 bond types
1 angle types

0.0 3.1 xlo xhi
0.0 3.1 ylo yhi
0.0 3.1 zlo zhi

Atoms

1 1 1 -1.1128 1.55000 1.55000 1.50000
2 1 2 0.5564 1.55000 2.30695 2.08588
3 1 2 0.5564 1.55000 0.79305 2.08588

Bonds

1 1 1 2
2 1 1 3

Angles

1 1 2 1 3

 

 

3.各種水分子的參數

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM