using MEDYAN
using MEDYANVis
using CairoMakie
using Random
using SmallZarrGroups
using StaticArrays
using LinearAlgebra
Random.seed!(1234);
3. Actin Treadmilling
3. Actin Treadmilling
Using reactions and rates from
This example doesn’t have any of the actin binding proteins, or filament severing or annealing.
Setup
Open a julia REPL or jupyter notebook using the medyan-tutorial
environment you created in tutorial 1.
Load MEDYAN
with MeshCat
for visualization
Declaring agent names
The first step is declaring the names of agents in the system.
This system will contain three diffusing species.
The system will also contain one filament type.
The monomers that make up this filament can be in one of 9 states.
= MEDYAN.AgentNames(;
agent_names =[
diffusingspeciesnames:GA, # G-Actin with no bound nucleotide
:GAD, # G-Actin in the ADP form
:GADPi, # G-Actin in the ADP Pi form
:GAT, # G-Actin in the ATP form
],=[
filamentnames:actin, [
(# Monomer states
:FAD, # F-Actin in the ADP form
:FADPi, # F-Actin in the ADP Pi form
:FAT, # F-Actin in the ATP form
:BarbedD, # Barbed end in the ADP form
:BarbedDPi, # Barbed end in the ADP Pi form
:BarbedT, # Barbed end in the ATP form
:PointedD, # Pointed end in the ADP form
:PointedDPi, # Pointed end in the ADP Pi form
:PointedT, # Pointed end in the ATP form
])
] )
MEDYAN.AgentNames([:GA, :GAD, :GADPi, :GAT], Symbol[], Symbol[], Symbol[], [(:actin, [:FAD, :FADPi, :FAT, :BarbedD, :BarbedDPi, :BarbedT, :PointedD, :PointedDPi, :PointedT])], Symbol[], Symbol[], Symbol[])
Defining System
After the agent names are declared, the system can be defined.
This is done by constructing a MEDYAN.SysDef
object from the agent_names
and then mutating it to add parameters, reactions, and callbacks.
= MEDYAN.SysDef(agent_names) s
MEDYAN.SysDef
Diffusing species:
GA: 0.0 nm²/s
GAD: 0.0 nm²/s
GADPi: 0.0 nm²/s
GAT: 0.0 nm²/s
Filaments:
actin:
monomer states: [:FAD, :FADPi, :FAT, :BarbedD, :BarbedDPi, :BarbedT, :PointedD, :PointedDPi, :PointedT]
params: MEDYAN.FilamentMechParams(NaN, NaN, NaN, NaN, -1, -1)
Add a diffusion coefficient of 5E6 nm²/s to all diffusing species. All units are based on nm, s, pN
= 5E6
DGActin for name in keys(s.diffusing)
add_diffusion_coeff!(s, name, DGActin) # nm²/s
end
Add the default actin filament parameters.
add_filament_params!(s, :actin, MEDYAN.ACTIN_FIL_PARAMS)
MEDYAN.SysDef
Diffusing species:
GA: 5.0e6 nm²/s
GAD: 5.0e6 nm²/s
GADPi: 5.0e6 nm²/s
GAT: 5.0e6 nm²/s
Filaments:
actin:
monomer states: [:FAD, :FADPi, :FAT, :BarbedD, :BarbedDPi, :BarbedT, :PointedD, :PointedDPi, :PointedT]
params: MEDYAN.FilamentMechParams(3.0, 2.7, 4000.0, 26880.0, 40, 1)
Add reactions between diffusing species. These represent G-Actin interacting with ATP ADP and Pi.
# Assume ATP, Pi, and ADP concentrations are fixed
= 10000.0 * MEDYAN.μM⁻¹_per_nm³
ATP = 2000.0 * MEDYAN.μM⁻¹_per_nm³
Pi = 2000.0 * MEDYAN.μM⁻¹_per_nm³
ADP = 1.3/MEDYAN.μM⁻¹_per_nm³
KfGATPoint = 0.8
KrGATPoint = 0.16/MEDYAN.μM⁻¹_per_nm³
KfGADPoint = 0.3
KrGADPoint = 10.0/MEDYAN.μM⁻¹_per_nm³
KfGATBarb = 1.0
KrGATBarb = 2.5/MEDYAN.μM⁻¹_per_nm³
KfGADBarb = 4.25
KrGADBarb = 0.0026
KfPiRelease = 5.20E-6/MEDYAN.μM⁻¹_per_nm³
KrPiRelease
# 100
addreaction!(s,
"diffusing.GADPi --> diffusing.GAD",
0.0312,
0,
)addreaction!(s,
"diffusing.GAD --> diffusing.GADPi",
*Pi,
KrPiRelease0,
)
# 104
addreaction!(s,
"diffusing.GA --> diffusing.GAT",
1.7/MEDYAN.μM⁻¹_per_nm³*ATP,
0,
)addreaction!(s,
"diffusing.GAT --> diffusing.GA",
0.011,
0,
)
# 109
addreaction!(s,
"diffusing.GA --> diffusing.GAD",
0.9/MEDYAN.μM⁻¹_per_nm³*ADP,
0,
)addreaction!(s,
"diffusing.GAD --> diffusing.GA",
0.071,
0,
)
MEDYAN.SysDef
Diffusing species:
GA: 5.0e6 nm²/s
GAD: 5.0e6 nm²/s
GADPi: 5.0e6 nm²/s
GAT: 5.0e6 nm²/s
Filaments:
actin:
monomer states: [:FAD, :FADPi, :FAT, :BarbedD, :BarbedDPi, :BarbedT, :PointedD, :PointedDPi, :PointedT]
params: MEDYAN.FilamentMechParams(3.0, 2.7, 4000.0, 26880.0, 40, 1)
Compartment reactions without callbacks:
"diffusing.GADPi --> diffusing.GAD" 0.0312 1/s
"diffusing.GAD --> diffusing.GADPi" 0.0104 1/s
"diffusing.GA --> diffusing.GAT" 17000.0 1/s
"diffusing.GAT --> diffusing.GA" 0.011 1/s
"diffusing.GA --> diffusing.GAD" 1799.9999999999998 1/s
"diffusing.GAD --> diffusing.GA" 0.071 1/s
Next add filament reactions.
The barbed end is the plus end and the pointed end is the minus end.
=2.7 # nm
monomerspacing
= ("T", "DPi", "D")
nucleotide_states
# Barbed end polymerization and depolymerization
= [
barbed_rates "T", KfGATBarb, KrGATBarb),
("DPi", KfGATBarb, KrGATBarb),
("D", KfGADBarb, KrGADBarb),
(
]for (new_nuc, forward_rate, reverse_rate) in barbed_rates
for base_nuc in nucleotide_states
addfilamentend_reaction!(s,
:actin,
Symbol("f", "GA", new_nuc, "_to_Barbed", base_nuc),
false,
Symbol("Barbed", base_nuc)]=>[Symbol("FA", base_nuc), Symbol("Barbed", new_nuc)],
[
monomerspacing,"diffusing.GA"*new_nuc*" -->",
forward_rate,1,
)addfilamentend_reaction!(s,
:actin,
Symbol("r", "GA", new_nuc, "_to_Barbed", base_nuc),
false,
Symbol("FA", base_nuc), Symbol("Barbed", new_nuc)]=>[Symbol("Barbed", base_nuc)],
[0.0,
"--> diffusing.GA"*new_nuc,
reverse_rate,0,
)end
end
# Pointed end polymerization and depolymerization
= [
pointed_rates "T", KfGATPoint, KrGATPoint),
("DPi", KfGATPoint, KrGATPoint),
("D", KfGADPoint, KrGADPoint),
(
]for (new_nuc, forward_rate, reverse_rate) in pointed_rates
for base_nuc in nucleotide_states
addfilamentend_reaction!(s,
:actin,
Symbol("f", "GA", new_nuc, "_to_Pointed", base_nuc),
true,
Symbol("Pointed", base_nuc)]=>[Symbol("Pointed", new_nuc), Symbol("FA", base_nuc)],
[
monomerspacing,"diffusing.GA"*new_nuc*" -->",
forward_rate,1,
)addfilamentend_reaction!(s,
:actin,
Symbol("r", "GA", new_nuc, "_to_Pointed", base_nuc),
true,
Symbol("Pointed", new_nuc), Symbol("FA", base_nuc)]=>[Symbol("Pointed", base_nuc)],
[0.0,
"--> diffusing.GA"*new_nuc,
reverse_rate,0,
)end
end
# Filament ATP hydrolysis and Pi Dissociation
for monomer_state in ("FA", "Barbed", "Pointed")
addfilament_reaction!(s,
:actin,
Symbol(monomer_state, "T_to_", monomer_state, "DPi"),
Symbol(monomer_state, "T")]=>[Symbol(monomer_state, "DPi")],
[1,
"-->",
0.3,
0,
)addfilament_reaction!(s,
:actin,
Symbol(monomer_state, "DPi_to_", monomer_state, "D"),
Symbol(monomer_state, "DPi")]=>[Symbol(monomer_state, "D")],
[1,
"-->",
KfPiRelease,0,
)addfilament_reaction!(s,
:actin,
Symbol(monomer_state, "D_to_", monomer_state, "DPi"),
Symbol(monomer_state, "D")]=>[Symbol(monomer_state, "DPi")],
[1,
"-->",
*Pi,
KrPiRelease0,
)end
s
MEDYAN.SysDef
Diffusing species:
GA: 5.0e6 nm²/s
GAD: 5.0e6 nm²/s
GADPi: 5.0e6 nm²/s
GAT: 5.0e6 nm²/s
Filaments:
actin:
monomer states: [:FAD, :FADPi, :FAT, :BarbedD, :BarbedDPi, :BarbedT, :PointedD, :PointedDPi, :PointedT]
params: MEDYAN.FilamentMechParams(3.0, 2.7, 4000.0, 26880.0, 40, 1)
filament sites:
FAT_to_FADPi: MEDYAN.FilamentSiteGeneral(1, UInt8[0x03])
FADPi_to_FAD: MEDYAN.FilamentSiteGeneral(1, UInt8[0x02])
FAD_to_FADPi: MEDYAN.FilamentSiteGeneral(1, UInt8[0x01])
BarbedT_to_BarbedDPi: MEDYAN.FilamentSiteGeneral(1, UInt8[0x06])
BarbedDPi_to_BarbedD: MEDYAN.FilamentSiteGeneral(1, UInt8[0x05])
BarbedD_to_BarbedDPi: MEDYAN.FilamentSiteGeneral(1, UInt8[0x04])
PointedT_to_PointedDPi: MEDYAN.FilamentSiteGeneral(1, UInt8[0x09])
PointedDPi_to_PointedD: MEDYAN.FilamentSiteGeneral(1, UInt8[0x08])
PointedD_to_PointedDPi: MEDYAN.FilamentSiteGeneral(1, UInt8[0x07])
filament end sites:
fGAT_to_BarbedT: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x06], 2.7, 1)
rGAT_to_BarbedT: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x03, 0x06], 0.0, 0)
fGAT_to_BarbedDPi: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x05], 2.7, 1)
rGAT_to_BarbedDPi: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x02, 0x06], 0.0, 0)
fGAT_to_BarbedD: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x04], 2.7, 1)
rGAT_to_BarbedD: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x01, 0x06], 0.0, 0)
fGADPi_to_BarbedT: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x06], 2.7, 1)
rGADPi_to_BarbedT: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x03, 0x05], 0.0, 0)
fGADPi_to_BarbedDPi: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x05], 2.7, 1)
rGADPi_to_BarbedDPi: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x02, 0x05], 0.0, 0)
fGADPi_to_BarbedD: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x04], 2.7, 1)
rGADPi_to_BarbedD: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x01, 0x05], 0.0, 0)
fGAD_to_BarbedT: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x06], 2.7, 1)
rGAD_to_BarbedT: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x03, 0x04], 0.0, 0)
fGAD_to_BarbedDPi: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x05], 2.7, 1)
rGAD_to_BarbedDPi: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x02, 0x04], 0.0, 0)
fGAD_to_BarbedD: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x04], 2.7, 1)
rGAD_to_BarbedD: MEDYAN.FilamentEndSiteGeneral(false, UInt8[0x01, 0x04], 0.0, 0)
fGAT_to_PointedT: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x09], 2.7, 1)
rGAT_to_PointedT: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x09, 0x03], 0.0, 0)
fGAT_to_PointedDPi: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x08], 2.7, 1)
rGAT_to_PointedDPi: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x09, 0x02], 0.0, 0)
fGAT_to_PointedD: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x07], 2.7, 1)
rGAT_to_PointedD: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x09, 0x01], 0.0, 0)
fGADPi_to_PointedT: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x09], 2.7, 1)
rGADPi_to_PointedT: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x08, 0x03], 0.0, 0)
fGADPi_to_PointedDPi: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x08], 2.7, 1)
rGADPi_to_PointedDPi: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x08, 0x02], 0.0, 0)
fGADPi_to_PointedD: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x07], 2.7, 1)
rGADPi_to_PointedD: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x08, 0x01], 0.0, 0)
fGAD_to_PointedT: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x09], 2.7, 1)
rGAD_to_PointedT: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x07, 0x03], 0.0, 0)
fGAD_to_PointedDPi: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x08], 2.7, 1)
rGAD_to_PointedDPi: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x07, 0x02], 0.0, 0)
fGAD_to_PointedD: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x07], 2.7, 1)
rGAD_to_PointedD: MEDYAN.FilamentEndSiteGeneral(true, UInt8[0x07, 0x01], 0.0, 0)
Compartment reactions with callbacks:
1. "filamentsite.actin.PointedD_to_PointedDPi --> filamentsite.actin.PointedD_to_PointedDPi" 0.0104 1/s
MEDYAN.GeneralFilamentSiteCallback(1, 9, 1, UInt8[0x08], Pair{Int64, Int64}[])
2. "filamentsite.actin.PointedDPi_to_PointedD --> filamentsite.actin.PointedDPi_to_PointedD" 0.0026 1/s
MEDYAN.GeneralFilamentSiteCallback(1, 8, 1, UInt8[0x07], Pair{Int64, Int64}[])
3. "filamentsite.actin.PointedT_to_PointedDPi --> filamentsite.actin.PointedT_to_PointedDPi" 0.3 1/s
MEDYAN.GeneralFilamentSiteCallback(1, 7, 1, UInt8[0x08], Pair{Int64, Int64}[])
4. "filamentsite.actin.BarbedD_to_BarbedDPi --> filamentsite.actin.BarbedD_to_BarbedDPi" 0.0104 1/s
MEDYAN.GeneralFilamentSiteCallback(1, 6, 1, UInt8[0x05], Pair{Int64, Int64}[])
5. "filamentsite.actin.BarbedDPi_to_BarbedD --> filamentsite.actin.BarbedDPi_to_BarbedD" 0.0026 1/s
MEDYAN.GeneralFilamentSiteCallback(1, 5, 1, UInt8[0x04], Pair{Int64, Int64}[])
6. "filamentsite.actin.BarbedT_to_BarbedDPi --> filamentsite.actin.BarbedT_to_BarbedDPi" 0.3 1/s
MEDYAN.GeneralFilamentSiteCallback(1, 4, 1, UInt8[0x05], Pair{Int64, Int64}[])
7. "filamentsite.actin.FAD_to_FADPi --> filamentsite.actin.FAD_to_FADPi" 0.0104 1/s
MEDYAN.GeneralFilamentSiteCallback(1, 3, 1, UInt8[0x02], Pair{Int64, Int64}[])
8. "filamentsite.actin.FADPi_to_FAD --> filamentsite.actin.FADPi_to_FAD" 0.0026 1/s
MEDYAN.GeneralFilamentSiteCallback(1, 2, 1, UInt8[0x01], Pair{Int64, Int64}[])
9. "filamentsite.actin.FAT_to_FADPi --> filamentsite.actin.FAT_to_FADPi" 0.3 1/s
MEDYAN.GeneralFilamentSiteCallback(1, 1, 1, UInt8[0x02], Pair{Int64, Int64}[])
10. "filamentendsite.actin.rGAD_to_PointedD --> filamentendsite.actin.rGAD_to_PointedD" 0.3 1/s
MEDYAN.GeneralFilamentEndCallback(1, 36, -1, UInt8[0x07], [2 => 1])
11. "diffusing.GAD + filamentendsite.actin.fGAD_to_PointedD --> diffusing.GAD + filamentendsite.actin.fGAD_to_PointedD" 265686.2507478155 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 35, 1, UInt8[0x07, 0x01], [2 => -1])
12. "filamentendsite.actin.rGAD_to_PointedDPi --> filamentendsite.actin.rGAD_to_PointedDPi" 0.3 1/s
MEDYAN.GeneralFilamentEndCallback(1, 34, -1, UInt8[0x08], [2 => 1])
13. "diffusing.GAD + filamentendsite.actin.fGAD_to_PointedDPi --> diffusing.GAD + filamentendsite.actin.fGAD_to_PointedDPi" 265686.2507478155 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 33, 1, UInt8[0x07, 0x02], [2 => -1])
14. "filamentendsite.actin.rGAD_to_PointedT --> filamentendsite.actin.rGAD_to_PointedT" 0.3 1/s
MEDYAN.GeneralFilamentEndCallback(1, 32, -1, UInt8[0x09], [2 => 1])
15. "diffusing.GAD + filamentendsite.actin.fGAD_to_PointedT --> diffusing.GAD + filamentendsite.actin.fGAD_to_PointedT" 265686.2507478155 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 31, 1, UInt8[0x07, 0x03], [2 => -1])
16. "filamentendsite.actin.rGADPi_to_PointedD --> filamentendsite.actin.rGADPi_to_PointedD" 0.8 1/s
MEDYAN.GeneralFilamentEndCallback(1, 30, -1, UInt8[0x07], [3 => 1])
17. "diffusing.GADPi + filamentendsite.actin.fGADPi_to_PointedD --> diffusing.GADPi + filamentendsite.actin.fGADPi_to_PointedD" 2.158700787326001e6 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 29, 1, UInt8[0x08, 0x01], [3 => -1])
18. "filamentendsite.actin.rGADPi_to_PointedDPi --> filamentendsite.actin.rGADPi_to_PointedDPi" 0.8 1/s
MEDYAN.GeneralFilamentEndCallback(1, 28, -1, UInt8[0x08], [3 => 1])
19. "diffusing.GADPi + filamentendsite.actin.fGADPi_to_PointedDPi --> diffusing.GADPi + filamentendsite.actin.fGADPi_to_PointedDPi" 2.158700787326001e6 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 27, 1, UInt8[0x08, 0x02], [3 => -1])
20. "filamentendsite.actin.rGADPi_to_PointedT --> filamentendsite.actin.rGADPi_to_PointedT" 0.8 1/s
MEDYAN.GeneralFilamentEndCallback(1, 26, -1, UInt8[0x09], [3 => 1])
21. "diffusing.GADPi + filamentendsite.actin.fGADPi_to_PointedT --> diffusing.GADPi + filamentendsite.actin.fGADPi_to_PointedT" 2.158700787326001e6 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 25, 1, UInt8[0x08, 0x03], [3 => -1])
22. "filamentendsite.actin.rGAT_to_PointedD --> filamentendsite.actin.rGAT_to_PointedD" 0.8 1/s
MEDYAN.GeneralFilamentEndCallback(1, 24, -1, UInt8[0x07], [4 => 1])
23. "diffusing.GAT + filamentendsite.actin.fGAT_to_PointedD --> diffusing.GAT + filamentendsite.actin.fGAT_to_PointedD" 2.158700787326001e6 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 23, 1, UInt8[0x09, 0x01], [4 => -1])
24. "filamentendsite.actin.rGAT_to_PointedDPi --> filamentendsite.actin.rGAT_to_PointedDPi" 0.8 1/s
MEDYAN.GeneralFilamentEndCallback(1, 22, -1, UInt8[0x08], [4 => 1])
25. "diffusing.GAT + filamentendsite.actin.fGAT_to_PointedDPi --> diffusing.GAT + filamentendsite.actin.fGAT_to_PointedDPi" 2.158700787326001e6 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 21, 1, UInt8[0x09, 0x02], [4 => -1])
26. "filamentendsite.actin.rGAT_to_PointedT --> filamentendsite.actin.rGAT_to_PointedT" 0.8 1/s
MEDYAN.GeneralFilamentEndCallback(1, 20, -1, UInt8[0x09], [4 => 1])
27. "diffusing.GAT + filamentendsite.actin.fGAT_to_PointedT --> diffusing.GAT + filamentendsite.actin.fGAT_to_PointedT" 2.158700787326001e6 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 19, 1, UInt8[0x09, 0x03], [4 => -1])
28. "filamentendsite.actin.rGAD_to_BarbedD --> filamentendsite.actin.rGAD_to_BarbedD" 4.25 1/s
MEDYAN.GeneralFilamentEndCallback(1, 18, -1, UInt8[0x04], [2 => 1])
29. "diffusing.GAD + filamentendsite.actin.fGAD_to_BarbedD --> diffusing.GAD + filamentendsite.actin.fGAD_to_BarbedD" 4.151347667934617e6 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 17, 1, UInt8[0x01, 0x04], [2 => -1])
30. "filamentendsite.actin.rGAD_to_BarbedDPi --> filamentendsite.actin.rGAD_to_BarbedDPi" 4.25 1/s
MEDYAN.GeneralFilamentEndCallback(1, 16, -1, UInt8[0x05], [2 => 1])
31. "diffusing.GAD + filamentendsite.actin.fGAD_to_BarbedDPi --> diffusing.GAD + filamentendsite.actin.fGAD_to_BarbedDPi" 4.151347667934617e6 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 15, 1, UInt8[0x02, 0x04], [2 => -1])
32. "filamentendsite.actin.rGAD_to_BarbedT --> filamentendsite.actin.rGAD_to_BarbedT" 4.25 1/s
MEDYAN.GeneralFilamentEndCallback(1, 14, -1, UInt8[0x06], [2 => 1])
33. "diffusing.GAD + filamentendsite.actin.fGAD_to_BarbedT --> diffusing.GAD + filamentendsite.actin.fGAD_to_BarbedT" 4.151347667934617e6 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 13, 1, UInt8[0x03, 0x04], [2 => -1])
34. "filamentendsite.actin.rGADPi_to_BarbedD --> filamentendsite.actin.rGADPi_to_BarbedD" 1.0 1/s
MEDYAN.GeneralFilamentEndCallback(1, 12, -1, UInt8[0x04], [3 => 1])
35. "diffusing.GADPi + filamentendsite.actin.fGADPi_to_BarbedD --> diffusing.GADPi + filamentendsite.actin.fGADPi_to_BarbedD" 1.6605390671738468e7 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 11, 1, UInt8[0x01, 0x05], [3 => -1])
36. "filamentendsite.actin.rGADPi_to_BarbedDPi --> filamentendsite.actin.rGADPi_to_BarbedDPi" 1.0 1/s
MEDYAN.GeneralFilamentEndCallback(1, 10, -1, UInt8[0x05], [3 => 1])
37. "diffusing.GADPi + filamentendsite.actin.fGADPi_to_BarbedDPi --> diffusing.GADPi + filamentendsite.actin.fGADPi_to_BarbedDPi" 1.6605390671738468e7 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 9, 1, UInt8[0x02, 0x05], [3 => -1])
38. "filamentendsite.actin.rGADPi_to_BarbedT --> filamentendsite.actin.rGADPi_to_BarbedT" 1.0 1/s
MEDYAN.GeneralFilamentEndCallback(1, 8, -1, UInt8[0x06], [3 => 1])
39. "diffusing.GADPi + filamentendsite.actin.fGADPi_to_BarbedT --> diffusing.GADPi + filamentendsite.actin.fGADPi_to_BarbedT" 1.6605390671738468e7 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 7, 1, UInt8[0x03, 0x05], [3 => -1])
40. "filamentendsite.actin.rGAT_to_BarbedD --> filamentendsite.actin.rGAT_to_BarbedD" 1.0 1/s
MEDYAN.GeneralFilamentEndCallback(1, 6, -1, UInt8[0x04], [4 => 1])
41. "diffusing.GAT + filamentendsite.actin.fGAT_to_BarbedD --> diffusing.GAT + filamentendsite.actin.fGAT_to_BarbedD" 1.6605390671738468e7 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 5, 1, UInt8[0x01, 0x06], [4 => -1])
42. "filamentendsite.actin.rGAT_to_BarbedDPi --> filamentendsite.actin.rGAT_to_BarbedDPi" 1.0 1/s
MEDYAN.GeneralFilamentEndCallback(1, 4, -1, UInt8[0x05], [4 => 1])
43. "diffusing.GAT + filamentendsite.actin.fGAT_to_BarbedDPi --> diffusing.GAT + filamentendsite.actin.fGAT_to_BarbedDPi" 1.6605390671738468e7 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 3, 1, UInt8[0x02, 0x06], [4 => -1])
44. "filamentendsite.actin.rGAT_to_BarbedT --> filamentendsite.actin.rGAT_to_BarbedT" 1.0 1/s
MEDYAN.GeneralFilamentEndCallback(1, 2, -1, UInt8[0x06], [4 => 1])
45. "diffusing.GAT + filamentendsite.actin.fGAT_to_BarbedT --> diffusing.GAT + filamentendsite.actin.fGAT_to_BarbedT" 1.6605390671738468e7 nm³/s
MEDYAN.GeneralFilamentEndCallback(1, 1, 1, UInt8[0x03, 0x06], [4 => -1])
Compartment reactions without callbacks:
"diffusing.GADPi --> diffusing.GAD" 0.0312 1/s
"diffusing.GAD --> diffusing.GADPi" 0.0104 1/s
"diffusing.GA --> diffusing.GAT" 17000.0 1/s
"diffusing.GAT --> diffusing.GA" 0.011 1/s
"diffusing.GA --> diffusing.GAD" 1799.9999999999998 1/s
"diffusing.GAD --> diffusing.GA" 0.071 1/s
Creating a grid
Create a 1 by 1 by 3 grid of 500 nm side length voxels.
= 3
L = CubicGrid((1,1,L),500.0) grid
CubicGrid([1, 1, 3], 500.0)
Creating a Context
The Context
is the object the handles the state of a running simulation.
Create a Context
using s
and grid
= MEDYAN.Context(s, grid) c
MEDYAN.Context at time 0.0s in CubicGrid([1, 1, 3], 500.0)
Add Mechanical Boundary
set_mechboundary!(c, MEDYAN.boundary_box(grid; stiffness=100.0))
MEDYAN.Boundary(SVector{4, Float64}[[-10.0, 0.0, 0.0, 2500.0], [10.0, 0.0, 0.0, 2500.0], [0.0, -10.0, 0.0, 2500.0], [0.0, 10.0, 0.0, 2500.0], [0.0, 0.0, -10.0, 7500.0], [0.0, 0.0, 10.0, 7500.0]], SVector{8, Float64}[])
Add agents to the context
The context starts empty.
Distribute 700 of GAT randomly to the chem voxels by mutating the context.
adddiffusingcount_rand!(c, s.diffusing.GAT, 700)
Add a single short filament by mutating the context.
= [s.state.actin.PointedD, s.state.actin.FADPi, s.state.actin.FAT, s.state.actin.BarbedT]
monomerstates = [
nodepositions 0.0,0.0,0.0],
SA[0.0,0.0,monomerspacing*length(monomerstates)]
SA[
]chem_newfilament!(c; monomerstates, nodepositions, node_mids=[1,])
1
Run chemistry
Run chemistry for 1.0s and visualize the results.
= Visualizer()
vis setvisible!(vis["/Grid"], false)
setvisible!(vis["/Axes"], false)
setvisible!(vis["/Background"], false)
If you open the visualizer in a browser and run the following you should get an animated version of below.
for i in 1:100
run_chemistry!(c, 0.01)
minimize_energy!(c)
draw_context!(vis, c, s)
end