Skip to content

Conversation

@BryanRumsey
Copy link
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

@BryanRumsey BryanRumsey added this to the 1.1.2 Release milestone Oct 6, 2022
@BryanRumsey BryanRumsey self-assigned this Oct 6, 2022
@BryanRumsey BryanRumsey mentioned this pull request Oct 6, 2022
@briandrawert briandrawert merged commit e8bf65c into develop Oct 26, 2022
@briandrawert briandrawert deleted the hotfix-hdma-propensities branch October 26, 2022 20:09
Sign up for free to 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.

4 participants