-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexample_competition_simulation.py
43 lines (35 loc) · 1.25 KB
/
example_competition_simulation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"""Simulation example 1:1:1 comptition binding"""
import numpy as np
import pybindingcurve as pbc
# We can choose to work in a common unit, typically nM, or uM, as long as all
# numbers are in the same unit, the result is valid. We assume uM for all
# concentrations bellow.
# Create the PBC BindingCurve object, expecting a 'competition' system.
my_system = pbc.BindingCurve("competition")
# First, lets simulate a curve with no inhibitor present (essentially 1:1)
my_system.add_curve(
{"p": np.linspace(0, 40, num=200), "l": 0.01, "i": 0, "kdpi": 1, "kdpl": 10},
"No inhibitor",
)
# Add curve with more inhibtor (i)
my_system.add_curve(
{"p": np.linspace(0, 40, num=200), "l": 0.01, "i": 10, "kdpi": 10, "kdpl": 10},
"[i] = 25 uM",
)
# Add curve with inhibitor (i)
my_system.add_curve(
{"p": np.linspace(0, 40, num=200), "l": 0.01, "i": 10, "kdpi": 0.5, "kdpl": 10},
"[i] = 10 µM",
)
# Add curve with inhibitor (i)
my_system.add_curve(
{"p": np.linspace(0, 40, num=200), "l": 0.01, "i": 10, "kdpi": 0.1, "kdpl": 10},
"[i] = 10 µM",
)
# Add curve with inhibitor (i)
my_system.add_curve(
{"p": np.linspace(0, 40, num=200), "l": 0.01, "i": 10, "kdpi": 0.01, "kdpl": 10},
"[i] = 10 µM",
)
# Display the plot
my_system.show_plot()