The HIV-1 integrase is an attractive target for the therapeutics development against AIDS, as no host homologue of this protein has been identified. The integrase strand transfer inhibitors (INSTIs), including raltegravir, specifically target the second catalytic step of the integration process by binding to the DDE motif of the catalytic site and coordinating Mg(2+) ions. Recent X-ray crystallographic structures of the integrase/DNA complex from prototype foamy virus allowed to investigate the role of the different partners (integrase, DNA, Mg(2+) ions, raltegravir) in the complex stability using molecular dynamics (MD) simulations. The presence of Mg(2+) ions is found to be essential for the stability, whereas the simultaneous presence of raltegravir and Mg(2+) ions has a destabilizing influence. A homology model of HIV-1 integrase was built on the basis of the X-ray crystallographic information, and protein marker residues for the ligand binding were detected by clustering the docking poses of known HIV-1 integrase inhibitors on the model. Interestingly, we had already identified some of these residues to be involved in HIV-1 resistance mutations and in the stabilization of the catalytic site during the MD simulations. Classification of protein conformations along MD simulations, as well as of ligand docking poses, was performed by using an original learning method, based on self-organizing maps. This allows us to perform a more in-depth investigation of the free-energy basins populated by the complex in MD simulations on the one hand, and a straightforward classification of ligands according to their binding residues on the other hand.