I always assume a reasonable average being 4.25-4.75mm (base of atty to tip of pin). I try to accommodate 4.1→4.85mm to catch the really screwy ones. If you can have your resting state at 4mm depth, and a full mm of compression/downward-adjustment, you'll be golden.
If you're going to be using various o-rings between atty base and
mod top, you'll need to account for that too, of course. You can cut an o-ring well in the top of the
mod, around the 510 rim, or you'll have to subtract for that thickness (which leaves less thread engaged in the 510). You can also try a 1x6mm o-ring like a collar around the base of the atty's 510. This will seat in the unthreaded, larger diameter, topmost part of the
mod 510 connector.