Transition dipole moments (atomic units) from the core hole to the final states of CO+ (figure 1) at the equilibrium geometry computed on the MCSCF level with the cc-pvtz basis set using the MOLPRO ab initio package 
Table 1. Transition dipole moments (atomic units) from the core hole to the final states of CO+ (figure 1) at the equilibrium geometry computed on the MCSCF level with the cc-pvtz basis set using the MOLPRO ab initio package .
We theoretically demonstrate the feasibility of x-ray lasing in the CO molecule by the core ionization of the C K- and O K-shell by x-ray free-electron laser sources. Our numerical simulations are based on the solution of generalized Maxwell–Bloch equations, accounting for the electronic and nuclear degrees of freedom. The amplified x-ray emission pulses have an extremely narrow linewidth of about 0.1 eV and a pulse duration shorter than 30 fs. We compare x-ray lasing transitions to the three lowest electronic states of singly ionized CO. The dependence of the lasing efficiency on the spectral width of the x-ray fluorescence band, value and orientation of the electronic transition dipole moment, lifetime of the core-excited state and the duration of the pump pulse is analysed. Using a pre-aligned molecular ensemble substantially increases the amplified emission. Moreover, by controlling the molecular alignment and thereby the alignment of the transition dipole moment polarization, the control of the emitted x-ray radiation is achievable. Preparing the initial vibrational quantum state, the x-ray emission frequency can be tuned within the fluorescence band. The present scheme is applicable to other diatomic systems, thereby extending the spectral range of coherent x-ray radiation sources based on stimulated x-ray emission on bound transitions.