  Oxides with $4d$/$5d$ transition metal ions are physically interesting for
their particular crystalline structures as well as the spin-orbit coupled
electronic structures. Recent experiments revealed a series of $4d$/$5d$
transition metal oxides $R_3M$O$_7$ ($R$: rare earth; $M$: $4d$/$5d$ transition
metal) with unique quasi-one-dimensional $M$ chains. Here first-principles
calculations have been performed to study the electronic structures of
La$_3$OsO$_7$ and La$_3$RuO$_7$. Our study confirm both of them to be Mott
insulating antiferromagnets with identical magnetic order. The reduced magnetic
moments, which are much smaller than the expected value for ideal high-spin
state ($3$ $t_{2g}$ orbitals occupied), are attributed to the strong $p-d$
hybridization with oxygen ions, instead of the spin-orbit coupling. The
Ca-doping to La$_3$OsO$_7$ and La$_3$RuO$_7$ can not only modulate the nominal
carrier density but also affect the orbital order as well as the local
distortions. The Coulombic attraction and particular orbital order would prefer
to form polarons, which might explain the puzzling insulating behavior of doped
$5d$ transition metal oxides. In addition, our calculation predict that the
Ca-doping can trigger ferromagnetism in La$_3$RuO$_7$ but not in La$_3$OsO$_7$.
