![]() |
|
Example 2 uses the same ligand release sites as the previous example, but now introduces two rings of sampling boxes. The sampling boxes make it possible to COUNT ligands within a particular region of space and output that information to a REACTION_DATA_OUTPUT file.
file run_parameters
/* run_parameters */ /* simple numerical variables */ dt = 1.0e-6 /* exponential notation: 1.0e-6 = 0.000001 */ iterations = 300 /* simple text variables */ viz_output_file = "viz_data" working_directory = "./" /* text expression */ ligand_parameters = working_directory & "June_7_1997"file June_7_1997
/* June_7_1997 */ /* simple numerical variables */ red_ligand_diffusion_constant = 6.0e-6 number_of_ligand_molecules = 5.0e3 release_site_diameter = 0.03 /* simple numerical variables, numerical expressions, and numerical arrays */ red_xy_value = 0.0 red_location = [red_xy_value, red_xy_value, 0.0] blue_x_value = red_xy_value-1.0 blue_location = [blue_x_value, 0.0-1.0, 0.0] blue_ligand_diffusion_constant = red_ligand_diffusion_constant/2.0file ligand_sampling
/* ligand_sampling */
INCLUDE_FILE = "run_parameters"
INCLUDE_FILE = ligand_parameters
TIME_STEP = dt
ITERATIONS = iterations
PARTITION_X = [-1.051,-0.935,-0.7,-0.35,-0.052,0.052,0.35,0.7,0.935,1.051]
DEFINE_LIGAND red_ligand {DIFFUSION_CONSTANT = red_ligand_diffusion_constant}
DEFINE_LIGAND blue_ligand {DIFFUSION_CONSTANT = blue_ligand_diffusion_constant}
offset = 0.05
origin_box BOX {
CORNERS = [-offset,-offset,-offset], [offset,offset,offset]
FULLY_CLOSED = YES
TRANSPARENT {
LIGAND = red_ligand
ELEMENT = ALL_ELEMENTS
}
TRANSPARENT {
LIGAND = blue_ligand
ELEMENT = ALL_ELEMENTS
}
}
translated_origin_boxes OBJECT {
member_1 OBJECT origin_box {
TRANSLATE = [1.0,0,0]
}
member_2 OBJECT origin_box {
TRANSLATE = [1.0,0,0]
ROTATE = [0,0,1], 90
}
}
ring_of_boxes OBJECT {
member_1 OBJECT translated_origin_boxes {}
member_2 OBJECT translated_origin_boxes {
ROTATE = [1,1,0], 45
}
member_3 OBJECT translated_origin_boxes {
ROTATE = [1,1,0], 90
}
member_4 OBJECT translated_origin_boxes {
ROTATE = [1,1,0], 135
}
}
INSTANTIATE microdomain OBJECT {
far_ring_of_boxes OBJECT ring_of_boxes {}
near_ring_of_boxes OBJECT ring_of_boxes {
TRANSLATE = [-1,-1,0]
}
red_ligand_release_site SPHERICAL_RELEASE_SITE {
LOCATION = red_location
LIGAND = red_ligand
NUMBER_TO_RELEASE = number_of_ligand_molecules
SITE_DIAMETER = release_site_diameter
}
blue_ligand_release_site SPHERICAL_RELEASE_SITE {
LOCATION = blue_location
LIGAND = blue_ligand
NUMBER_TO_RELEASE = number_of_ligand_molecules
SITE_DIAMETER = release_site_diameter
}
}
/*
VIZ_DATA_OUTPUT {
MODE = DX
STATE_VALUES {red_ligand = 1 blue_ligand = 2
microdomain.far_ring_of_boxes = 1
microdomain.near_ring_of_boxes = 2
}
OBJECT_FILE_DESIGNATORS {microdomain = viz_output_file & ".microdomain"}
ITERATION_LIST = [[0 TO 360 STEP 1]]
}
*/
REACTION_DATA_OUTPUT {
STEP = 1*dt
{COUNT[red_ligand,microdomain.far_ring_of_boxes,FOR_EACH_TIME_STEP] +
COUNT[red_ligand,microdomain.near_ring_of_boxes,FOR_EACH_TIME_STEP]} =>
INPUT_FILE & ".red_ligand"
{COUNT[blue_ligand,microdomain.near_ring_of_boxes,FOR_EACH_TIME_STEP]} = >
INPUT_FILE & ".blue_ligand.near"
{COUNT[blue_ligand,microdomain.far_ring_of_boxes,FOR_EACH_TIME_STEP]} =>
INPUT_FILE & ".blue_ligand.far"
}