Skip to content

Commit

Permalink
work on excluded volume reactions
Browse files Browse the repository at this point in the history
  • Loading branch information
ssandrews committed Aug 29, 2023
1 parent 1e545d3 commit a1a77a5
Show file tree
Hide file tree
Showing 25 changed files with 5,367 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ endif ()

if (OPTION_PYTHON)
# Find python before using pybind11. There is a possibility of version mismatch later.
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
find_package(Python3 3.10 EXACT COMPONENTS Interpreter Development REQUIRED)
set(PYBIND11_SOURCE_DIR ${CMAKE_SOURCE_DIR}/source/pybind11)
add_subdirectory(${PYBIND11_SOURCE_DIR})
add_subdirectory(${CMAKE_SOURCE_DIR}/source/python)
Expand Down
Binary file modified docs/Smoldyn/SmoldynCodeDoc.pdf
Binary file not shown.
6 changes: 6 additions & 0 deletions docs/Smoldyn/SmoldynCodeDoc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7020,6 +7020,12 @@ \subsection*{Modifications for version 2.72 (released 8/17/23)}
\item Merged an automated pull request that might fix dependabot alerts about out of date scipy.
\item Removed \ttt{public std::unary\_function<type,type>} instances from tree\_iterator.hpp (part of NSV code) because this is deprecated.

\subsection*{Modifications for version 2.73 (not released yet)}
\item Investigated diffusion coefficients in crowded systems. I now believe that the overlap method is better than the reflection method. This is discussed in the reactions chapter of the Smoldyn manual. I changed the default behavior to overlap method.
\item Added a line to the CMake file. In the Python module section, edited a line to read \ttt{find\_package(Python3 3.10 EXACT COMPONENTS Interpreter Development REQUIRED)}, where the new portion is the Python 3.10 requirement. This prevents an error of \ttt{invalid command 'bdist\_wheel'} because it now uses the same Python version for everything.
\item Edited Smoldyn/source/pybind11/tests/requirements.txt to simplify the file and hopefully stop warnings from the gitHub dependabot.


\end{itemize}


Expand Down
Binary file modified docs/Smoldyn/SmoldynManual.pdf
Binary file not shown.
31 changes: 23 additions & 8 deletions docs/Smoldyn/SmoldynManual.tex

Large diffs are not rendered by default.

Binary file added docs/Smoldyn/figures/crowding3Ddiff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Smoldyn/figures/crowding3Drdf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,539 changes: 3,539 additions & 0 deletions examples/S8_reactions/bounce/crowding3D.nb

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions examples/S8_reactions/bounce/crowding3D.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Simple crowded system simulation
# Values are roughly right for hemoglobin
# Units are nm and us

define SEED 1
define NMOL 6112 # 40% volume occupancy
define HGRADIUS 2.5
#define BETTERGRAPHICS

ifdefine BETTERGRAPHICS
graphics opengl_better
light room ambient 0 0 0
light 0 position -1 1 1 0
light 0 diffuse 0.5 0.5 0.5
light 0 ambient 0.5 0.5 0.5
light 0 specular 0.5 0.5 0.5
else
graphics opengl
graphic_iter 1000
endif

text_display time

#random_seed SEED

dim 3
boundaries x 0 100 p
boundaries y 0 100 p
boundaries z 0 100 p

species Hg

difc Hg 65

color Hg lightred
display_size Hg HGRADIUS

time_start 0
time_stop 20
time_step 0.0001 # standard value is 0.0001

frame_thickness 2

mol NMOL Hg u u u

reaction r1 Hg + Hg -> Hg + Hg
binding_radius r1 2*HGRADIUS
product_placement r1 bounce -1

output_files crowding3Dout.txt crowding3Dmsdout.txt
output_format csv
cmd i 10 20 0.5 radialdistribution Hg Hg 20 100 20 crowding3Dout.txt
cmd i 10 20 0.5 meansqrdisp Hg all crowding3Dmsdout.txt

end_file

159 changes: 159 additions & 0 deletions examples/S94_archive/Andrews_Arkin_2010/Bar29.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# Bar1 Smoldyn simulation
# by Steve Andrews, 11/30/09
# Ref: Andrews, Addy, Brent, Arkin, "Detailed simulations of cell biology with Smoldyn 2.1", PLoS Comp. Biol. 2010
# This file is Bar29.txt, from Bar28.txt
# This is Bar1+, 1 target cell, no Bar1 adsorption
# Units: microns and seconds

define WITHBAR1

# *** output file ***
define OUTFILE1 FILEROOTout.txt
define OUTFILE2 FILEROOTout2.txt

# *** time ***
define TIMEEND 4500

# *** boundaries ***
define XLO -12
define XHI 12
define YLO -12
define YHI 12
define ZLO -12
define ZHI 12

# *** model parameters ***
define NGPCR 6622 # number of GPCR
define K1t 250 # target alpha production rate
define K1c 12.5 # challenger alpha production rate
define K4 100 # Bar1 production rate in um^-2/s
define K5 5.15 # Bar1-alpha reaction rate, diff. limit is 10.3 um^3/s
define K6 0.008303 # alpha binding to GPCR, *** 2x
define K7 0.02 # alpha unbinding from GPCR, *** 2x

graphics opengl
graphic_iter 10000
frame_thickness 0
accuracy 10

dim 3
species Bar1 alpha GPCR GPCRalpha
max_mol 300000
boxsize 0.5

molecule_lists list3 list4 list1 list2 list5

mol_list alpha(fsoln) list1
mol_list alpha(up) list2
mol_list GPCR(up) list3
mol_list GPCRalpha(up) list4
mol_list Bar1(fsoln) list5
mol_list Bar1(up) list2

difc Bar1(fsoln) 27
difc alpha(fsoln) 132

color Bar1(fsoln) 0 1 0
color Bar1(front) 0 1 0
color alpha(fsoln) 0 0 0
color GPCR(up) 0 0 1
color GPCRalpha(up) 1 0 0.2

display_size alpha(fsoln) 1
display_size alpha(up) 0
display_size Bar1(all) 1
display_size GPCR(up) 2
display_size GPCRalpha(up) 2

time_start 0
time_stop TIMEEND
time_step 0.02

boundaries 0 XLO XHI
boundaries 1 YLO YHI
boundaries 2 ZLO ZHI

max_surface 5

start_surface sides
polygon both none
unbounded_emitter front Bar1 K4 0 0 0
unbounded_emitter front alpha K1t 5.5 0 0
unbounded_emitter front alpha K1c 2.75 4.7632 0
unbounded_emitter front alpha K1c -2.75 4.7632 0
unbounded_emitter front alpha K1c -5.5 0 0
unbounded_emitter front alpha K1c -2.75 -4.7632 0
unbounded_emitter front alpha K1c 2.75 -4.7632 0
read_file ellipse_12_12.txt
end_surface

start_surface cell
action both all reflect
polygon both face
color both 0.8 0.8 0.8
max_panels sphere 1
panel sphere 0 0 0 2.5 20 20
end_surface

start_surface alphatarget
polygon both face
color both 0.3 0.3 0.3
max_panels sphere 6
panel sphere 5.5 0 0 2.5 20 20
end_surface

start_surface alphachallenge
polygon both face
color both 0.5 0.5 0.5
max_panels sphere 6
panel sphere 2.75 4.7632 0 2.5 20 20
panel sphere -2.75 4.7632 0 2.5 20 20
panel sphere -5.5 0 0 2.5 20 20
panel sphere -2.75 -4.7632 0 2.5 20 20
panel sphere 2.75 -4.7632 0 2.5 20 20
end_surface

surface_mol NGPCR GPCR(up) cell all all

reaction_surface alphatarget rxn1t 0 -> alpha(fsoln) K1t # alpha production
reaction_surface alphachallenge rxn1c 0 -> alpha(fsoln) K1c # alpha production

ifdefine WITHBAR1
reaction_surface cell rxn4 0 -> Bar1(fsoln) K4 # Bar1 production
reaction rxn5 Bar1(fsoln) + alpha(fsoln) -> Bar1(fsoln) K5 # Bar1 protease on alpha
endif

reaction rxn6 GPCR(up) + alpha(fsoln) -> GPCRalpha(up) K6 # GPCR-alpha binding
reaction rxn7 GPCRalpha(up) -> GPCR(up) + alpha(fsoln) K7 # GPCR-alpha unbinding
product_placement rxn7 pgemmax 0.2

cmd @ 0 set reaction_rate rxn1t 15.625
cmd @ 500 set reaction_rate rxn1t 31.25
cmd @ 1000 set reaction_rate rxn1t 62.5
cmd @ 1500 set reaction_rate rxn1t 125
cmd @ 2000 set reaction_rate rxn1t 250
cmd @ 2500 set reaction_rate rxn1t 500
cmd @ 3000 set reaction_rate rxn1t 1000
cmd @ 3500 set reaction_rate rxn1t 2000
cmd @ 4000 set reaction_rate rxn1t 4000

cmd @ 0 set reaction_rate rxn1c 0.78125
cmd @ 500 set reaction_rate rxn1c 1.5625
cmd @ 1000 set reaction_rate rxn1c 3.125
cmd @ 1500 set reaction_rate rxn1c 6.25
cmd @ 2000 set reaction_rate rxn1c 12.5
cmd @ 2500 set reaction_rate rxn1c 25
cmd @ 3000 set reaction_rate rxn1c 50.0
cmd @ 3500 set reaction_rate rxn1c 100.0
cmd @ 4000 set reaction_rate rxn1c 200.0

output_files stdout OUTFILE1 OUTFILE2

cmd B molcountheader stdout
cmd B molcountheader OUTFILE2
cmd i 0 TIMEEND 2 molcount stdout
cmd i 0 TIMEEND 2 molcount OUTFILE2
cmd i 0 TIMEEND 2 molmoments GPCRalpha(up) OUTFILE1

end_file

90 changes: 90 additions & 0 deletions examples/S94_archive/Andrews_Arkin_2010/MoroneData.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Data from Morone et al., 2006.
# Units are nm

max_panels tri 100
panel tri 1.639344262 413.9344262 65.57377049 449.1803279
panel tri 1.639344262 413.9344262 21.31147541 368.852459
panel tri 65.57377049 449.1803279 55.73770492 391.8032787
panel tri 21.31147541 368.852459 55.73770492 391.8032787
panel tri 0 359.8360656 21.31147541 368.852459
panel tri 21.31147541 368.852459 39.3442623 301.6393443
panel tri 39.3442623 301.6393443 -4.918032787 254.0983607
panel tri -4.918032787 254.0983607 63.1147541 237.704918
panel tri 21.31147541 224.5901639 -6.557377049 159.0163934
panel tri -4.918032787 254.0983607 56.55737705 196.7213115
panel tri -6.557377049 159.0163934 20.49180328 135.2459016
panel tri -5.737704918 113.9344262 52.45901639 159.8360656
panel tri -5.737704918 113.9344262 148.3606557 0
panel tri -0.819672131 29.50819672 46.72131148 -0.819672131
panel tri 46.72131148 -0.819672131 68.03278689 36.8852459
panel tri 148.3606557 0 130.3278689 95.08196721
panel tri 130.3278689 95.08196721 95.90163934 142.6229508
panel tri 95.90163934 142.6229508 52.45901639 159.8360656
panel tri 52.45901639 159.8360656 56.55737705 196.7213115
panel tri 56.55737705 196.7213115 145.0819672 246.7213115
panel tri 145.0819672 246.7213115 336.8852459 245.9016393
panel tri 95.90163934 142.6229508 113.1147541 154.9180328
panel tri 56.55737705 196.7213115 113.1147541 154.9180328
panel tri 63.1147541 237.704918 210.6557377 341.8032787
panel tri 168.0327869 317.2131148 131.147541 358.1967213
panel tri 39.3442623 301.6393443 168.0327869 317.2131148
panel tri 68.03278689 314.7540984 71.31147541 343.442623
panel tri 55.73770492 391.8032787 111.4754098 349.1803279
panel tri 111.4754098 349.1803279 114.7540984 315.5737705
panel tri 86.8852459 259.0163934 75.40983607 295.0819672
panel tri 119.6721311 391.8032787 195.9016393 430.3278689
panel tri 195.9016393 430.3278689 231.9672131 431.147541
panel tri 231.9672131 431.147541 253.2786885 394.2622951
panel tri 253.2786885 394.2622951 210.6557377 341.8032787
panel tri 111.4754098 349.1803279 210.6557377 341.8032787
panel tri 210.6557377 341.8032787 283.6065574 250.8196721
panel tri 143.442623 273.7704918 281.147541 352.4590164
panel tri 181.147541 286.8852459 220.4918033 209.8360656
panel tri 220.4918033 209.8360656 276.2295082 109.8360656
panel tri 157.3770492 204.0983607 200.8196721 155.7377049
panel tri 200.8196721 155.7377049 304.0983607 161.4754098
panel tri 113.1147541 154.9180328 172.1311475 134.4262295
panel tri 172.1311475 134.4262295 351.6393443 -1.639344262
panel tri 130.3278689 95.08196721 185.2459016 71.31147541
panel tri 185.2459016 71.31147541 332.7868852 82.78688525
panel tri 197.5409836 50 207.3770492 74.59016393
panel tri 185.2459016 71.31147541 199.1803279 36.8852459
panel tri 199.1803279 36.8852459 273.7704918 -1.639344262
panel tri 242.6229508 9.016393443 290.9836066 35.24590164
panel tri 273.7704918 -1.639344262 442.6229508 16.39344262
panel tri 172.1311475 134.4262295 229.5081967 129.5081967
panel tri 200.8196721 155.7377049 185.2459016 71.31147541
panel tri 229.5081967 129.5081967 252.4590164 161.4754098
panel tri 68.03278689 36.8852459 148.3606557 0
panel tri 139.3442623 34.42622951 211.4754098 -1.639344262
panel tri 229.5081967 129.5081967 384.4262295 13.1147541
panel tri 384.4262295 13.1147541 344.2622951 220.4918033
panel tri 382.7868852 59.83606557 438.5245902 92.62295082
panel tri 382.7868852 59.83606557 419.6721311 152.4590164
panel tri 419.6721311 152.4590164 436.8852459 170.4918033
panel tri 419.6721311 152.4590164 389.3442623 275.4098361
panel tri 324.5901639 138.5245902 283.6065574 250.8196721
panel tri 324.5901639 138.5245902 354.0983607 264.7540984
panel tri 283.6065574 250.8196721 236.704918 181.9672131
panel tri 283.6065574 250.8196721 313.9344262 277.8688525
panel tri 313.9344262 277.8688525 327.0491803 311.4754098
panel tri 327.0491803 311.4754098 305.7377049 345.9016393
panel tri 281.147541 352.4590164 435.2459016 333.6065574
panel tri 281.147541 352.4590164 253.2786885 350
panel tri 253.2786885 394.2622951 286.0655738 405.7377049
panel tri 264.7540984 436.8852459 388.5245902 331.147541
panel tri 286.8852459 435.2459016 388.5245902 331.147541
panel tri 354.0983607 264.7540984 388.5245902 331.147541
panel tri 327.0491803 311.4754098 373.7704918 297.5409836
panel tri 389.3442623 275.4098361 435.2459016 333.6065574
panel tri 283.6065574 250.8196721 440.1639344 282.7868852
panel tri 313.9344262 277.8688525 354.0983607 264.7540984
panel tri 363.1147541 109.8360656 436.8852459 238.5245902
panel tri 368.852459 350.8196721 436.8852459 401.6393443
panel tri 311.4754098 440.1639344 437.704918 361.4754098
panel tri 436.8852459 401.6393443 407.3770492 437.704918
panel tri 350.8196721 416.3934426 407.3770492 437.704918
panel tri 113.9344262 227.0491803 143.442623 273.7704918
panel tri 181.147541 286.8852459 168.0327869 317.2131148

end_file
44 changes: 44 additions & 0 deletions examples/S94_archive/Andrews_Arkin_2010/benchmark.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Michaelis-Menten reaction
# units: micron and second

graphics none

dim 3
names E S ES P
max_mol 11000
molperbox 3
accuracy 10

difc E 10
difc S 10
difc ES 10
difc P 10

time_start 0
time_stop 10
time_step 0.001

boundaries 0 0 4.4964 p
boundaries 1 0 4.4964 p
boundaries 2 0 4.4964 p

molecule_lists Elist Slist ESlist Plist
mol_list E Elist
mol_list S Slist
mol_list ES ESlist
mol_list P Plist

output_files benchmarkout.txt
cmd i 0 100 0.01 molcount benchmarkout.txt

# 10 E/vol and 100 S/vol
mol 909 E u u u
mol 9091 S u u u

reaction fwd E + S -> ES 0.01
reaction back ES -> E + S 1
reaction prod ES -> E + P 1
product_placement back pgemmax 0.2

end_file

Loading

0 comments on commit a1a77a5

Please sign in to comment.