issue with calculating viscosity using RNEMD

Dear Lammps-users

I had an issue while trying to calculate the viscosity of water Using RNEMD - the script below-

There is a strange fluctuation in the dVx at several points in the simulation, where the dVx was lower than the steps before and after it by a factor of 10,000 - a section of the output is below the script- this causes a huge change in the resultant accumulative viscosity

can you help me with this please?

Muller-Plathe via fix viscosity

settings

variable x equal 99.3839
variable y equal 99.3839
variable z equal 99.3839

problem setup

units real
boundary p p p
atom_style full

atom_modify map array
pair_style lj/cut/coul/cut 12
bond_style harmonic
angle_style harmonic
dihedral_style opls

read_data ./data.gro2lam

neighbor 1.9 bin
special_bonds lj/coul 0.0 0.0 0.5
pair_modify shift no tail yes mix geometric
neigh_modify every 1 delay 1 check yes

timestep 1.0
velocity all create 300 97287

fix 1 all nve
fix 2 all langevin 300 300 1.0 498094

equilibration run

thermo 1000
run 5000

turn on Muller-Plathe driving force and equilibrate some more

velocity all scale 300

fix 4 all viscosity 100 x y 20

compute layers all chunk/atom bin/1d y center 4.969 units reduced
fix 5 all ave/chunk 20 50 1000 layers vx file profile.mp.3d

#equilibration run

variable dVx equal f_5[11][3]-f_5[1][3]
thermo 1000
thermo_style custom step temp epair etotal press f_4 v_dVx
run 10000

data gathering run

reset fix viscosity to zero flux accumulation

unfix 4
fix 4 all viscosity 100 x y 20

variable visc equal -(f_4/(2*(step-15000)(lxlz)))/(v_dVx/(ly/2))
fix vave all ave/time 1000 1 1000 v_visc ave running start 16000

thermo_style custom step temp f_4 v_dVx v_visc f_vave

run 500000

---------------------Log.lammps output---------------------

Per MPI rank memory allocation (min/avg/max) = 86.56 | 87.04 | 87.7 Mbytes

Step Temp f_4 v_dVx v_visc f_vave

419000 299.82445 -365.36663 -5.7438505e-06 -0.39362558 -0.070851354
420000 299.74964 -366.26734 2.7892209e-06 0.81058618 -0.068680325
421000 299.7882 -367.16928 -2.1509892e-06 -1.0510927 -0.071094115
422000 299.15376 -368.07082 2.3053985e-05 0.098068589 -0.0706795
423000 299.58143 -369.00934 1.0363854e-09 2181.6991 5.263721
424000 299.91542 -369.90874 -1.6336994e-05 -0.13840063 5.2505451
425000 299.93793 -370.82428 1.8357635e-05 0.12317045 5.2380697
426000 299.38568 -371.72269 6.4811841e-06 0.34886856 5.2262027
427000 300.46583 -372.63419 -1.0551138e-05 -0.21430145 5.2130296

Have you visualized the system? Does anything look
bad with the dyanmics at that point in time?

How many times have particles passed thru your box?
Possibly it exceeds the limit of what the image flags can store.
Unless you compile with -DLAMMPS_BIGBIG, the limit
is 512.

Steve