Umbrella sampling for a protien ligand system

GROMACS version:2022.3
I have to perform umbrella sampling for a protein-ligand complex. The tutorial on the website doesn’t seem to be a protein ligand complex and I have trouble generating the topology file for my complex. Since I had already done 100nm md simulation for the protien-ligand complex (On which I am now trying to perform Umbrella Samplng) earlier, I exported the final frame of that simulation as complex.gro and reused the topology file from that simulation after clearing the ions and updating it with a new posres file generated for the receptor (I reused the posres file from the md simulation for the ligand) but after solvation, em and npt equilibrium the receptor appears to be outside the box when visualised with vmd (the ligand and the water molecules are inside the box). How do I fix this issue? Is there a better way to do this from scratch? Is using the output from the molecular docking a better option? If so how do I do it (generate the topology and create posres and update the topol file), note that I had used the charmm force for the md simulation and I wish to use the same here for this as well.

Have you checked if this is not simply a PBC issue? gmx trjconv with -center -pbc mol -ur compact might help, depending on which geometry you chose for the simulation box. For the generation of your topology, Justin Lemkul’s tutorial on Protein-Ligand MD simulations might help. If you already have a structure of your system including the complex, starting from scratch with docking should be unnecessary.