|
|
【答案】应助回帖
★ ★ ★ ★ ★ 感谢参与,应助指数 +1 jmforever123: 金币+5, ★★★很有帮助 2016-06-14 15:19:55
这里有个例子,你参考一下能用不
units metal
dimension 3
boundary p p f
atom_style full
read_data mixed-graph-water.dat
neighbor 3.0 bin
neigh_modify delay 0 every 1 check yes
# set potential function and parameters
### Create Groups ###
group hy type 2 # H_water
group ox type 3 # O_water
set group ox charge -0.8476 #给氢 氧原子带电
set group hy charge 0.4238
region box block INF INF INF INF INF INF units box
group graphite type 1
group boxes region box
### Flexible SPC/E Potential Parameters ###
### Zhang et al., Fluid Phase Equilibria, 262 (2007) 210-216 ###
### 设置氢氧原子间的作用
pair_style hybrid/overlay rebo lj/cut/coul/long 10.0
pair_coeff * * rebo ./potential/CH.airebo C NULL NULL
pair_coeff 1 2 lj/cut/coul/long 0.0 0.0 # C-H
pair_coeff 1 3 lj/cut/coul/long 0.013 2.71 # C-O
pair_coeff 2 2 lj/cut/coul/long 0.0 0.0 # H-H
pair_coeff 2 3 lj/cut/coul/long 0.0 0.0 # H-O
pair_coeff 3 3 lj/cut/coul/long 0.0067 3.166 # O-O
bond_style harmonic
bond_coeff 1 7.669 1.0
angle_style harmonic
angle_coeff 1 1.829 109.47
kspace_style pppm 1.0e-5 #final npt relaxation
kspace_modify slab 3.0
thermo 1
thermo_style custom step pe etotal press temp
thermo_modify norm no
dump myatom all custom 500 atom.dat id
group slab type 1 # graphite_slab
group water type 2 3
timestep 0.0001
velocity all create 10.0 482748 dist gaussian
fix freaze_slab slab move linear 0.0 0.0 0.0 #This can be useful for boundary or other atoms, whose movement can influence nearby atoms.
# move style args
fix zwall water wall/reflect zhi EDGE
# wall/reflect face arg ... keyword value ...
fix 1 all nve
fix 2 all temp/rescale 10 10.0 10.0 0.02 1.0 ##温度设置为10度
# temp/rescale N Tstart Tstop window fraction
fix shake_1 water shake 1e-5 500 0 b 1 a 1 # 算法固定键长键角 化学键的断裂、生成
dump 1 graphite custom 1 graphite.lammpstrj id type xs ys zs
# style tol iter N constraint values constraint values
dump dcd_1 all dcd 100 nve_10.dcd
run 10000
write_restart restart.10.*
unfix 2
unfix shake_1
undump dcd_1
fix 3 all temp/rescale 10 10.0 100.0 0.02 1.0
fix shake_2 water shake 1e-5 500 0 b 1 a 1
dump dcd_2 all dcd 100 nve_10_100.dcd
run 10000
write_restart restart.10_100.*
unfix 3
unfix shake_2
undump dcd_2
fix 4 all temp/rescale 10 100.0 200.0 0.02 1.0
fix shake_3 water shake 1e-5 500 0 b 1 a 1
fix shake_3 water shake 1e-5 500 0 b 1 a 1
dump dcd_3 all dcd 100 nve_100_200.dcd
run 10000
write_restart restart.100_200.*
unfix 4
unfix shake_3
undump dcd_3
fix 5 all temp/rescale 10 200.0 298.0 0.02 1.0
fix shake_4 water shake 1e-5 500 0 b 1 a 1
dump dcd_4 all dcd 100 nve_200_298.dcd
run 10000
write_restart restart.200_298.*
unfix 5
unfix shake_4
undump dcd_4
fix 6 all temp/rescale 10 298.0 298.0 0.02 1.0
fix shake_5 water shake 1e-5 500 0 b 1 a 1
dump dcd_5 all dcd 100 nve_298_298.dcd
run 10000
write_restart restart.298.* |
|