Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branching airways 3min model-added constructCubeAlveoli function #34

Open
wants to merge 5 commits into
base: branching_airways_3min_model
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion covid_ba.config
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ max-block-dim = 10
output = results

; *Directory containing files for lung model
lung-model = /users/<Your-User-Name>/simcov
lung-model = /users/arianav/simcov

; Show progress
progress = true
Expand Down
47 changes: 47 additions & 0 deletions create_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import argparse

if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--dim" , nargs='+', type=int, help="Dimensions: x y z", default=[15000, 15000, 1])
parser.add_argument("--whole-lung-dim" , nargs='+', type=int, help="Whole lung dimensions: x y z", default=[48000, 40000, 20000])
parser.add_argument("--timesteps" , type=int, help="Number of timesteps (assuming 1 min per timestep)", default=4000)
parser.add_argument("--infection-coords" , type=str, help="Location (distribution) of initial infections", default="uniform:1")
parser.add_argument("--initial-infection" , type=int, help="Number of virions at initial infection locations", default=1000)
parser.add_argument("--incubation-period" , type=int, help="Average number of time steps to expressing virions after cell is infected", default=480)
parser.add_argument("--apoptosis-period" , type=int, help="Average number of time steps to death after apoptosis is induced", default=180)
parser.add_argument("--expressing-period" , type=int, help="Average number of time steps to death after a cell starts expresssing", default=900)
parser.add_argument("--infectivity" , type=float, help="Factor multiplied by number of virions to determine probability of infection", default=0.001)
parser.add_argument("--infectivity-multiplier" , type=float, help="Multiplier reducing infectivity where inflammatory signal is present", default=1.0)
parser.add_argument("--virion-production" , type=float, help="Number of virions produced by expressing cell each time step", default=1.1)
parser.add_argument("--virion-production-multiplier" , type=float, help="Multiplier reducing virion production rate where inflammatory signal is present", default=1.0)
parser.add_argument("--virion-clearance" , type=float, help="Fraction by which virion count drops each time step", default=0.004)
parser.add_argument("--virion-diffusion" , type=float, help="Fraction of virions that diffuse into all neighbors each time step", default=0.15)
parser.add_argument("--virion-air-diffusion" , type=float, help="Fraction of chemokine concentration that diffuses into all neighbors through air each time step", default=0.0)
parser.add_argument("--chemokine-production" , type=float, help="Amount of chemokine produced by expressing cells each time step", default=1.0)
parser.add_argument("--chemokine-decay" , type=float, help="Amount by which chemokine concentration drops each time step", default=0.01)
parser.add_argument("--chemokine-diffusion" , type=float, help="Fraction of chemokine concentration that diffuses into all neighbors each time step", default=1.0)
parser.add_argument("--chemokine-air-diffusion" , type=float, help="Fraction of chemokine concentration that diffuses into all neighbors through air each time step", default=0.0)
parser.add_argument("--min-chemokine" , type=float, help="Minimum chemokine concentration that triggers a T cell", default=1e-6)
parser.add_argument("--antibody-factor" , type=int, help="Impact of antibodies; multiplier for virion decay (setting to 1 means this has no effect)", default=1)
parser.add_argument("--antibody-period" , type=int, help="Number of time steps before antibodies start to be produced", default=5760)
parser.add_argument("--tcell-generation-rate" , type=int, help="Number of tcells generated at each timestep for the whole lung", default=105000)
parser.add_argument("--tcell-initial-delay" , type=int, help="Number of time steps before T cells start to be produced", default=10080)
parser.add_argument("--tcell-vascular-period" , type=int, help="Average number of time steps to death for a T cell in the vasculature", default=5760)
parser.add_argument("--tcell-tissue-period" , type=int, help="Average number of time steps to death after a T cell extravasates", default=1440)
parser.add_argument("--tcell-binding-period" , type=int, help="Number of time steps a T cell is bound to an epithelial cell when inducing apoptosis", default=10)
parser.add_argument("--max-binding-prob" , type=int, help="Max probability of a T cell binding to an infected cell in one time step", default=1)
parser.add_argument("--tcells-follow-gradient" , type=str, help="T cells in tissue follow the chemokine gradient", default="false")
parser.add_argument("--seed" , type=int, help="Random seed", default=29)
parser.add_argument("--sample-period" , type=int, help="Number of timesteps between samples (set to 0 to disable sampling)", default=10080)
parser.add_argument("--sample-resolution" , type=int, help="Resolution for sampling", default=1)
parser.add_argument("--max-block-dim" , type=int, help="Max. block dimension - larger means more locality but worse load balance. Set to 0 for largest possible", default=10)
parser.add_argument("--output" , type=str, help="Output directory (automatically generated)", default="results")

args = vars(parser.parse_args())
for key in args:
print(key.replace("_", "-"), end='=')
if isinstance(args[key], list):
args[key] = list(map(str, args[key]))
print(' '.join(args[key]))
else:
print(args[key])
32 changes: 32 additions & 0 deletions experiments/j-0.0007632_m-0.007632.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
dim=15000 15000 1
whole-lung-dim=48000 40000 20000
timesteps=33120
infection-coords=uniform:1
initial-infection=1000
incubation-period=480
apoptosis-period=180
expressing-period=900
infectivity=0.001
infectivity-multiplier=1.0
virion-production=1.1
virion-production-multiplier=1.0
virion-clearance=0.004
virion-diffusion=0.0007632
chemokine-production=1.0
chemokine-decay=0.01
chemokine-diffusion=0.007632
min-chemokine=1e-06
antibody-factor=1
antibody-period=5760
tcell-generation-rate=105000
tcell-initial-delay=10080
tcell-vascular-period=5760
tcell-tissue-period=1440
tcell-binding-period=10
max-binding-prob=1
tcells-follow-gradient=false
seed=29
sample-period=0
sample-resolution=1
max-block-dim=10
output=experiments/j-0.0007632_m-0.007632
98 changes: 98 additions & 0 deletions experiments/j-0.0007632_m-0.007632/simcov.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
; Dimensions: x y z
dim = 15000 15000 1

; Whole lung dimensions: x y z
whole-lung-dim = 48000 40000 20000

; Number of timesteps
timesteps = 33120

; Location of multiple initial infections, of form "x1,y1,z1,t1 x2,y2,z2,t2..."
; where x,y,z are grid coords and t is a timestep, or
; "uniform:N" for N uniformly distributed points or
; "random:N" for N randomly distributed points
infection-coords = uniform:1

; Number of virions at initial infection locations
initial-infection = 1000

; Average number of time steps to expressing virions after cell is infected
incubation-period = 480

; Average number of time steps to death after apoptosis is induced
apoptosis-period = 180

; Average number of time steps to death after a cell starts expresssing
expressing-period = 900

; Factor multiplied by number of virions to determine probability of infection
infectivity = 0.001

; Multiplier to reduce infectivity rate
infectivity-multiplier = 1.0

; Number of virions produced by expressing cell each time step
virion-production = 1.1

; Multiplier to reduce virion production rate
virion-production-multiplier = 1.0

; Fraction by which virion count drops each time step
virion-clearance = 0.004

; Fraction of virions that diffuse into all neighbors each time step
virion-diffusion = 0.0007632

; Amount of chemokine produced by expressing cells each time step
chemokine-production = 1.0

; Amount by which chemokine concentration drops each time step
chemokine-decay = 0.01

; Fraction of chemokine concentration that diffuses into all neighbors each time step
chemokine-diffusion = 0.007632

; Minimum chemokine concentration that triggers a T cell
min-chemokine = 1e-06

; Impact of antibodies; multiplier for virion clearance
antibody-factor = 1

; Number of time steps before antibodies start to be produced
antibody-period = 5760

; Number of tcells generated at each timestep for the whole lung
tcell-generation-rate = 105000

; Number of time steps before T cells start to be produced
tcell-initial-delay = 10080

; Average number of time steps to death for a T cell in the vasculature
tcell-vascular-period = 5760

; Average number of time steps to death after a T cell extravasates
tcell-tissue-period = 1440

; Number of time steps a T cell is bound to an epithelial cell when inducing apoptosis
tcell-binding-period = 10

; Max probability of a T cell binding to an infected cell in one time step
max-binding-prob = 1

; T cells in tissue follow the chemokine gradient
tcells-follow-gradient = false

; Random seed
seed = 29

; Number of timesteps between samples (set to 0 to disable sampling)
sample-period = 0

; Resolution for sampling
sample-resolution = 1

; Max. block dimension - larger means more locality but worse load balance. Set to 0 for largest possible
max-block-dim = 10

; Output directory
output = experiments/j-0.0007632_m-0.007632
Loading