forked from stevenshave/pybindingcurve
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_competition_simulation.py
More file actions
27 lines (22 loc) · 914 Bytes
/
Copy pathexample_competition_simulation.py
File metadata and controls
27 lines (22 loc) · 914 Bytes
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
"""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.
mySystem = pbc.BindingCurve("competition")
# First, lets simulate a curve with no inhibitor present (essentially 1:1)
mySystem.add_curve(
{"p": np.linspace(0, 40, 20), "l": 10, "i": 0, "kdpi": 1, "kdpl": 10}, "No inhibitor"
)
# Add curve with inhibitor (i)
mySystem.add_curve(
{"p": np.linspace(0, 40, 20), "l": 10, "i": 10, "kdpi": 1, "kdpl": 10}, "[i] = 10 µM"
)
# Add curve with more inhibtor (i)
mySystem.add_curve(
{"p": np.linspace(0, 40, 20), "l": 10, "i": 25, "kdpi": 1, "kdpl": 10}, "[i] = 25 uM"
)
# Display the plot
mySystem.show_plot()