Proteins are nano-machines which have been evolved naturally over billions of years. If we can utilize this machinery to accomplish our purpose, the benefit will be enormous. In previous protein design researches, the backbone structure of a protein was not altered. This research expands the protein design area to the design of loops in proteins. Here I suggest a computational protein design methodology for grafting a functional loop to a protein. By using this method, we can design proteins with functions that are not achievable by the previous methods. Here, a functional loop of β-lactamase is grafted to penicillin binding protein 5, PBP5. However, the loop and PBP5 are not compatible. Thus, this research focuses on restoring the natural packing between the inserted loop and PBP5. A homology modeling method is applied to make the target structure by using two template structures: the overall scaffold from PBP5 and the loop from TEM-1. Then, amino acids of PBP5 are changed so that the inserted loop can be stably placed on it. 29,680 structures are generated by using MODELLER, and its degree of packing is measured by atomic Voronoi volume. Thirty structures are selected by this measure. To further assess their stability, molecular dynamics simulation is performed on them. Sixteen of them shows good positioning of the loop and the active site residues under the three nano-seconds molecular dynamics simulation. This method does not guarantee the enzymatic activity of the designed protein. Nevertheless, the stability of the loop observed in molecular dynamics simulation suggests that the designed proteins resemble the stable structure with the functionality. Thus this methodology can be used for finding good starting points for the experimental protein designs such as directed evolution methods.