A self-validation technique for protein structure refinement: the extended Hamilton test