diff --git a/pdbfixer/pdbfixer.py b/pdbfixer/pdbfixer.py index 431b021..35aa11b 100644 --- a/pdbfixer/pdbfixer.py +++ b/pdbfixer/pdbfixer.py @@ -1263,6 +1263,10 @@ def main(): if options.residues: if options.verbose: print('Finding missing residues...') fixer.findMissingResidues() + for residueNames in fixer.missingResidues.values(): + for residueName in residueNames: + if residueName not in fixer.templates: + raise(KeyError("Cannot find residue %s in template library!" % residueName)) else: fixer.missingResidues = {} if options.nonstandard: