diff --git a/rmgpy/rmg/model.py b/rmgpy/rmg/model.py index 81873620506..c4f50fc89ad 100644 --- a/rmgpy/rmg/model.py +++ b/rmgpy/rmg/model.py @@ -1535,12 +1535,13 @@ def addReactionLibraryToEdge(self, reactionLibrary): # Perform species constraints and forbidden species checks for spec in self.newSpeciesList: - if database.forbiddenStructures.isMoleculeForbidden(spec.molecule[0]): - if 'allowed' in rmg.speciesConstraints and 'reaction libraries' in rmg.speciesConstraints['allowed']: - spec.explicitlyAllowed = True - logging.warning("Species {0} from reaction library {1} is globally forbidden. It will behave as an inert unless found in a seed mechanism or reaction library.".format(spec.label, reactionLibrary.label)) - else: - raise ForbiddenStructureException("Species {0} from reaction library {1} is globally forbidden. You may explicitly allow it, but it will remain inert unless found in a seed mechanism or reaction library.".format(spec.label, reactionLibrary.label)) + if not reactionLibrary.autoGenerated: # No need to check for forbidden species otherwise + if database.forbiddenStructures.isMoleculeForbidden(spec.molecule[0]): + if 'allowed' in rmg.speciesConstraints and 'reaction libraries' in rmg.speciesConstraints['allowed']: + spec.explicitlyAllowed = True + logging.warning("Species {0} from reaction library {1} is globally forbidden. It will behave as an inert unless found in a seed mechanism or reaction library.".format(spec.label, reactionLibrary.label)) + else: + raise ForbiddenStructureException("Species {0} from reaction library {1} is globally forbidden. You may explicitly allow it, but it will remain inert unless found in a seed mechanism or reaction library.".format(spec.label, reactionLibrary.label)) if failsSpeciesConstraints(spec): if 'allowed' in rmg.speciesConstraints and 'reaction libraries' in rmg.speciesConstraints['allowed']: rmg.speciesConstraints['explicitlyAllowedMolecules'].extend(spec.molecule)