This script worked very well and I was able to get a system with ions that are nicely spaced apart from each other (and my protein), but I was wondering, how may I adapt this to make sure that the ions aren't placed too close to the edges of my water box? I am running MD using periodic boundary conditions (image/crystal) and noticed that one of my ions hopped to the other side of the system and is now interacting too closely with an ion that was placed close to that edge of the box.

Thanks smile


- Kellen -