|
|
从官网下的in文件,得到的表面张力也不对。恳求各位看下哪出了问题。。
units real
atom_style full
read_data data.singleTIP4P-2005
include forcefield.TIP4P-2005
pair_modify tail no
replicate 20 20 20
variable xLo equal -0.5*lx
variable xHi equal 0.5*lx
variable yLo equal -0.5*ly
variable yHi equal 0.5*ly
variable zLo equal -0.5*lz
variable zHi equal 0.5*lz
# Recenter system coords about the origin (0,0,0):
displace_atoms all move ${xLo} ${yLo} ${zLo} units box
# Adjust box dimensions:
change_box all x final ${xLo} ${xHi} units box
change_box all y final ${yLo} ${yHi} units box
change_box all z final ${zLo} ${zHi} units box
# Increase z edge to yield "Vacuum|Water|Vacuum" system:
variable zLoNew equal -2.5*lz
variable zHiNew equal 2.5*lz
change_box all z final ${zLoNew} ${zHiNew} units box
variable Nblock equal 10000
variable Nrun equal 2.0*${Nblock}
# variable Ndump equal ${Nrun}/2
variable Ne equal 100
variable Nr equal ${Nblock}/${Ne}
variable Nf equal ${Nrun}
variable Dz equal 10
variable A_in_m equal 1e-10 # Angstrom in meter
variable atm_in_Pa equal 101325 # note: 1 Pa = 1 N/m^2
variable N_in_mN equal 1e3 # Newton in milliNewton
variable convFac equal ${A_in_m}*${atm_in_Pa}*${N_in_mN}
variable Text equal 340
group hydrogen type 1
group oxygen type 2
velocity all create ${Text} 12345
neighbor 2.0 bin
neigh_modify every 1 delay 0 check yes
timestep 2.0
# fix loadBalance all balance 20 z 5 1.05
fix constrain all shake 1.0e-4 100 0 b 1 a 1
fix integrate all nvt temp ${Text} ${Text} 200.0
fix removeMomentum all momentum 1 linear 1 1 1
compute T all temp
fix TAve all ave/time ${Ne} ${Nr} ${Nf} c_T
variable P equal press
fix PAve all ave/time ${Ne} ${Nr} ${Nf} v_P
variable xPress equal c_thermo_press[1]
variable yPress equal c_thermo_press[2]
variable zPress equal c_thermo_press[3]
# Evaluate and average surface tension in mN/m:
variable st equal 0.5*lz*(v_zPress-0.5*(v_xPress+v_yPress))*${convFac}
fix st all ave/time ${Ne} ${Nr} ${Nf} v_st
variable xyArea equal lx*ly
thermo_style custom step temp f_TAve press f_PAve v_xyArea lz f_st
thermo_modify flush yes
thermo ${Nrun}
compute A all chunk/atom bin/1d z center ${Dz} units box
fix massDensA all ave/chunk ${Ne} ${Nr} ${Nf} A density/mass &
file massDensA.zProfile
dump trj all atom 100 wat.lammpstrj
dump_modify trj scale no sort id
dump 123 all custom 200 dump.h2o.lv.* id type x y z vx vy vz c_A
run ${Nrun}
|
|