Engineered E.coli for PQS and BDSF systems

Engineered E.coli for PQS and BDSF systems preview image

1 collaborator

Dundee_igem_2014 Dundee iGEM 2014 (Author)

Tags

biology 

Tagged by Dundee iGEM 2014 almost 6 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.1.0 • Viewed 298 times • Downloaded 23 times • Run 0 times
Download the 'Engineered E.coli for PQS and BDSF systems' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

;;; creation of populations ;;;
breed [signals signal]                           ;; PQS (green) signalling molecules for iGEM setup
breed [signal2s signal2]                         ;; PQS (green) signalling molecules for WT setup
breed [PQSRs PQSR]                               ;; PQSR receptors bound to the inside membrane
breed [PQSAs PQSA]                               ;; PQSA promoter 
breed [GFPs GFP]                                 ;; GFP produced when the promoter is dimerised by interaction with BCAM0228P or PQS_2.PQSR

breed [BDSFs BDSF]                               ;; BDSF signalling molecule
breed [ATPs ATP]                                 ;; ATP inside cytoplasm
breed [ADPs ADP]                                 ;; ADPs inside cytoplasm that are formed when ATP loses a phosphate
breed [BCAM0228s BCAM0228]                       ;; BCAM0228 inside cytoplasm
breed [BCAM0228Ps BCAM0228P]                     ;; phosphorylated BCAM0228
breed [Pcblds Pcbld]                             ;; Pcbld promoter


;;; setup of all variables ;;;
globals [  
  i                                              ;; counts x coords when colouring cell membrane
  j                                              ;; counts y coords when colouring cell membrane
  x                                              ;; counts x coords when colouring cytoplasm
  y                                              ;; counts y coords when colouring cytoplasm
  
  difference                                     ;; count of the difference between ATP and ADP 

  a                                              ;; controls number of PQSRs/BCAM0227s for the top and bottom membrane
  b                                              ;; controls number of PQSRs/BCAM0227s for the side membranes
  c                                              ;; controls number of PQSRs for the corners of the membrane
  sep                                            ;; controls distance between PQSRs/BCAM0227s on the top and bottom membrane
  sep2                                           ;; controls distance between PQSRs/BCAM0227s for the side membranes
  ja                                             ;; counts x coords for PQSR/BCAM0227 setup
  jap                                            ;; counts y coords for PQSR/BCAM0227 setup
  
  degraded-signal                                ;; count signals degraded
  degraded-GFP                                   ;; count GFPs degraded
  todie                                          ;; count signals to die each tick
]

;;; attributes associated with all the turtles ;;;
turtles-own [
  speed mass energy                              ;; controls the speed, mass and energy of the turtles for kinetics
  last-collision                                 ;; keeps note of when the previous collision has occured
  sticker                                        ;; boolean variable keeping track of whether a PQS is bound to PQSRPqsR  
  dimerised                                      ;; keeps note of whether PQSR has been dimerised by signalling molecules
  ready                                          ;; boolean variable keeping track of whether the promoter is interacting with the activated receptor
  bound-signal                                   ;; a counter for the number of signalling molecules bound to PQSR
  BDSF-bound                                     ;; boolean variable for whether BDSF is bound to BCAM0227
  transporter                                    ;; boolean variable for transporting the newly synthesized PQS out of the cell
  ATP-bound                                      ;; boolean variable for whether ATP is bound to BCAM0227 
  BCAM-bound                                     ;; boolean vairable for whether BCAM0228 is bound to BCAM027P 
  ]

to make-movie-WT-PQS
  user-message "First, save your new movie file (choose a name ending with .mov)"                     ;; prompt user for movie location
  let path user-new-file 
  if not is-string? path [ stop ]  ;; stop if user canceled
  setup-WT-PQS
  movie-start path
  movie-grab-view
  while [count signal2s with [color = sky] < 25 ]
    [ go
      movie-grab-view ]
  movie-close                                                                                          ;; export the movie
  user-message (word "Exported movie to " path)
end 

to make-movie-iGEM-PQS
  user-message "First, save your new movie file (choose a name ending with .mov)"                     ;; prompt user for movie location
  let path user-new-file 
  if not is-string? path [ stop ]  ;; stop if user canceled
  setup-iGEM-PQS
  movie-start path
  movie-grab-view
  while [ ticks <= 1000]
    [ go
      movie-grab-view ]
  movie-close                                                                                          ;; export the movie
  user-message (word "Exported movie to " path)
end 

to make-movie-iGEM-BDSF
  user-message "First, save your new movie file (choose a name ending with .mov)"                     ;; prompt user for movie location
  let path user-new-file 
  if not is-string? path [ stop ]  ;; stop if user canceled
  setup-iGEM-BDSF
  movie-start path
  movie-grab-view
  while [count GFPs >= 0 and count GFPs < 10 ]
    [ go
      movie-grab-view ]
  movie-close                                                                                          ;; export the movie
  user-message (word "Exported movie to " path)
end 


;;; creates a class called particles for calling-in GFPs, ADPs, BCAM0228s and BCAM0228Ps ;;;

to-report particles
  report (turtle-set GFPs ADPs BCAM0228s BCAM0228Ps)
end 

;;; setup the characteristics of PQS for the iGEM setup ;;;

to setup-signal
   set speed 10
   set mass 25000                                    
   set energy (0.5 * mass * (speed ^ 2))
   set last-collision nobody
   set size 4
   set shape "dot"
   set sticker false
   set bound-signal 0
end 

;;; setup the characteristics of PQS molecules for the WT setup ;;;

to setup-signal2
   set speed 10
   set mass 25000                                    
   set energy (0.5 * mass * (speed ^ 2))
   set last-collision nobody
   set size 4
   set shape "dot"
   set sticker false
   set bound-signal 0
   set transporter false
end 

;;; setup the characteristics for PQSA promoters ;;;

to setup-PQSA
   set speed 10
   set mass 25000                                    
   set energy (0.5 * mass * (speed ^ 2))
   set last-collision nobody
   set size 4
   set shape "circle 2"
   set color 78
   set ready false  
end 

;;; setup the characteristics for PQSR receptors ;;;

to setup-PQSR
  set color 103 
  set shape "square"
  set size 4
end 

;;; setup the characteristics for the GFP molecules ;;;

to setup-GFP
  set speed 5
  set mass 1000
  set energy (0.5 * mass * (speed ^ 2))
  set last-collision nobody
  set color red
  set size 5
  set shape "star"
end 

;;; setup the characteristics for the of BDSF molecules ;;;

to setup-BDSF
  set speed 5
  set mass 1500
  set energy (0.5 * mass * (speed ^ 2))
  set last-collision nobody
  set color gray
  set size 3
  set shape "dot"
  set BDSF-bound false
end 

;;; setup the characteristics for the of ATP molecules ;;;

to setup-ATP
   set speed 5
   set mass 100
   set energy (0.5 * mass * (speed ^ 2))
   set last-collision nobody
   set color 26
   set size 2
   set shape "dot"
   set ATP-bound false
end 

;;; setup the characteristics for the of ADP molecules ;;;

to setup-ADP
   set speed 5
   set mass 100
   set energy (0.5 * mass * (speed ^ 2))
   set last-collision nobody
   set color 22
   set size 2
   set shape "dot"
end 

;;; setup the characteristics for the of BCAM0228 molecules ;;;

to setup-BCAM0228
  set speed 5
  set mass 500
  set energy (0.5 * mass * (speed ^ 2))
  set last-collision nobody
  set color 106
  set size 3
  set shape "square"
  set BCAM-bound false
end 

;;; setup the characteristics for the of BCAM0228P molecules ;;;

to setup-BCAM0228P
  set speed 5
  set mass 500
  set energy (0.5 * mass * (speed ^ 2))
  set last-collision nobody
  set color red
  set size 3
  set shape "square"
end 

;;; setup the characteristics for Pcbld promoters ;;;

to setup-Pcbld
  set speed 5
  set mass 800
  set energy (0.5 * mass * (speed ^ 2))
  set last-collision nobody
  set color 78
  set size 3
  set shape "circle 2"
end 

;;;;; setup for iGEM PQS system ;;;;;

to setup-iGEM-PQS
  clear-all
  
;;; setup the initial values for the loops ;;;  
  set i 30
  set j 29
  set x 31
  set y 25
  set ja (-30) 
  set jap (-10)
  
;;; calls for the creation of the environment ;;;  
  background
  
;;; creation of the cell membrane ;;;
  top-right-corner
  set i -30
  set j 29
  top-left-corner
  set i -30
  set j -29
  bottom-left-corner
  set i 30
  set j -29
  bottom-right-corner
  
;;; colouring in the cytoplasm ;;;
  cytoplasm-top
  set x 31
  set y -25
  cytoplasm-bottom  
  

  
;;; creation of the other molecules, the number of each is controlled by a slider ;;;
;;; with random positions either outside the cell (randomize-extracellular) or within the cell (randomize-intracellular) ;;;
  create-signals initial-PQS
  [ setup-signal
    set color green
    randomize-extracellular]
  
  create-PQSAs initial-PQSA
  [ setup-PQSA
    randomize-intracellular]
  
  ;;; creation the PQSR receptors ;;;
  receptors
  
  reset-ticks
end 

;;;;; setup for WT PQS system ;;;;;

to setup-WT-PQS
  clear-all
  
;;; setup the initial values for the loops ;;;  
  set i 30
  set j 29
  set x 31
  set y 25
  set ja (-30) 
  set jap (-10)
  
;;; calls for the creation of the environment ;;;  
  background
  
;;; creation of the cell membrane ;;;
  top-right-corner
  set i -30
  set j 29
  top-left-corner
  set i -30
  set j -29
  bottom-left-corner
  set i 30
  set j -29
  bottom-right-corner
  
;;; colouring in the cytoplasm ;;;
  cytoplasm-top
  set x 31
  set y -25
  cytoplasm-bottom  
  
;;; creation the PQSR receptors ;;;
  receptors
  
;;; creation of the other molecules, the number of each is controlled by a slider ;;;
;;; with random positions either outside the cell (randomize-extracellular) or within the cell (randomize-intracellular) ;;;
  create-signal2s initial-PQS
  [ setup-signal
    set color green
    randomize-extracellular]
  
  create-PQSAs initial-PQSA
  [ setup-PQSA
    randomize-intracellular]
  
  reset-ticks
end 

;;;;; setup for iGEM BDSF system ;;;;;

to setup-iGEM-BDSF
  clear-all
  
;;; setup the initial values for the loops ;;;    
  set i 30
  set j 29
  set x 31
  set y 25

set ja -31
set jap -10
  
;;; calls for the creation of the environment ;;;   
  background
  
;;; creation of the cell membrane ;;;
  top-right-corner
  set i -30
  set j 29
  top-left-corner
  set i -30
  set j -29
  bottom-left-corner
  set i 30
  set j -29
  bottom-right-corner
  
;;; colouring in the cytoplasm ;;;
  cytoplasm-top
  set x 31
  set y -25
  cytoplasm-bottom  
  
BCAM0227
  
;;; creation of the other molecules, the number of each is controlled by a slider ;;;
;;; with random positions either outside the cell (randomize-extracellular) or within the cell (randomize-intracellular) ;;;  
  create-BDSFs initial-BDSF
  [ setup-BDSF
    randomize-extracellular]
  
  create-BCAM0228s initial-BCAM0228
  [ setup-BCAM0228
    randomize-intracellular]
  
  create-Pcblds initial-Pcbld
  [ setup-Pcbld
    randomize-intracellular]
  
  create-ATPs initial-ATP
  [ setup-ATP
    randomize-intracellular]
  
  reset-ticks
end 

;;; position randomizing procedure for extracellular particles (PQS,BDSF) ;;;

to randomize-extracellular
 setxy random-xcor random-ycor
  if (pcolor != 8) 
  [randomize-extracellular] 
end 

;;; position randomzing procedure for intracellular particles ;;;

to randomize-intracellular
 setxy random-xcor random-ycor
  if (pcolor != 78) 
  [randomize-intracellular] 
end 

;;;;; this procedure is what is run through (looping) during the operation of the simulation ;;;;;

to go
  if ticks > 1200 [stop]
  
  ;;; for all turtles except PQSRs check for collision and apply random motion ;;;
  ask turtles [
    if breed != PQSRs [
      check-for-collision
      rt random-float 360]]
  
  ;;; signalling molecules must only continue moving if they are not bound to PQSR ;;;
  ask signals [
    if sticker = false [
      stick
      bounce
      fd 1]] 
  
  ;;; signalling molecules must only continue moving if they are not bound to PQSR ;;;
  ask signal2s [
    if sticker = false [
      stick2
      bounce
      fd 1] 
    if transporter = true [
      transport]] 
  
  ;;; the promoters can flock towards to the receptors and bounce off the membrane ;;;
  ask PQSAs [
    flock
    bounce
    fd 1]
  
  ;;; BDSFs can only continue moving if they are not bound to BCAM0227 ;;;
  ask BDSFs [
    bounce
    if BDSF-bound = false [
      fd 1 ]]
  
  ;;; ATPs can only continue moving if they are not bound to BCAM0227 ;;;
  ask ATPs [
    bounce
    if ATP-bound = false [
      fd 1 ]]
  
  ;;; these promoters can bounce off the membrane or bind to BCAM0228Ps ;;;
  ask Pcblds [
    bounce
    bind
    fd 1]
  
  ;;; particles can bounce off the membrane ;;;
  ask particles [   
    bounce 
    fd 1]
  
  ;;; decay procedure
 degrade
  
  ;;; in order to keep the number of ATPs high, create more ;;;
  if count ADPs > (initial-ATP / 5) [                                ;; if the count of ADPs is greater than a fifth of the initial-ATP count
    set difference (count ADPs - (initial-ATP / 5))                  ;; set the global variable "difference" to the difference between the two values
    create-ATPs difference                                           ;; create "difference" number of ATPs
    [ setup-ATP                                                  
      randomize-intracellular]                                
    ask n-of difference ADPs [die]                                   ;; ask "difference" number of ADPs to die
    set difference 0]                                                ;; reset the global variable "difference" to 0
 
  ;;; the simulation continues forward one tick ;;; 
  tick
end 

;;; procedure to create the background of the simulation ;;;

to background
  ask patches with [pxcor >= -60 and pxcor <= 60][set pcolor 8]                                              ;; colour the extracellular region light grey 
  ask patches with [pycor > 25 and pycor < 30 and pxcor > -30 and pxcor < 30][set pcolor 74]                 ;; colour the top part of the membrane dark turquoise
  ask patches with [pycor > -30 and pycor < -25 and pxcor > -30 and pxcor < 30][set pcolor 74]               ;; colour the bottom part of the membrane dark turquoise
  ask patches with [pycor > -11 and pycor < 11 and pxcor > 47 and pxcor < 52][set pcolor 74]                 ;; colour the rhs part of the membrane dark turquoise
  ask patches with [pycor > -11 and pycor < 11 and pxcor > -52 and pxcor < -47][set pcolor 74]               ;; colour the lhs part of the membrane dark turquoise
end 

;;; procedures to create the curved corners of the cell membrane  

to top-right-corner                                                                                          ;; for the top right corner of the cell membrane
  ask patches with [pxcor = i and pycor = j][                                                                ;; set a global variable "i" for the xcoord and a "j" for the ycoor                                                                                                                                
    if i < 40 [                                                                                              ;; the curve has to be created in stages 
      ask patches with [pxcor >= i and pxcor < (i + 2) and pycor <= j and pycor > (j - 4)][set pcolor 74]    ;; for the first section we want the curve to be gentle with depth 4 patches
      set i (i + 2)                                                                                          ;; the general outline for this section is move along right 2 
      set j (j - 1)                                                                                          ;; and down 1
      top-right-corner]                                                                                      ;; repeat until section is complete
    if i >= 40 and i < 48 [                                                                                  ;; the next section is slightly steeper 
      ask patches with [pxcor = i and pycor <= j and pycor > (j - 5)][set pcolor 74]                         ;; this section has depth 5 to compensate for the inside edge being smaller than the other
      set i (i + 1)                                                                                          ;; general outline here being move along right 1
      set j (j - 1)                                                                                          ;; and down 1
      top-right-corner]                                                                                      ;; repeat until section is complete
    if i = 48 [                                                                                              ;; the final section is a little different and so is written in 3 parts 
      ask patches with [pxcor = i and pycor <= j and pycor > (j - 6)][set pcolor 74]                         ;; each part has to stop inline with the right side membrane
      set i (i + 1)                                                                                          ;; so the 3 parts follow the outline move along 1 right
      set j (j - 2)                                                                                          ;; and move down 2
      top-right-corner]                                                                                      ;; but each part has a depth 2 shorter than the previous 
    if i = 49 [                                                                                              ;; so at i = 48, the depth is 6 so membrane is betweeen j and (j - 6)
      ask patches with [pxcor = i and pycor <= j and pycor > (j - 4)][set pcolor 74]                         ;; at i = 49, the depth is 4 so membrane is between j and (j - 4) 
      set i (i + 1)                                                                                          ;; and finally at i = 50, the depth is 2 so membrane is between j and (j - 2)
      set j (j - 2)                          
      top-right-corner]
    if i = 50 [
      ask patches with [pxcor = i and pycor <= j  and pycor > (j - 2)][set pcolor 74]]
    ask patches with [pxcor = 47 and (pycor = 11 or pycor = 12)][set pcolor 74]                              ;; these last 3 patch commands are to make the curve look smoother
    ask patches with [pxcor = 46 and pycor = 13][set pcolor 74]
    ask patches with [pxcor = 39 and pycor = 21][set pcolor 74]]
end 

to top-left-corner                                                                                           ;; for the top left corner of the cell membrane
  ask patches with [pxcor = i and pycor = j][                                                                ;; procedure follows the same protocol as top-right-corner                                                                        
  if i > -40 [                                                                                               ;; just with different coordinates
    ask patches with [pxcor <= i and pxcor > (i - 2) and pycor <= j and pycor > (j - 4)][set pcolor 74]
    set i (i - 2)
    set j (j - 1)
    top-left-corner]
  if i <= -40 and i > -48 [
    ask patches with [pxcor = i and pycor <= j and pycor > (j - 5)][set pcolor 74]
    set i (i - 1)
    set j (j - 1)
    top-left-corner]
  if i = -48 [
    ask patches with [pxcor = i and pycor <= j and pycor > (j - 6)][set pcolor 74]
    set i (i - 1)
    set j (j - 2)
    top-left-corner]
  if i = -49 [
    ask patches with [pxcor = i and pycor <= j and pycor > (j - 4)][set pcolor 74]
    set i (i - 1)
    set j (j - 2)
    top-left-corner]
  if i = -50 [
    ask patches with [pxcor = i  and pycor <= j and pycor > (j - 2)][set pcolor 74]
    set i (i - 1)
    set j (j - 2)
    top-left-corner]
  ask patches with [pxcor = -47 and (pycor = 11 or pycor = 12)][set pcolor 74]
  ask patches with [pxcor = -46 and pycor = 13][set pcolor 74]
  ask patches with [pxcor = -39 and pycor = 21][set pcolor 74]]
end 

to bottom-left-corner                                                                                        ;; for the bottom left corner of the cell membrane
  ask patches with [pxcor = i and pycor = j][                                                                ;; procedure follows the same protocol as top-right-corner  
  if i > -40 [                                                                                               ;; just with different coordinates
    ask patches with [pxcor <= i and pxcor > (i - 2) and pycor >= j and pycor < (j + 4)][set pcolor 74]
    set i (i - 2)
    set j (j + 1)
    bottom-left-corner]
  if i <= -40 and i > -48 [
    ask patches with [pxcor = i and pycor >= j and pycor < (j + 5)][set pcolor 74]
    set i (i - 1)
    set j (j + 1)
    bottom-left-corner]
  if i = -48 [
    ask patches with [pxcor = i and pycor >= j and pycor < (j + 6)][set pcolor 74]
    set i (i - 1)
    set j (j + 2)
    bottom-left-corner]
  if i = -49 [
    ask patches with [pxcor = i and pycor >= j and pycor < (j + 4)][set pcolor 74]
    set i (i - 1)
    set j (j + 2)
    bottom-left-corner]
  if i = -50 [
    ask patches with [pxcor = i and pycor >= j and pycor < (j + 2)][set pcolor 74]
    set i (i - 1)
    set j (j + 2)
    bottom-left-corner]
  ask patches with [pxcor = -47 and (pycor = -11 or pycor = -12)][set pcolor 74]
  ask patches with [pxcor = -46 and pycor = -13][set pcolor 74]
  ask patches with [pxcor = -39 and pycor = -21][set pcolor 74]]
end 

to bottom-right-corner                                                                                       ;; for the bottom left corner of the cell membrane
  ask patches with [pxcor = i and pycor = j][                                                                ;; procedure follows the same protocol as top-right-corner
    if i < 40 [                                                                                              ;; just with different coordinates
      ask patches with [pxcor >= i and pxcor < (i + 2) and pycor >= j and pycor < (j + 4)][set pcolor 74]
      set i (i + 2)
      set j (j + 1)
      bottom-right-corner]
    if i >= 40 and i < 48 [
      ask patches with [pxcor = i and pycor >= j and pycor < (j + 5)][set pcolor 74]
      set i (i + 1)
      set j (j + 1)
      bottom-right-corner]
    if i = 48 [
      ask patches with [pxcor = i and pycor >= j and pycor < (j + 6)][set pcolor 74]
      set i (i + 1)
      set j (j + 2)
      bottom-right-corner]
    if i = 49 [
      ask patches with [pxcor = i and pycor >= j and pycor < (j + 4)][set pcolor 74]
      set i (i + 1)
      set j (j + 2)
      bottom-right-corner]
    if i = 50 [
      ask patches with [pxcor = i and pycor >= j and pycor < (j + 2)][set pcolor 74]
      set i (i + 1)
      set j (j + 2)
      bottom-right-corner]
    ask patches with [pxcor = 47 and (pycor = -11 or pycor = -12)][set pcolor 74]
    ask patches with [pxcor = 46 and pycor = -13][set pcolor 74]
    ask patches with [pxcor = 39 and pycor = -21][set pcolor 74]] 
end 

;; commands to color the cytoplasm
;; due to the curved corners of the cell membrane the cytoplasm has to be "colored" pretty much line by line based on coordinates 

to cytoplasm-top                                                                                           ;; for the top half of the cytoplasm
if y > 22 and y <= 25 [                                                                                    ;; the global variables are "x" for the xcoord and "y" for the ycoord
 ask patches with [pxcor >= (- x) and pxcor <= x and pycor = y][set pcolor 78]                             ;; since the cell has vertical symmetry the area to be coloured is between x and -x 
   set x (x + 2)                                                                                           ;; the first part follows the gentle curve of the cell membrane and so the general outline for this section
   set y (y - 1)                                                                                           ;; move down 1 ycoord and add 2 xcoord
   cytoplasm-top]                                                                                          ;; repeat until section is complete
if y > 14 and y <= 22 [                                                                                    ;; the next section has 2 colours
  ask patches with [pxcor >= (- x) and pxcor <= (x) and pycor = y][set pcolor 78]                          ;; 77.9 is the region closest to the membrane of width 5 patches and 78 (marginally lighter) is the centre cytoplasm region                  ;; this colour difference is to contain the signalling molecules in the region closest to the membrane ( 77.9 colour)
   set x (x + 1)                                                                                           ;; the general outline for this section is down 1 and add 1 x since th curve is steeper
   set y (y - 1)
   cytoplasm-top]                                                                                          ;; repeat until section is complete 
if y > 10 and y <= 14 [                                                                                    ;; the curve of the next section is steeper still and so this section follows the outline down 2 and add 1 x
  ask patches with [pxcor >= (- x) and pxcor <= (x) and (pycor = y or pycor = (y - 1))][set pcolor 78]
   set x (x + 1)
   set y (y - 2)
   cytoplasm-top]    
if y >= 0 and y <= 10 [                                                                                    ;; in the final section the membrane is no longer curved
  ask patches with [                                                                                       ;; and so the general outline is just down 1 ycoord
    pxcor >= (- x) and pxcor <= x and pycor = y][set pcolor 78]
  set y ( y - 1)
  cytoplasm-top]                                                                                          
ask patches with [pycor > -11 and pycor < 11 and pxcor > 44 and pxcor <= 47][set pcolor 78]              ;; as before the region closest to the membrane as to be slightly darker than the main cytomplasmic region
ask patches with [pycor > -11 and pycor < 11 and pxcor >= -47 and pxcor < -44][set pcolor 78]
end   

to cytoplasm-bottom                                                                                        ;; the bottom half of the cytoplasm is coloured in the same way as the top half
if y < -22 and y >= -25 [                                                                                  ;; but starts at the very bottom of the cell
  ask patches with [                                                                                       ;; and so the procedure runs through increading ycoords instead of decreasing ycoords!
 pxcor >= (- x) and pxcor <= x and pycor = y][set pcolor 78]
   set x (x + 2)
   set y (y + 1)
   cytoplasm-bottom] 
if y < -14 and y >= -22 [
  ask patches with [pxcor >= (- x) and pxcor <= (x) and pycor = y][set pcolor 78]
   set x (x + 1)
   set y (y + 1)
   cytoplasm-bottom] 
if y < -10 and y >= -14 [
  ask patches with [pxcor >= (- x) and pxcor <= (x) and (pycor = y or pycor = (y + 1))][set pcolor 78]
   set x (x + 1)
   set y (y + 2)
   cytoplasm-bottom] 
if y < 0 and y >= -10 [ 
  ask patches with [
    pxcor >= (- x) and pxcor <= x and pycor = y][set pcolor 78]
  set y ( y + 1)
  cytoplasm-bottom]
ask patches with [pycor > -11 and pycor < 11 and pxcor > 44 and pxcor <= 47][set pcolor 78]
ask patches with [pycor > -11 and pycor < 11 and pxcor >= -47 and pxcor < -44][set pcolor  78]
end   

;;; procedure for the PQSR receptors in the PQS system ;;; 
;;; the receptors sit on the inside part of the membrane ;;;
;;; we need a procedure which spreads the receptors equally around the cell ;;;
;;; in an actual cell the receptors can move but for the purpose of this animation they have a fixed location ;;;

to receptors                  ;; a slider specifies the initial number of PQSR receptors.  This number is a multiple of 4 between 4 and 52
  set a ((initial-PQSR / 4))  ;; The initial number of PQSR has to split between the top/bottom, sides and corners of the membrane
  set b (initial-PQSR / 8)    ;; in general the top/bottom get 1/4 of initial-PQSR each; the sides get 1/8th each; and corners 1/16th each
                
  if initial-PQSR != 4 and initial-PQSR != 8 [    ;; if the initial-PQSR is 4 or 8 the positioning is slightly different                       
    
    ;;;  for the top/bottom of the membrane ;;; 
    set sep (floor(60 /( a * 2)))               
    if ja <= (30 - sep) [                              
      ask patches with [(pycor = 25  and pxcor = (ja + sep)) or (pycor = -25  and pxcor = (ja + sep)) ]                       
        [ sprout-PQSRs 1 [setup-PQSR]]
      set ja (ja + (2 * sep) )
      receptors]
   
   ;;; for the sides of the membrane ;;; 
    set sep2 (ceiling (20 /( b * 2)))
    if jap <= (10 - sep2) [                              
      ask patches with [(pycor = (jap + sep2)  and pxcor = 47) or (pycor = (jap + sep2)  and pxcor = -47) ]    
        [ sprout-PQSRs 1 [setup-PQSR]]
      set jap (jap + (2 * sep2))
      receptors]]
  
  ;;; if the number of PQSRs on the top/bottom and the sides is less than initial-PQSRs we make up the numbers on the corners 
  if count PQSRs < initial-PQSR [
    set c (initial-PQSR - (count PQSRs))
    if  c != 8 [
      ask patches with [pxcor = 40 and pycor = 19][ sprout-PQSRs 1 [setup-PQSR]]
      ask patches with [pxcor = -40 and pycor = -19][ sprout-PQSRs 1 [setup-PQSR]]]
    if c = 4 or c = 12[   
      ask patches with [pxcor = -40 and pycor = 19][ sprout-PQSRs 1 [setup-PQSR]]
      ask patches with [pxcor = 40 and pycor = -19][ sprout-PQSRs 1 [setup-PQSR]]]
    
    if c >= 6[
      ask patches with [pxcor = -36 and pycor = 23][ sprout-PQSRs 1 [setup-PQSR]]
      ask patches with [pxcor = -44 and pycor = 15][ sprout-PQSRs 1 [setup-PQSR]]
      ask patches with [pxcor = 36 and pycor = -23][ sprout-PQSRs 1 [setup-PQSR]]
      ask patches with [pxcor = 44 and pycor = -15][ sprout-PQSRs 1 [setup-PQSR]]]
    
    if c >= 8[
      ask patches with [pxcor = -36 and pycor = -23][ sprout-PQSRs 1 [setup-PQSR]]
      ask patches with [pxcor = -44 and pycor = -15][ sprout-PQSRs 1 [setup-PQSR]]
      ask patches with [pxcor = 36 and pycor = 23][ sprout-PQSRs 1 [setup-PQSR]]
      ask patches with [pxcor = 44 and pycor = 15][ sprout-PQSRs 1 [setup-PQSR]]]
  ]
end 

to BCAM0227                       ;; a slider specifies the initial number of BCAM0227.  This number is a multiple of 6 between 6 and 30
  set a ((initial-BCAM0227 / 3))  ;; The initial number of BCAM0227 has to split between the top/bottom and sides of the membrane
  set b (initial-BCAM0227 / 6)    ;; in general the top/bottom get 1/3rd of initial-BCAM0227 each and the sides get 1/6th each
  
  ;;;  for the top/bottom of the membrane ;;; 
  set sep (ceiling(60 / (a * 2)))             
  if ja <= (31 - sep) [                              
    ask patches with [(pxcor = (ja + sep) and (pycor > 23 and pycor < 32)) or (pxcor = (ja + sep) and (pycor < -23 and pycor > -32)) ]                       
      [ set pcolor 125]
    set ja (ja + (2 * sep))
    BCAM0227]
  
  ;;; for the sides of the membrane ;;; 
  set sep2 (round (20 /( b * 2 )))
  ifelse initial-BCAM0227 != 18 [
    if jap <= (11 - sep2) [                              
      ask patches with [(pycor = (jap + sep2) and (pxcor > 45 and pxcor < 54)) or (pycor = (jap + sep2)  and (pxcor < -45 and pxcor > -54)) ]    
        [ set pcolor 125]
      set jap (jap + (2 * sep2))
      BCAM0227]]
  [ if jap <= (10 - sep2) [                              
    ask patches with [(pycor = (jap + sep2) and (pxcor > 45 and pxcor < 54)) or (pycor = (jap + sep2)  and (pxcor < -45 and pxcor > -54)) ]    
      [ set pcolor 125]
    set jap (jap + (2 * sep2))
    BCAM0227]]
end 
    
;;; procedure for interaction of particles and cell structures ;;;

to bounce 
  ;; signalling molecules can diffuse through the membrane or bounce off it ;;
  if breed = signals or breed = signal2s[
    if random 100 >= diffuseprob [  
      if [pcolor] of patch-at dx 0 = 74 [set heading (- heading)]
      if [pcolor] of patch-at 0 dy = 74 [set heading (180 - heading)]]]
  
  ;; when a BDSF molecule interacts with a BCAM0227 it stays bound. The BCAM0227 will change colour from 125 (magenta) to 82 (dark cyan) ;;
  ;; once the BCAM0227 has transferred its phosphate to BCAM0228 the BDSF dissociates ;; 
  if breed = BDSFs [
    if [pcolor] of patch-here = 125 [set BDSF-bound true activation]
    if [pcolor] of patch-here = 124 [set BDSF-bound false deactivate]]
  
  ;; when an ATP molecule interacts with a BDSF.BCAM0227 it phosphorylates the BCAM0277. The BCAM0227 will change colour from 82 (dark cyan) to red ;;
  if breed = ATPs [
    if [pcolor] of patch-here = 82 [set ATP-bound true autophosphorylation]]
  
  ;; when BCAM0228 interacts with a phosphorylated BCAM0227 the phosphate is transferred from BCAM0227 to BCAM0228. BCAM0228 changes from blue to red and BCAM0227 from red to 124 (dark magenta)
  if breed = BCAM0228s [
    if [pcolor] of patch-here = red [set BCAM-bound true steal]]
 
  ;; all turtles except ATP can bounce off BDSF.BCAM0227 complex (82 - dark cyan) ;; 
  if breed != ATPs [
    if [pcolor] of patch-at dx 0 = 82 [set heading (- heading)]
    if [pcolor] of patch-at 0 dy = 82 [set heading (180 - heading)]]
  
  ;; all turtles except BCAM0228 can bounce off a phosphorylated BCAM0227 (red) ;;
  if breed != BCAM0228s [
    if [pcolor] of patch-at dx 0 = red [set heading (- heading)]
    if [pcolor] of patch-at 0 dy = red [set heading (180 - heading)]]
  
  ;; all turtles except BDSF bounce off BCAM0227 (pcolor 125) and unphosphorylate BCAM0227 (pcolor 124) ;;
  if breed != BDSFs [
    if [pcolor] of patch-at dx 0 = 124 [set heading (- heading)]
    if [pcolor] of patch-at 0 dy = 124 [set heading (180 - heading)]
    
    if [pcolor] of patch-at dx 0 = 125 [set heading (- heading)]
    if [pcolor] of patch-at 0 dy = 125 [set heading (180 - heading)]]
  
  ;; all turtles except PQS (since they have special instructions) bounce off the membrane ;;
  if breed != signals and breed != signal2s [
    if [pcolor] of patch-at dx 0 = 74 [set heading (- heading)]
    if [pcolor] of patch-at 0 dy = 74 [set heading (180 - heading)]]
end 

;;; procedure for binding 2 signalling molecules to PQSR in iGem setup ;;;

to stick
  let receptor one-of other PQSRs-here
  if receptor != nobody [
    ask receptor [
      if bound-signal < signal-required [
        if random 100 <= (bindprob) [                  
          ask signals-here [
            set sticker true ]
          set bound-signal (bound-signal + 1 )]
      ]]]
end 

;;; procedure for binding 2 signalling molecules to PQSR in wt setup ;;;

to stick2 
  let receptor one-of other PQSRs-here
  if receptor != nobody [
    ask receptor [
      if bound-signal < signal-required [
        if random 100 <= (bindprob) [
          ask signal2s-here [
            set sticker true ]
          set bound-signal (bound-signal + 1 )] 
      ]]]
end 

;;; procedure for the promoter to be attracted to the PQSR which has been dimerisized by PQS ;;;

to flock
  set dimerised one-of PQSRs with [bound-signal = 2] 
  if dimerised != nobody [
    ask dimerised [
      let candidate min-one-of PQSAs [distance myself]
      ask candidate [ 
        face myself  
        set ready true
        transcribe
      ]]]
end 

;;; procedure from promoter and activated PQSR interaction ;;;

to transcribe 
  ;; in iGem setup GFP is produced ;;
  if count PQSAs-here = 1 and ready = true and count PQSRs-here = 1 and count signals in-radius 2 = 2 [
    ask signals in-radius 2 [
      move-to one-of patches with[ pcolor = 8]
      set sticker false
      set bound-signal 0 ]
    hatch-GFPs 1 [                           
      setup-GFP]
    ask PQSRs-here [
      set bound-signal 0] 
    ask PQSAs-here [
      set ready false]] 
  
  ;; in wt setup PQS is produced. However it is coloured sky blue to differentiate between initial PQS and new PQS ;;
  if count PQSAs-here = 1 and ready = true and count PQSRs-here = 1 and count signal2s in-radius 2 = 2 [
    ask signal2s in-radius 2 [
      move-to one-of patches with[ pcolor = 8]
      set sticker false
      set bound-signal 0 ] 
    hatch-signal2s 1 [
      setup-signal2
      set color sky
      set transporter true]
    ask PQSRs-here [
      set bound-signal 0]
    ask PQSAs-here [
      set ready false]] 
end 

;;; procedure for movement of new PQS out of the cell ;;;
;;; the new PQS can't bind to PQSR until it has moved out of the cell and back in again ;;;

to transport
  ifelse random 100 <= diffuseprob [  
    face one-of patches with [pcolor = 8]
    if [pcolor] of patch-here = 8 [ set transporter false
      set sticker false
      set bound-signal 0]]
  [if [pcolor] of patch-at dx 0 = 74 [set heading (- heading)]
    if [pcolor] of patch-at 0 dy = 74 [set heading (180 - heading)]]
  fd 1
end 

;;; procedure to allow BDSF to attach to BCAM0227 and change the colour of BCAM0227 to dark grey ;;;

to activation
  ask patches in-radius 1 with [pcolor = 125] [
    set pcolor 82]
  repeat (1.5 * 12) [
    ask patches with [pcolor = 82] [
      ask patches in-radius 1 with [pcolor = 125] [
        set pcolor 82]]]
end 

;;; procedure for ATP to transfer a phosphate to the complex BDSF.BCAM0227 and change the breed to ADP and change the colour of BDSF.BCAM0227 to red ;;;

to autophosphorylation
  if ATP-bound = true [
    set breed ADPs
    setup-ADP 
    
    ask patches in-radius 1 with [pcolor = 82] [
      set pcolor red]
    repeat (1.5 * 12) [
      ask patches with [pcolor = red] [
        ask patches in-radius 1 with [pcolor = 82] [
          set pcolor red]]]
    set ATP-bound false]
end 


;;; procedure for BCAM0228 to "steal" phosphate from the complex BDSF.BCAM0227 and change breed to BCAM0228P and BDSF.BCAM0227 color to dark magenta (124) ;;;

to steal
  if BCAM-bound = true [
    set breed BCAM0228Ps
    face one-of patches with [pcolor = 78]
    setup-BCAM0228P
    
    ask patches in-radius 1 with [pcolor = red] [
      set pcolor 124]
    repeat (1.5 * 12) [
      ask patches with [pcolor = 124] [
        ask patches in-radius 1 with [pcolor = red] [
          set pcolor 124]]]]
end 

;;; procedure to change BCAM0227 back into a state where BDSF can join to it - BDSF detaches from BCAM0227 changing BCAM0227 colour to magenta (125) ;;;

to deactivate
  ask patches in-radius 1 with [pcolor = 124] [
    set pcolor 125]
  repeat (1.5 * 12) [
    ask patches with [pcolor = 125] [
      ask patches in-radius 1 with [pcolor = 124] [
        set pcolor 125]]]
  set BDSF-bound false
  move-to one-of patches with[ pcolor = 8]
end 

;;; procedure to synthesize GFP when BCAM0228P interacts with Pcbld ;;;

to bind                                                                    
  ask BCAM0228Ps-here [
    hatch-GFPs 1
    [setup-GFP
      set color green]
    set breed BCAM0228s 
    setup-BCAM0228
    move-to one-of patches with [pcolor = 78]
    set BCAM-bound false]
end 

to degrade
  if ticks mod decay-frequency = 0 [
    if count signals > 0 [
      set todie ((count signals / 100 ) * degprob)
      ask n-of todie signals[die]
      set degraded-signal (degraded-signal + todie)]
    
    if count signal2s > 0 [
      set todie ((count signal2s / 100 ) * degprob)
      ask n-of todie signal2s[die]
      set degraded-signal (degraded-signal + todie)]
    
    if count BDSFs > 0 [
      set todie ((count BDSFs / 100 ) * degprob)
      ask n-of todie BDSFs[die]
      set degraded-signal (degraded-signal + todie)]
    
    set todie ((count GFPs / 100) * degprob)
    ask n-of todie GFPs[die]
    set degraded-GFP (degraded-GFP + todie)
    set todie 0
  ]
end 


;;; procedure detecting collisions between particles in the environment ;;;

to check-for-collision 
  if count other turtles-here = 1 [                                          ;; if two turtles occupy the same current space    
    let candidate one-of other turtles-here with                             ;; choose one as a candidate
      [who < [who] of myself and myself != last-collision]                   ;; who was not the last candidate for collision
    if (candidate != nobody) and (speed > 0 or [speed] of candidate > 0)[    ;; if there is a candidate who is not stationary
      collide-with candidate                                                 ;; run the collide-with procedure with the candidate
      set last-collision candidate                                           ;; having taken part in a collision, set the asking turtle's last collision
      ask candidate [ set last-collision myself ]                            ;; and the candidate turtle's last collision
    ]
  ]
end 

;;; a procedure controlling the physics of collisions between particles which are colliding ;;;
;;; the equations below take into account the masses, speeds and heading of the colliding particles and carries out momentum conservation calculations ;;;

to collide-with [ other-particle ] 
  let mass2 [mass] of other-particle
  let speed2 [speed] of other-particle
  let heading2 [heading] of other-particle
  let theta (random-float 360)
  let v1t (speed * cos (theta - heading))
  let v1l (speed * sin (theta - heading))
  let v2t (speed2 * cos (theta - heading2))
  let v2l (speed2 * sin (theta - heading2))
  let vcm (((mass * v1t) + (mass2 * v2t)) / (mass + mass2) )
  set v1t (2 * vcm - v1t)
  set v2t (2 * vcm - v2t)
  set speed sqrt ((v1t ^ 2) + (v1l ^ 2))
  set energy (0.5 * mass * speed ^ 2)
  if v1l != 0 or v1t != 0
    [ set heading (theta - (atan v1l v1t)) ]
  ask other-particle [
    set speed sqrt ((v2t ^ 2) + (v2l ^ 2))
    set energy (0.5 * mass * (speed ^ 2))
    if v2l != 0 or v2t != 0
      [ set heading (theta - (atan v2l v2t)) ]
  ]
end 

There are 2 versions of this model.

Uploaded by When Description Download
Dundee iGEM 2014 almost 6 years ago Included background information Download this version
Dundee iGEM 2014 almost 6 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Engineered E.coli for PQS and BDSF systems.png preview Preview for 'Engineered E.coli for PQS and BDSF systems' almost 6 years ago, by Dundee iGEM 2014 Download

This model does not have any ancestors.

This model does not have any descendants.