In your topology file, you have not added the ions and water molecules. If any issues then go through this tutorial https://www.youtube.com/watch?v=jeiWI6uBWO8
The "newbox" file, also known as the ".gro" file, should contain the coordinates of all the atoms in your system at the given time step. The fact that it shows "nan" instead of coordinates suggests that something went wrong during the simulation.
Here are some steps you can take to try to diagnose and solve the problem:
Check the simulation log files to see if there were any errors or warnings during the simulation. GROMACS typically outputs several log files during a simulation, including a ".log" file and several ".xtc" files. Look for any error messages or warnings that might indicate a problem with the simulation.
Check the input files to make sure that everything is set up correctly. Make sure that the topology file (.top) and the coordinate file (.gro) are both correct and consistent with each other. Also make sure that the simulation parameters, such as the number of steps and the time step size, are reasonable.
Try running a shorter simulation to see if the problem persists. If the problem only occurs after a certain amount of simulation time, it could be due to instability in the system or numerical errors. Running a shorter simulation can help diagnose this problem.
Check the force field parameters to make sure that they are appropriate for your system. The GROMACS package comes with several different force fields, and it's important to choose the one that is appropriate for your system.
Try visualizing the trajectory using a molecular graphics program, such as VMD or PyMOL. This can help you see if there are any obvious problems with the simulation, such as atoms flying off into space or the protein unfolding.
If none of these steps solve the problem, you may need to consult the GROMACS documentation or seek help from a GROMACS expert.