-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allows RMG to continue when there is a duplicate species
Originally, RMG stops if any two species are identical in the initial species list. Since this can happen frequently when using thermoEstimator with a large list of spcies, I changed it, so that RMG ignores the duplicate, and continue execution.
- Loading branch information
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,9 +92,12 @@ def database( | |
def species(label, structure, reactive=True): | ||
logging.debug('Found {0} species "{1}" ({2})'.format('reactive' if reactive else 'nonreactive', label, structure.toSMILES())) | ||
spec, isNew = rmg.reactionModel.makeNewSpecies(structure, label=label, reactive=reactive) | ||
assert isNew, "Species {0} is a duplicate of {1}. Species in input file must be unique".format(label,spec.label) | ||
rmg.initialSpecies.append(spec) | ||
speciesDict[label] = spec | ||
#assert isNew, "Species {0} is a duplicate of {1}. Species in input file must be unique".format(label,spec.label) | ||
if isNew: | ||
rmg.initialSpecies.append(spec) | ||
speciesDict[label] = spec | ||
else: | ||
logging.info("Species {0} is a duplicate of {1}. Avoid it and continue calculation ...".format(label,spec.label)) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
keceli
Author
|
||
|
||
def SMARTS(string): | ||
return Molecule().fromSMARTS(string) | ||
|
I think this should at least be a warning, and perhaps make it clearer that RMG is ignoring it.