In this work we study QSO absorption systems associated with intervenient galaxies. The physical conditions in these systems are modelled through a photoionization code coupled to a statistical balance code of atomic levels.
    The latter was designed with a very flexible structure in order to allow it to be used in different applications, such as the calculation of emissivity ratios of collisionally excited lines, or also radiative cooling functions. As a first step, we have obtained population ratios of the fine-structure levels of O0 and Fe+, complementing the work carried out earlier with the ions C0, C+ and Si+.
    The photoionization code employed was Aangaba, for which it was made a revision of the atomic data in order to incorporate recent advances in the atomic database available in the literature. In order to enable the calculation of the ionization equilibrium of all elements from H to Zn, we have made a compilation of charge exchange (with hydrogen and helium) and collisional ionization rates. We have also attempted to obtain a self-consistent dataset of photoionization cross sections and recombination rates. We have found that such a dataset is not available in the literature, and, even for the ions of the most abundant elements, for which there are sofisticated R-matrix calculations available, the data suffer from a serious shortcoming related to the resolution of the ressonances in the cross sections.
    In order to facilitate future upgrades, and allow its widespread adoption by other authors in different astrophysical applications, we have designed a simple and flexible structure to this new atomic database. To design its software infrastructure, we have made use of modern programming tools: object-oriented programming and UML.
    As most astronomical applications are written in Fortran, inclusive Aangaba, this was the language of choice to implement the atomic database. At this point we have spotted some difficulties related to the implementation of object-oriented concepts in Fortran. We also point out that the new language standard currently being voted will not incorporate direct support to object-oriented programming in a fully satisfactory way. In this work we were able to overcome these difficulties.
    Finally, both codes above were incorporated to the photoionization code Aangaba, and as a first application we present a grid of models for the analysis of column density ratios of fine-structure levels derived in Lyman-Limit systems. These line ratios may provide fundamental clues to pin down the nature of the ionization source in these systems.