You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Segmentation fault when setting inert species as reactive in input file #148
I noticed that adding an inert species such as Argon to the input file incorrectly as a reactive species leads to a Segmentation Fault without any warnings. It would be nice if RMG gave some sort of other error message instead of just crashing.
Correction to the above- if the species is set to reactive = True in ANY case, including if it is found in a reaction library, the job will crash with a segmentation fault.
However, even if reactive = False, it will add library reactions including the species into the core. AND it will incorporate the kinetics of that reaction. Therefore even if something is labeled as inert, if a library reaction consumes it, the concentration will change. So I guess in Py the reactive = False simply means that we don't use rate rules to look for reactions?
the reactive = False simply means that we don't use rate rules to look for reactions?
I guess so. We could make it filter out reaction libraries too. What about a seed mechanism though? Are there ever occasions when you'd want to include known reactions but turn off RMG? (as currently occurs).
At very least, current behaviour should be explained in the documentation.
In fact I am currently using it for the purpose of having reactions that RMG does not detect involving chlorine. So it kind of works out for me. However, I could see this being a problem because you would think that reactive=False means that no reactions involving the species get added whatsoever.
I wonder what the behavior would be if we didn't use any reaction libraries and set a hydrocarbon species as nonreactive?
My feeling is that reactive=False should probably turn off reaction discovery, whether from libraries or templates, but that anything put in a seed mechanism should be already in the core. (This smells a bit to the perennial problem of reaction libraries vs kinetics libraries.)
The segmentation faults no longer occur. It looks like when a species is set to not reactive, no new reactions are generated when it is added to core (rmgpy.rmg.model line 612):
if not newSpecies.reactive:
logging.info('NOT generating reactions for unreactive species {0}'.format(newSpecies))
else:
logging.info('Adding species {0} to model core'.format(newSpecies))
display(newSpecies) # if running in IPython --pylab mode, draws the picture!
# Find reactions involving the new species as unimolecular reactant
# or product (e.g. A <---> products)
newReactions.extend(self.react(database, newSpecies))
However, because the species is in the core, if for instance a reaction in RMG exists such as
A + I (inert) = B + C
and species A is formed and added to the core at some later time, this probably means that species I will end up reacting? This should probably be prevented completely. If the user specifically wants even a normal hydrocarbon species not to react, RMG should not react it. Perhaps that means adding it specifically to the forbidden structures list?
This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.
Activity
connie commentedon Sep 18, 2013
Correction to the above- if the species is set to reactive = True in ANY case, including if it is found in a reaction library, the job will crash with a segmentation fault.
However, even if reactive = False, it will add library reactions including the species into the core. AND it will incorporate the kinetics of that reaction. Therefore even if something is labeled as inert, if a library reaction consumes it, the concentration will change. So I guess in Py the reactive = False simply means that we don't use rate rules to look for reactions?
rwest commentedon Sep 18, 2013
I guess so. We could make it filter out reaction libraries too. What about a seed mechanism though? Are there ever occasions when you'd want to include known reactions but turn off RMG? (as currently occurs).
At very least, current behaviour should be explained in the documentation.
connie commentedon Sep 18, 2013
In fact I am currently using it for the purpose of having reactions that RMG does not detect involving chlorine. So it kind of works out for me. However, I could see this being a problem because you would think that reactive=False means that no reactions involving the species get added whatsoever.
I wonder what the behavior would be if we didn't use any reaction libraries and set a hydrocarbon species as nonreactive?
rwest commentedon Sep 18, 2013
My feeling is that
reactive=Falseshould probably turn off reaction discovery, whether from libraries or templates, but that anything put in a seed mechanism should be already in the core. (This smells a bit to the perennial problem of reaction libraries vs kinetics libraries.)connie commentedon Jul 31, 2015
The segmentation faults no longer occur. It looks like when a species is set to not reactive, no new reactions are generated when it is added to core (rmgpy.rmg.model line 612):
However, because the species is in the core, if for instance a reaction in RMG exists such as
A + I (inert) = B + C
and species A is formed and added to the core at some later time, this probably means that species I will end up reacting? This should probably be prevented completely. If the user specifically wants even a normal hydrocarbon species not to react, RMG should not react it. Perhaps that means adding it specifically to the forbidden structures list?
github-actions commentedon Jun 22, 2023
This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.