I don't know. Your input script is far too complicated for me
to look into. I would debug it my simplifying it considerably
and dumping out atom positions and velocities and visualizing
a small system. One possibility is that you are confusing lattice
and box units for some command(s). The scale difference will
be a factor of 3.6 for your system.