Skip to content

HOTFIX: Homo-Dimer Reaction Propensities - #329

Merged
briandrawert merged 1 commit into
developfrom
hotfix-hdma-propensities
Oct 26, 2022
Merged

HOTFIX: Homo-Dimer Reaction Propensities#329
briandrawert merged 1 commit into
developfrom
hotfix-hdma-propensities

Conversation

@BryanRumsey

Copy link
Copy Markdown
Contributor

Case 1

This case is impossible to catch since python dictionaries don't support duplicate keys.

r1 = spatialpy.Reaction(
name="r1", reactants={"s1":1, "s1":1}, products={"s1":1, "s2":1}, rate=0.1
)

Case 2

S1 = spatialpy.Species(name="s1", diffusion_coefficient=0.1)
r2 = spatialpy.Reaction(
name="r2", reactants={"s1":1, S1:1}, products={"s1":1, "s2":1}, rate=0.1
)

Propensity Bug

r2
Reactants
s1: 1
Products
s1: 1
s2: 1
Propensity Function: (0.1*s1)

Fixed Propensity

r2
Reactants
s1: 2
Products
s1: 1
s2: 1
Propensity Function: (((0.1*s1)*(s1-1))/vol)

Case 3

r3 = spatialpy.Reaction(
name="r3", reactants={"s1":1}, products={"s1":1, "s2":1}, rate=0.1
)
r3.add_reactant("s1", 1)

Propensity Bug

r3
Reactants
s1: 1
Products
s1: 1
s2: 1
Propensity Function: (0.1*s1)

Fixed Propensity

r3
Reactants
s1: 2
Products
s1: 1
s2: 1
Propensity Function: (((0.1*s1)*(s1-1))/vol)

closes#328

@BryanRumseyBryanRumsey added this to the 1.1.2 Release milestone Oct 6, 2022
@BryanRumseyBryanRumsey self-assigned this Oct 6, 2022
@BryanRumseyBryanRumsey mentioned this pull request Oct 6, 2022
@briandrawert
briandrawert merged commit e8bf65c into developOct 26, 2022
@briandrawert
briandrawert deleted the hotfix-hdma-propensities branch October 26, 2022 20:09
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@BryanRumsey@briandrawert@seanebum