Statistics for Training of Template-Specific Weighted Energy Function for Sequence-to-Structure Alignment