  The spectra (rotational, rotation-vibrational or electronic) of diatomic
molecules due to transitions involving only closed-shell ($^1\Sigma$)
electronic states follow very regular, simple patterns and their theoretical
analysis is usually straightforward. On the other hand, open-shell electronic
states lead to more complicated spectral patterns and, moreover, often appear
as a manifold of closely lying electronic states, leading to perturbations with
even larger complexity. This is especially true when at least one of the atoms
is a transition metal. Traditionally these complex cases have been analysed
using approaches based on perturbation theory, with semi-empirical parameters
determined by fitting to spectral data.
  Recently the needs of two rather diverse scientific areas have driven the
demand for improved theoretical models of open-shell diatomic systems based on
an \emph{ab initio} approach, these areas are ultracold chemistry and the
astrophysics of "cool" stars, brown dwarfs and most recently extrasolar
planets. However, the complex electronic structure of these molecules combined
with the accuracy requirements of high-resolution spectroscopy render such an
approach particularly challenging. This review describes recent progress in
developing methods for directly solving the effective Schr\"odinger equation
for open-shell diatomic molecules, with a focus on molecules containing a
transtion metal. It considers four aspects of the problem: 1. The electronic
structure problem, 2. Non-perturbative treatments of the curve couplings, 3.
The solution of the nuclear motion Schr\"odinger equation, 4. The generation of
accurate electric dipole transition intensities. Examples of applications are
used to illustrate these issues.
