LoopIng is a method based on the Random Forest automatic learning technique, designed to select structural templates for protein loops among a dataset of candidates. The method takes advantage of both sequence and geometry related features (e.g. loop sequence, sequence similarity, stem distance, stem secondary structure and stem geometry). The method also has the advantage of being extremely fast and returning a reliable estimate of the model quality. Candidate loops are ranked according to their predicted confidence level and the user can select the number of templates to be provided in the final output.