Skip to content

Commit e5f7125

Browse files
committed
Changed rmg.reactionGenerationOptions attribute to more relevant speciesConstraints name
For matching with the generateSpeciesConstraints name in the input file. Makes it less confusing for the programmer.
1 parent bf9ff08 commit e5f7125

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

rmgpy/rmg/input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def generatedSpeciesConstraints(**kwargs):
266266
for key, value in kwargs.items():
267267
if key not in validConstraints:
268268
raise InputError('Invalid generated species constraint {0!r}.'.format(key))
269-
rmg.reactionGenerationOptions[key] = value
269+
rmg.speciesConstraints[key] = value
270270

271271
################################################################################
272272

rmgpy/rmg/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ class RMG:
9393
`fluxToleranceInterrupt` The relative species flux above which the simulation will halt
9494
`maximumEdgeSpecies` The maximum number of edge species allowed at any time
9595
`termination` A list of termination targets (i.e :class:`TerminationTime` and :class:`TerminationConversion` objects)
96+
`speciesConstraints` Dictates the maximum number of atoms, carbons, electrons, etc. generated by RMG
9697
--------------------------- ------------------------------------------------
9798
`outputDirectory` The directory used to save output files
9899
`scratchDirectory` The directory used to save temporary files
@@ -161,7 +162,7 @@ def clear(self):
161162
self.saveEdgeSpecies = None
162163
self.pressureDependence = None
163164
self.quantumMechanics = None
164-
self.reactionGenerationOptions = {}
165+
self.speciesConstraints = {}
165166
self.wallTime = 0
166167
self.initializationTime = 0
167168

@@ -181,7 +182,7 @@ def loadInput(self, path=None):
181182
if self.pressureDependence:
182183
self.pressureDependence.outputFile = self.outputDirectory
183184
self.reactionModel.pressureDependence = self.pressureDependence
184-
self.reactionModel.reactionGenerationOptions = self.reactionGenerationOptions
185+
self.reactionModel.speciesConstraints = self.speciesConstraints
185186
self.reactionModel.verboseComments = self.verboseComments
186187

187188
if self.quantumMechanics:

rmgpy/rmg/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def __init__(self, core=None, edge=None):
340340
self.quantumMechanics = None
341341
self.verboseComments = False
342342
self.kineticsEstimator = 'group additivity'
343-
self.reactionGenerationOptions = {}
343+
self.speciesConstraints = {}
344344

345345
def checkForExistingSpecies(self, molecule):
346346
"""
@@ -603,7 +603,7 @@ def react(self, database, speciesA, speciesB=None):
603603
Generates reactions involving :class:`rmgpy.species.Species` speciesA and speciesB.
604604
"""
605605
reactionList = []
606-
options = self.reactionGenerationOptions
606+
options = self.speciesConstraints
607607
if speciesB is None:
608608
for moleculeA in speciesA.molecule:
609609
reactionList.extend(database.kinetics.generateReactions([moleculeA], **options))

0 commit comments

Comments
 (0)