It is sometimes difficult to determine the structure of some molecules because the optimization using standard ab initio methods (coupled-cluster with single, double, and perturbative triples [CCSD(T)] level) does not give the correct result and the experimental and semiexperimental methods are not accurate because the system of normal equations of the least-squares method is ill-conditioned. In such a case, it may be still possible to derive an accurate equilibrium structure in the following way: the experimental rotational constants are compared to those obtained at the CCSD(T) level, the latter being corrected to take into account the rovibrational correction (and, if necessary, the electronic correction). Extrapolating (or interpolating) the rotational constants calculated with different basis sets (e.g. cc-pwCVTZ and cc-pwCVQZ) towards the experimental values as a function of the bond lengths and angles permits to obtain an accurate equilibrium structure. This method is first tested on two molecules for which the multireference effects are important: O3 and HOON. It is then, applied to molecules with a weak N–X bond (HONO, FNO, ClNO, FNO2, and N2O) for which the single reference CCSD(T) method gives bonds that are too short. The results are compared to the experimental and semiexperimental equilibrium structures. As a further check, the structure of ClNO is calculated at the CCSDTQ level and the structures of FNO and ClNO are calculated at the MRCI-F12 level. From a comparison of the different results, it appears that the accuracy of the proposed method is better than 0.002 Å for the bond lengths and 0.3° for the angles.