diff --git a/jupyter_notebooks/diagrams.ipynb b/jupyter_notebooks/diagrams.ipynb index 8fd65bc..2c4e407 100644 --- a/jupyter_notebooks/diagrams.ipynb +++ b/jupyter_notebooks/diagrams.ipynb @@ -503,7 +503,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 66, "id": "8166389b-a006-490a-8e84-9e67e49591ed", "metadata": {}, "outputs": [ @@ -511,7 +511,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Initializing experiment tumor_tcell_20231026.220231\n" + "Initializing experiment tumor_tcell_20231026.222910\n" ] }, { @@ -569,7 +569,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 67, "id": "589648aa-b5b8-497c-b937-366c87dae3de", "metadata": {}, "outputs": [], @@ -599,19 +599,10 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 68, "id": "10df1f44-fd56-46b9-8806-a959c071978f", "metadata": {}, "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "node ('agents',) not in graph\n", - "node ('fields',) not in graph\n", - "node ('dimensions',) not in graph\n" - ] - }, { "data": { "image/svg+xml": [ @@ -621,273 +612,276 @@ "\n", "\n", - "\n", - "\n", + "\n", + "\n", "bigraph\n", - "\n", + "\n", "\n", "\n", "('in_transit',)\n", - "\n", - "in_transit\n", + "\n", + "in_transit\n", "\n", + "\n", + "\n", + "('lymph_node',)\n", + "\n", + "lymph_node\n", + "\n", + "\n", "\n", "\n", "('lymph_node_transfer',)\n", - "\n", - "lymph_node_transfer\n", + "\n", + "lymph_node_transfer\n", "\n", "\n", "\n", "('in_transit',)->('lymph_node_transfer',)\n", - "\n", - "\n", - "in_transit\n", - "\n", - "\n", - "\n", - "('lymph_node',)\n", - "\n", - "lymph_node\n", + "\n", + "\n", + "in_transit\n", "\n", "\n", "\n", "('lymph_node',)->('lymph_node_transfer',)\n", - "\n", - "\n", - "lymph_node\n", + "\n", + "\n", + "lymph_node\n", "\n", + "\n", "\n", "\n", "('tumor_environment',)\n", - "\n", - "tumor_environment\n", + "\n", + "tumor_environment\n", "\n", + "\n", "\n", "\n", "('tumor_environment', 'agents')\n", - "\n", - "agents\n", + "\n", + "agents\n", "\n", "\n", "\n", "('tumor_environment',)->('tumor_environment', 'agents')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'dimensions')\n", - "\n", - "dimensions\n", + "\n", + "dimensions\n", "\n", "\n", "\n", "('tumor_environment',)->('tumor_environment', 'dimensions')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'fields')\n", - "\n", - "fields\n", + "\n", + "fields\n", "\n", "\n", "\n", "('tumor_environment',)->('tumor_environment', 'fields')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'neighbors_multibody')\n", - "\n", - "neighbors_multibody\n", + "\n", + "neighbors_multibody\n", "\n", "\n", "\n", "\n", "('tumor_environment', 'diffusion_field')\n", - "\n", - "diffusion_field\n", + "\n", + "diffusion_field\n", "\n", "\n", "\n", "\n", "('tumor_environment',)->('lymph_node_transfer',)\n", - "\n", - "\n", - "cells\n", + "\n", + "\n", + "cells\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0')\n", - "\n", - "tcell_0\n", + "\n", + "tcell_0\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'tcell_0')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0')\n", - "\n", - "tumor_0\n", + "\n", + "tumor_0\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'tumor_0')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0')\n", - "\n", - "dendritic_0\n", + "\n", + "dendritic_0\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'dendritic_0')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'division')\n", - "\n", - "division\n", + "\n", + "division\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'tcell_0', 'division')\n", - "\n", - "\n", - "agents\n", + "\n", + "\n", + "agents\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'death')\n", - "\n", - "death\n", + "\n", + "death\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'tcell_0', 'death')\n", - "\n", - "\n", - "agents\n", + "\n", + "\n", + "agents\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'division')\n", - "\n", - "division\n", + "\n", + "division\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'tumor_0', 'division')\n", - "\n", - "\n", - "agents\n", + "\n", + "\n", + "agents\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'death')\n", - "\n", - "death\n", + "\n", + "death\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'tumor_0', 'death')\n", - "\n", - "\n", - "agents\n", + "\n", + "\n", + "agents\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'division')\n", - "\n", - "division\n", + "\n", + "division\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'dendritic_0', 'division')\n", - "\n", - "\n", - "agents\n", + "\n", + "\n", + "agents\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'death')\n", - "\n", - "death\n", + "\n", + "death\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'dendritic_0', 'death')\n", - "\n", - "\n", - "agents\n", + "\n", + "\n", + "agents\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'neighbors_multibody')\n", - "\n", - "\n", - "cells\n", + "\n", + "\n", + "cells\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'diffusion_field')\n", - "\n", - "\n", - "cells\n", + "\n", + "\n", + "cells\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')\n", - "\n", - "boundary\n", + "\n", + "boundary\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 'boundary')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'neighbors')\n", - "\n", - "neighbors\n", + "\n", + "neighbors\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 'neighbors')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'internal')\n", - "\n", - "internal\n", + "\n", + "internal\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 'internal')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 't_cell')\n", - "\n", - "t_cell\n", + "\n", + "t_cell\n", "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'local_field')\n", - "\n", - "local_field\n", + "\n", + "local_field\n", "\n", "\n", "\n", @@ -895,137 +889,137 @@ "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'death')\n", - "\n", - "death\n", + "\n", + "death\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'death')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'location')\n", - "\n", - "location\n", + "\n", + "location\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'location')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange')\n", - "\n", - "exchange\n", + "\n", + "exchange\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 't_cell')\n", - "\n", - "\n", - "boundary\n", + "\n", + "\n", + "boundary\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 't_cell')\n", - "\n", - "\n", - "globals\n", + "\n", + "\n", + "globals\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'division')\n", - "\n", - "\n", - "global\n", + "\n", + "\n", + "global\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'death')->('tumor_environment', 'agents', 'tcell_0', 'death')\n", - "\n", - "\n", - "trigger\n", + "\n", + "\n", + "trigger\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'location')->('tumor_environment', 'agents', 'tcell_0', 'local_field')\n", - "\n", - "\n", - "location\n", + "\n", + "\n", + "location\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange')->('tumor_environment', 'agents', 'tcell_0', 'local_field')\n", - "\n", - "\n", - "exchanges\n", + "\n", + "\n", + "exchanges\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'neighbors')->('tumor_environment', 'agents', 'tcell_0', 't_cell')\n", - "\n", - "\n", - "neighbors\n", + "\n", + "\n", + "neighbors\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'internal')->('tumor_environment', 'agents', 'tcell_0', 't_cell')\n", - "\n", - "\n", - "internal\n", + "\n", + "\n", + "internal\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary')\n", - "\n", - "boundary\n", + "\n", + "boundary\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0')->('tumor_environment', 'agents', 'tumor_0', 'boundary')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'neighbors')\n", - "\n", - "neighbors\n", + "\n", + "neighbors\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0')->('tumor_environment', 'agents', 'tumor_0', 'neighbors')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'internal')\n", - "\n", - "internal\n", + "\n", + "internal\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0')->('tumor_environment', 'agents', 'tumor_0', 'internal')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'tumor')\n", - "\n", - "tumor\n", + "\n", + "tumor\n", "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'local_field')\n", - "\n", - "local_field\n", + "\n", + "local_field\n", "\n", "\n", "\n", @@ -1033,137 +1027,137 @@ "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'death')\n", - "\n", - "death\n", + "\n", + "death\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'death')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'location')\n", - "\n", - "location\n", + "\n", + "location\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'location')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'exchange')\n", - "\n", - "exchange\n", + "\n", + "exchange\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'exchange')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'tumor')\n", - "\n", - "\n", - "boundary\n", + "\n", + "\n", + "boundary\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'tumor')\n", - "\n", - "\n", - "globals\n", + "\n", + "\n", + "globals\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'division')\n", - "\n", - "\n", - "global\n", + "\n", + "\n", + "global\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'death')->('tumor_environment', 'agents', 'tumor_0', 'death')\n", - "\n", - "\n", - "trigger\n", + "\n", + "\n", + "trigger\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'location')->('tumor_environment', 'agents', 'tumor_0', 'local_field')\n", - "\n", - "\n", - "location\n", + "\n", + "\n", + "location\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'exchange')->('tumor_environment', 'agents', 'tumor_0', 'local_field')\n", - "\n", - "\n", - "exchanges\n", + "\n", + "\n", + "exchanges\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'neighbors')->('tumor_environment', 'agents', 'tumor_0', 'tumor')\n", - "\n", - "\n", - "neighbors\n", + "\n", + "\n", + "neighbors\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0', 'internal')->('tumor_environment', 'agents', 'tumor_0', 'tumor')\n", - "\n", - "\n", - "internal\n", + "\n", + "\n", + "internal\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary')\n", - "\n", - "boundary\n", + "\n", + "boundary\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0')->('tumor_environment', 'agents', 'dendritic_0', 'boundary')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'neighbors')\n", - "\n", - "neighbors\n", + "\n", + "neighbors\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0')->('tumor_environment', 'agents', 'dendritic_0', 'neighbors')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'internal')\n", - "\n", - "internal\n", + "\n", + "internal\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0')->('tumor_environment', 'agents', 'dendritic_0', 'internal')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'dendritic_cell')\n", - "\n", - "dendritic_cell\n", + "\n", + "dendritic_cell\n", "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'local_field')\n", - "\n", - "local_field\n", + "\n", + "local_field\n", "\n", "\n", "\n", @@ -1171,156 +1165,158 @@ "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'death')\n", - "\n", - "death\n", + "\n", + "death\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'death')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'location')\n", - "\n", - "location\n", + "\n", + "location\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'location')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'exchange')\n", - "\n", - "exchange\n", + "\n", + "exchange\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'exchange')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'dendritic_cell')\n", - "\n", - "\n", - "boundary\n", + "\n", + "\n", + "boundary\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'dendritic_cell')\n", - "\n", - "\n", - "globals\n", + "\n", + "\n", + "globals\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'division')\n", - "\n", - "\n", - "global\n", + "\n", + "\n", + "global\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'death')->('tumor_environment', 'agents', 'dendritic_0', 'death')\n", - "\n", - "\n", - "trigger\n", + "\n", + "\n", + "trigger\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'location')->('tumor_environment', 'agents', 'dendritic_0', 'local_field')\n", - "\n", - "\n", - "location\n", + "\n", + "\n", + "location\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'exchange')->('tumor_environment', 'agents', 'dendritic_0', 'local_field')\n", - "\n", - "\n", - "exchanges\n", + "\n", + "\n", + "exchanges\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'neighbors')->('tumor_environment', 'agents', 'dendritic_0', 'dendritic_cell')\n", - "\n", - "\n", - "neighbors\n", + "\n", + "\n", + "neighbors\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0', 'internal')->('tumor_environment', 'agents', 'dendritic_0', 'dendritic_cell')\n", - "\n", - "\n", - "internal\n", + "\n", + "\n", + "internal\n", "\n", + "\n", "\n", "\n", "('tumor_environment', 'dimensions')->('tumor_environment', 'agents', 'tcell_0', 'local_field')\n", - "\n", - "\n", - "dimensions\n", + "\n", + "\n", + "dimensions\n", "\n", "\n", "\n", "('tumor_environment', 'dimensions')->('tumor_environment', 'agents', 'tumor_0', 'local_field')\n", - "\n", - "\n", - "dimensions\n", + "\n", + "\n", + "dimensions\n", "\n", "\n", "\n", "('tumor_environment', 'dimensions')->('tumor_environment', 'agents', 'dendritic_0', 'local_field')\n", - "\n", - "\n", - "dimensions\n", + "\n", + "\n", + "dimensions\n", "\n", "\n", "\n", "('tumor_environment', 'dimensions')->('tumor_environment', 'diffusion_field')\n", - "\n", - "\n", - "dimensions\n", + "\n", + "\n", + "dimensions\n", "\n", + "\n", "\n", "\n", "('tumor_environment', 'fields')->('tumor_environment', 'agents', 'tcell_0', 'local_field')\n", - "\n", - "\n", - "fields\n", + "\n", + "\n", + "fields\n", "\n", "\n", "\n", "('tumor_environment', 'fields')->('tumor_environment', 'agents', 'tumor_0', 'local_field')\n", - "\n", - "\n", - "fields\n", + "\n", + "\n", + "fields\n", "\n", "\n", "\n", "('tumor_environment', 'fields')->('tumor_environment', 'agents', 'dendritic_0', 'local_field')\n", - "\n", - "\n", - "fields\n", + "\n", + "\n", + "fields\n", "\n", "\n", "\n", "('tumor_environment', 'fields')->('tumor_environment', 'diffusion_field')\n", - "\n", - "\n", - "fields\n", + "\n", + "\n", + "fields\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, - "execution_count": 49, + "execution_count": 68, "metadata": {}, "output_type": "execute_result" } @@ -1358,19 +1354,10 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 69, "id": "122b14d5-bed9-4502-94bd-1ad27ac0e16b", "metadata": {}, "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "node ('agents',) not in graph\n", - "node ('fields',) not in graph\n", - "node ('dimensions',) not in graph\n" - ] - }, { "data": { "image/svg+xml": [ @@ -1380,221 +1367,224 @@ "\n", "\n", - "\n", - "\n", + "\n", + "\n", "bigraph\n", - "\n", + "\n", "\n", "\n", "('in_transit',)\n", - "\n", - "in_transit\n", + "\n", + "in_transit\n", "\n", + "\n", + "\n", + "('lymph_node',)\n", + "\n", + "lymph_node\n", + "\n", + "\n", "\n", "\n", "('lymph_node_transfer',)\n", - "\n", - "lymph_node_transfer\n", + "\n", + "lymph_node_transfer\n", "\n", "\n", "\n", "('in_transit',)->('lymph_node_transfer',)\n", - "\n", - "\n", - "in_transit\n", - "\n", - "\n", - "\n", - "('lymph_node',)\n", - "\n", - "lymph_node\n", + "\n", + "\n", + "in_transit\n", "\n", "\n", "\n", "('lymph_node',)->('lymph_node_transfer',)\n", - "\n", - "\n", - "lymph_node\n", + "\n", + "\n", + "lymph_node\n", "\n", + "\n", "\n", "\n", "('tumor_environment',)\n", - "\n", - "tumor_environment\n", + "\n", + "tumor_environment\n", "\n", + "\n", "\n", "\n", "('tumor_environment', 'agents')\n", - "\n", - "agents\n", + "\n", + "agents\n", "\n", "\n", "\n", "('tumor_environment',)->('tumor_environment', 'agents')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'dimensions')\n", - "\n", - "dimensions\n", + "\n", + "dimensions\n", "\n", "\n", "\n", "('tumor_environment',)->('tumor_environment', 'dimensions')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'fields')\n", - "\n", - "fields\n", + "\n", + "fields\n", "\n", "\n", "\n", "('tumor_environment',)->('tumor_environment', 'fields')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'neighbors_multibody')\n", - "\n", - "neighbors_multibody\n", + "\n", + "neighbors_multibody\n", "\n", "\n", "\n", "\n", "('tumor_environment', 'diffusion_field')\n", - "\n", - "diffusion_field\n", + "\n", + "diffusion_field\n", "\n", "\n", "\n", "\n", "('tumor_environment',)->('lymph_node_transfer',)\n", - "\n", - "\n", - "cells\n", + "\n", + "\n", + "cells\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0')\n", - "\n", - "tcell_0\n", + "\n", + "tcell_0\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'tcell_0')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tumor_0')\n", - "\n", - "tumor_0\n", + "\n", + "tumor_0\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'tumor_0')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'dendritic_0')\n", - "\n", - "dendritic_0\n", + "\n", + "dendritic_0\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'dendritic_0')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'division')\n", - "\n", - "division\n", + "\n", + "division\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'tcell_0', 'division')\n", - "\n", - "\n", - "agents\n", + "\n", + "\n", + "agents\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'death')\n", - "\n", - "death\n", + "\n", + "death\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'tcell_0', 'death')\n", - "\n", - "\n", - "agents\n", + "\n", + "\n", + "agents\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'neighbors_multibody')\n", - "\n", - "\n", - "cells\n", + "\n", + "\n", + "cells\n", "\n", "\n", "\n", "('tumor_environment', 'agents')->('tumor_environment', 'diffusion_field')\n", - "\n", - "\n", - "cells\n", + "\n", + "\n", + "cells\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')\n", - "\n", - "boundary\n", + "\n", + "boundary\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 'boundary')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'neighbors')\n", - "\n", - "neighbors\n", + "\n", + "neighbors\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 'neighbors')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'internal')\n", - "\n", - "internal\n", + "\n", + "internal\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 'internal')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 't_cell')\n", - "\n", - "t_cell\n", + "\n", + "t_cell\n", "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'local_field')\n", - "\n", - "local_field\n", + "\n", + "local_field\n", "\n", "\n", "\n", @@ -1602,183 +1592,185 @@ "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'death')\n", - "\n", - "death\n", + "\n", + "death\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'death')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'location')\n", - "\n", - "location\n", + "\n", + "location\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'location')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange')\n", - "\n", - "exchange\n", + "\n", + "exchange\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'diameter')\n", - "\n", - "diameter\n", + "\n", + "diameter\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'diameter')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 't_cell')\n", - "\n", - "\n", - "boundary\n", + "\n", + "\n", + "boundary\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 't_cell')\n", - "\n", - "\n", - "globals\n", + "\n", + "\n", + "globals\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'division')\n", - "\n", - "\n", - "global\n", + "\n", + "\n", + "global\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'death')->('tumor_environment', 'agents', 'tcell_0', 'death')\n", - "\n", - "\n", - "trigger\n", + "\n", + "\n", + "trigger\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'location')->('tumor_environment', 'agents', 'tcell_0', 'local_field')\n", - "\n", - "\n", - "location\n", + "\n", + "\n", + "location\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange', 'IFNg')\n", - "\n", - "IFNg\n", + "\n", + "IFNg\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange', 'IFNg')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange')->('tumor_environment', 'agents', 'tcell_0', 'local_field')\n", - "\n", - "\n", - "exchanges\n", + "\n", + "\n", + "exchanges\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present')\n", - "\n", - "present\n", + "\n", + "present\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'neighbors')->('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'neighbors')->('tumor_environment', 'agents', 'tcell_0', 't_cell')\n", - "\n", - "\n", - "neighbors\n", + "\n", + "\n", + "neighbors\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present', 'PD1')\n", - "\n", - "PD1\n", + "\n", + "PD1\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present')->('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present', 'PD1')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'internal', 'cell_state')\n", - "\n", - "cell_state\n", + "\n", + "cell_state\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'internal')->('tumor_environment', 'agents', 'tcell_0', 'internal', 'cell_state')\n", - "\n", + "\n", "\n", "\n", "\n", "('tumor_environment', 'agents', 'tcell_0', 'internal')->('tumor_environment', 'agents', 'tcell_0', 't_cell')\n", - "\n", - "\n", - "internal\n", + "\n", + "\n", + "internal\n", "\n", + "\n", "\n", "\n", "('tumor_environment', 'dimensions')->('tumor_environment', 'agents', 'tcell_0', 'local_field')\n", - "\n", - "\n", - "dimensions\n", + "\n", + "\n", + "dimensions\n", "\n", "\n", "\n", "('tumor_environment', 'dimensions')->('tumor_environment', 'diffusion_field')\n", - "\n", - "\n", - "dimensions\n", + "\n", + "\n", + "dimensions\n", "\n", + "\n", "\n", "\n", "('tumor_environment', 'fields')->('tumor_environment', 'agents', 'tcell_0', 'local_field')\n", - "\n", - "\n", - "fields\n", + "\n", + "\n", + "fields\n", "\n", "\n", "\n", "('tumor_environment', 'fields')->('tumor_environment', 'diffusion_field')\n", - "\n", - "\n", - "fields\n", + "\n", + "\n", + "fields\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, - "execution_count": 55, + "execution_count": 69, "metadata": {}, "output_type": "execute_result" } @@ -1831,7 +1823,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 70, "id": "b3ac3d11-c31c-4ad7-9353-bb7092cfdc3c", "metadata": {}, "outputs": [], @@ -1843,7 +1835,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 71, "id": "b2bc6fd1-e992-409b-8a9d-ccb98254f296", "metadata": {}, "outputs": [ @@ -1910,10 +1902,10 @@ "\n" ], "text/plain": [ - "" + "" ] }, - "execution_count": 34, + "execution_count": 71, "metadata": {}, "output_type": "execute_result" } @@ -1928,7 +1920,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 72, "id": "f2909500-ef91-459f-9d29-56ceb3a44223", "metadata": {}, "outputs": [ @@ -2008,10 +2000,10 @@ "\n" ], "text/plain": [ - "" + "" ] }, - "execution_count": 35, + "execution_count": 72, "metadata": {}, "output_type": "execute_result" } @@ -2040,7 +2032,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 83, "id": "b759be45-60a0-47b6-8622-571e0af6f18f", "metadata": {}, "outputs": [ @@ -2053,106 +2045,99 @@ "\n", "\n", - "\n", - "\n", + "\n", + "\n", "bigraph\n", - "\n", + "\n", "\n", "\n", "('agents',)\n", - "\n", - "agents\n", + "\n", + "agents\n", "\n", "\n", "\n", "('agents', 't_cell')\n", - "\n", - "t_cell\n", + "\n", + "t_cell\n", "\n", "\n", "\n", "('agents',)->('agents', 't_cell')\n", - "\n", + "\n", "\n", - "\n", - "\n", - "('fields',)\n", - "\n", - "fields\n", - "\n", - "\n", "\n", - "\n", + "\n", "('agents', 't_cell', 'division')\n", - "\n", - "division\n", + "\n", + "division\n", "\n", "\n", - "\n", + "\n", "('agents',)->('agents', 't_cell', 'division')\n", - "\n", - "\n", - "agents\n", + "\n", + "\n", + "agents\n", "\n", "\n", - "\n", + "\n", "('agents', 't_cell', 'death')\n", - "\n", - "death\n", + "\n", + "death\n", "\n", "\n", - "\n", + "\n", "('agents',)->('agents', 't_cell', 'death')\n", - "\n", - "\n", - "agents\n", + "\n", + "\n", + "agents\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary')\n", - "\n", - "boundary\n", + "\n", + "boundary\n", "\n", "\n", "\n", "('agents', 't_cell')->('agents', 't_cell', 'boundary')\n", - "\n", + "\n", "\n", "\n", "\n", "('agents', 't_cell', 'neighbors')\n", - "\n", - "neighbors\n", + "\n", + "neighbors\n", "\n", "\n", "\n", "('agents', 't_cell')->('agents', 't_cell', 'neighbors')\n", - "\n", + "\n", "\n", "\n", "\n", "('agents', 't_cell', 'internal')\n", - "\n", - "internal\n", + "\n", + "internal\n", "\n", "\n", "\n", "('agents', 't_cell')->('agents', 't_cell', 'internal')\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "('agents', 't_cell', 't_cell')\n", - "\n", - "t_cell\n", + "\n", + "t_cell\n", "\n", "\n", "\n", - "\n", + "\n", "('agents', 't_cell', 'local_field')\n", - "\n", - "local_field\n", + "\n", + "local_field\n", "\n", "\n", "\n", @@ -2160,172 +2145,170 @@ "\n", "\n", "('agents', 't_cell', 'boundary', 'death')\n", - "\n", - "death\n", + "\n", + "death\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary')->('agents', 't_cell', 'boundary', 'death')\n", - "\n", + "\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary', 'location')\n", - "\n", - "location\n", + "\n", + "location\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary')->('agents', 't_cell', 'boundary', 'location')\n", - "\n", + "\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary', 'exchange')\n", - "\n", - "exchange\n", + "\n", + "exchange\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary')->('agents', 't_cell', 'boundary', 'exchange')\n", - "\n", + "\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary', 'mass')\n", - "\n", - "mass\n", + "\n", + "mass\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary')->('agents', 't_cell', 'boundary', 'mass')\n", - "\n", + "\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary', 'diameter')\n", - "\n", - "diameter\n", + "\n", + "diameter\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary')->('agents', 't_cell', 'boundary', 'diameter')\n", - "\n", + "\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary', 'velocity')\n", - "\n", - "velocity\n", + "\n", + "velocity\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary')->('agents', 't_cell', 'boundary', 'velocity')\n", - "\n", + "\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary')->('agents', 't_cell', 't_cell')\n", - "\n", - "\n", - "boundary\n", + "\n", + "\n", + "boundary\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary')->('agents', 't_cell', 't_cell')\n", - "\n", - "\n", - "globals\n", + "\n", + "\n", + "globals\n", "\n", "\n", - "\n", + "\n", "('agents', 't_cell', 'boundary')->('agents', 't_cell', 'division')\n", - "\n", - "\n", - "global\n", + "\n", + "\n", + "global\n", "\n", "\n", - "\n", + "\n", "('agents', 't_cell', 'boundary', 'death')->('agents', 't_cell', 'death')\n", - "\n", - "\n", - "trigger\n", + "\n", + "\n", + "trigger\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary', 'location')->('agents', 't_cell', 'local_field')\n", - "\n", - "\n", - "location\n", + "\n", + "\n", + "location\n", "\n", "\n", "\n", "('agents', 't_cell', 'boundary', 'exchange')->('agents', 't_cell', 'local_field')\n", - "\n", - "\n", - "exchanges\n", + "\n", + "\n", + "exchanges\n", "\n", "\n", "\n", "('agents', 't_cell', 'neighbors')->('agents', 't_cell', 't_cell')\n", - "\n", - "\n", - "neighbors\n", + "\n", + "\n", + "neighbors\n", "\n", "\n", "\n", "('agents', 't_cell', 'internal', 'cell_state')\n", - "\n", - "cell_state\n", + "\n", + "cell_state\n", "\n", "\n", "\n", "('agents', 't_cell', 'internal')->('agents', 't_cell', 'internal', 'cell_state')\n", - "\n", + "\n", "\n", "\n", "\n", "('agents', 't_cell', 'internal')->('agents', 't_cell', 't_cell')\n", - "\n", - "\n", - "internal\n", + "\n", + "\n", + "internal\n", "\n", - "\n", - "\n", - "('dimensions',)\n", - "\n", - "dimensions\n", - "\n", - "\n", - "\n", - "\n", - "('fields',)->('agents', 't_cell', 'local_field')\n", - "\n", - "\n", - "fields\n", + "\n", + "\n", + "\n", + "('agents', 't_cell', 'local_field', 'fields')->('agents', 't_cell', 'local_field')\n", + "\n", + "\n", + "fields\n", "\n", - "\n", - "\n", - "('dimensions',)->('agents', 't_cell', 'local_field')\n", - "\n", - "\n", - "dimensions\n", + "\n", + "\n", + "\n", + "('agents', 't_cell', 'local_field', 'dimensions')->('agents', 't_cell', 'local_field')\n", + "\n", + "\n", + "dimensions\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, - "execution_count": 36, + "execution_count": 83, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "node_groups = [[('agents',), ('fields',), ('dimensions',)]]\n", - "tcell0 = tumor_agents_spec['tcell_0']\n", + "node_groups = [[('agents',)]]\n", + "tcell0 = copy.deepcopy(tumor_agents_spec['tcell_0'])\n", + "tcell0['local_field']['_ports'] = {'fields': '', 'dimensions': '', 'location': '', 'exchanges': ''}\n", + "del tcell0['local_field']['wires']['fields']\n", + "del tcell0['local_field']['wires']['dimensions']\n", "\n", "internal_spec = {'cell_state': {}}\n", "boundary_spec = {'mass': {}, 'diameter': {}, 'velocity': {}}\n", @@ -2333,6 +2316,7 @@ "tcell0['internal'].update(internal_spec)\n", "\n", "nodec1 = {\n", + " ('agents',): c2,\n", " ('agents', 't_cell',): c3,\n", " ('agents', 't_cell', 'boundary',): c4,\n", " ('agents', 't_cell', 'internal',): c4,\n", @@ -2342,13 +2326,14 @@ " ('agents', 't_cell', 't_cell'): 'red',\n", "}\n", "\n", - "plot_bigraph({'agents': {'t_cell': tcell0}, 'fields': {}, 'dimensions': {}}, \n", + "plot_bigraph({'agents': {'t_cell': tcell0}}, \n", " node_groups=node_groups,\n", - " node_fill_colors={**nodec, **nodec1},\n", + " node_fill_colors={**nodec1},\n", " node_border_colors=node_border_colors,\n", " **plot_settings,\n", " filename='tcell_composite',\n", " remove_process_place_edges=True,\n", + " # **{'out_dir': 'out','dpi': '250'}\n", " )" ] },