You are missing the points on my previous post, and blissfully ignoring the forum rules on clear communication, code formatting, cross-posting, etc.
You are integrating all atoms in fix all_npt all npt
and at the same time excluding the interactions between the atoms in the ele
group while zeroing the forces acting on them. Do you understand the physics of this choice?