  In $4d/5d$ transition-metal systems, many interesting physical properties
arise from the interplay of bandwidth, electronic correlations, and spin-orbit
interactions. Here, using {\it ab initio} density functional theory, we
systematically study the double-perovskite-like system K$_2$Os$X_6$ (X = F, Cl,
and Br) with a $5d^4$ electronic configuration. Our main result is that the $J
= 0$ nonmagnetic insulating state develops in this system, induced by strong
spin-orbital coupling. Specifically, the well-separated Os$X_6$ octahedra lead
to the cubic crystal-field limit and result in dramatically decreasing hoppings
in nearest neighbor Os-Os sites. In this case, the three degenerate $t_{2g}$
orbitals are reconstructed into two ``effective'' $j_{\rm eff}$ ($j_{\rm eff} =
1/2$ and $j_{\rm eff} = 3/2$ states) states separated by the strong SOC,
opening a gap with four electrons occupying the $j_{\rm eff} = 3/2$ orbitals.
Furthermore, the hybridization between the Os $5d$ orbitals and the $X$ ($X$ =
F, Cl, and Br) $p$ orbitals increases from F to Br, leading the electrons in
K$_2$OsF$_6$ to be more localized than in K$_2$OsCl$_6$ and K$_2$OsBr$_6$,
resulting in a smaller bandwidth for K$_2$OsF$_6$ than in the Cl- or Br- cases.
Our results provide guidance to experimentalists and theorists working on this
interesting family of osmium halides.
