Empty space in SIM BOX after Replicate data

Hello
I got a carbon structure from ReaxFF Simulation and Now I want to calculate the thermal conductivity of the System With airebo potential and NEMD method.
Since Thermal Conductivity Depends on Lenght, I used replicate commands in X and Y directions (also set periodic boundaries in 3D), which created empty space between repeated structures and cause Bad Dynamically and Some problems in Thermal Conductivity Calculation.
Do you have any ideas for me?

The replicate command literally just replicates the system. Thus, if there is space now, there was space there before, probably just around the (periodic?) boundaries and thus not as obviously visible in visualization.

Consequently, If you want to get rid of the space after the replication, you best get rid of it in the system before replicating it. How to do that depends strongly on the specific details of your system and thus no general advice can be given.