Template-based Protein Structure Prediction and its Applications