Dear all,
When I tried to simulate the NEMD processes with fix ehex and fix nve command, the temperature and energy of the whole system are improving with simulation time. In my mixture, n-heptane is set as non-rigid molecule and benzene is set as rigid molecule, each of them has 500 molecules and the mixture has 1000 molecules totally. Both of the n-heptane and benzene use Trappe-UA force field, and the particles has no charge. Therefore, I did not use kspace command in the simulation. When the system become stable in 303.15 K and 1 atm, I tried to used fix ehex command to make a hot region in the middle of the box and two cold regions in the boundaries. The benzene use fix rigid/nve/small command and n-heptane use fix nve command to make the whole system perform nve dynamics. However, I found that the temperature and energy of the whole system are improving. I have tried to test the energy conservation in nve ensemble without ehex algorithm when the simulation timestep set as 2 fs and 1 fs, both simulations are in good energy conservation. But when I add the fix ehex command, the energy is improving both when the timestep set as 2 fs and 1 fs. Could you give me some advice to avoid this problem? here is my input file and log file. I also plot the drawing of energy vs timestep.
########################################################################## input file
#restart file for benzene-n-heptane (0.5) model with number of 1000
log 0.5-nc7-3-nve.log
echo both
read_restart restart.1667000.nvt
neighbor 2.0 bin
neigh_modify every 1 delay 0 check yes exclude molecule/intra benzene
reset_timestep 0
################################################ test NVE (timestep=2fs)
timestep 2
fix 1 benzene rigid/nve/small molecule
fix 2 heptane nve
thermo 1000
thermo_style custom step temp ke pe etotal press
run 5000000
############################################### test NVE (timestep=1fs)
timestep 1
run 5000000
unfix 1
unfix 2
############################################### fix ehex process
reset_timestep 0
restart 2000000 restart.*.ehex1
variable delta equal (zhi-zlo)/20
variable zhi_T1 equal zhi-(zhi-zlo)/2+{delta}
variable zlo_T1 equal zhi-(zhi-zlo)/2-{delta}
variable zhi_T21 equal zlo+{delta}
variable zlo_T21 equal zlo
variable zhi_T22 equal zhi
variable zlo_T22 equal zhi-{delta}
region T1_region block INF INF INF INF {zlo_T1} {zhi_T1}
region T21_region block INF INF INF INF {zlo_T21} {zhi_T21}
region T22_region block INF INF INF INF {zlo_T22} {zhi_T22}
fix 1 benzene rigid/nve/small molecule
fix 2 heptane nve
fix T1_fix all ehex 1 0.008 region T1_region
fix T21_fix all ehex 1 -0.004 region T21_region
fix T22_fix all ehex 1 -0.004 region T22_region
thermo 1000
thermo_style custom step temp ke pe etotal c_T1 c_T21 c_T22
run 1000000