# We successfully generated a residue template. Break out of the for loop.
# We successfully generated a residue template. Break out of the for loop.
break
break
ifmatchesisNone:
ifmatchesisNone:
raiseValueError('No template found for residue %d (%s). %s For more information, see https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template'%(res.index+1,res.name,_findMatchErrors(self,res)))
raiseValueError('No template found for residue %d (%s). %s For more information, see https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template'%(res.index,res.name,_findMatchErrors(self,res)))