From a8633b4299ddaa3a953e398d71304e7a96536552 Mon Sep 17 00:00:00 2001 From: alongd Date: Fri, 14 Jul 2017 17:57:39 -0400 Subject: [PATCH] fixup! solver --- rmgpy/solver/simple.pyx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/rmgpy/solver/simple.pyx b/rmgpy/solver/simple.pyx index 0057b567cad..49dee31951f 100644 --- a/rmgpy/solver/simple.pyx +++ b/rmgpy/solver/simple.pyx @@ -90,7 +90,7 @@ cdef class SimpleReactor(ReactionSystem): """ specificColliderSpecies: - a list that contains Species classes of species which are specific third body colliders + a list that contains object references to species which are specific third body colliders in the respective reactions in pdepSpecificColliderReactionIndices. """ cdef public list specificColliderSpecies @@ -155,7 +155,7 @@ cdef class SimpleReactor(ReactionSystem): if filterReactions: ReactionSystem.set_initial_reaction_thresholds(self) - self.set_colliders(coreReactions, edgeReactions, coreSpecies, edgeSpecies) + self.set_colliders(coreReactions, edgeReactions, coreSpecies) ReactionSystem.compute_network_variables(self, pdepNetworks) @@ -210,7 +210,7 @@ cdef class SimpleReactor(ReactionSystem): self.kb[j] = self.kf[j] / self.Keq[j] - def set_colliders(self, coreReactions, edgeReactions, coreSpecies, edgeSpecies): + def set_colliders(self, coreReactions, edgeReactions, coreSpecies): """ Store collider efficiencies and reaction indices for pdep reactions that have collider efficiencies, and store specific collider indices @@ -229,13 +229,10 @@ cdef class SimpleReactor(ReactionSystem): pdepColliderReactionIndices.append(j) self.pdepColliderKinetics.append(rxn.kinetics) colliderEfficiencies.append(rxn.kinetics.getEffectiveColliderEfficiencies(coreSpecies)) - if rxn.specificCollider is not None: - j = self.reactionIndex[rxn] - pdepSpecificColliderReactionIndices.append(j) + if rxn.specificCollider: + pdepSpecificColliderReactionIndices.append(self.reactionIndex[rxn]) self.pdepSpecificColliderKinetics.append(rxn.kinetics) - for spc in itertools.chain(coreSpecies, edgeSpecies): - if spc == rxn.specificCollider: - self.specificColliderSpecies.append(spc) + self.specificColliderSpecies.append(rxn.specificCollider) self.pdepColliderReactionIndices = numpy.array(pdepColliderReactionIndices, numpy.int) self.colliderEfficiencies = numpy.array(colliderEfficiencies, numpy.float64)