Amphiphile-oil-water system
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This was an exercise for the course "Statistical Physics in Biological Systems", at the "Master in Physics of Complex Systems" ( https://ifisc.uib-csic.es/master/ ), offered by the "University of Balearic Islands", organized and taught by IFISC (Institute for Cross-Disciplinary Physics and Complex Systems) ( http://ifisc.uib-csic.es/ ), a joint UIB-CSIC research center in Palma de Mallorca, Spain. Aim of the exercise was the reproduction of a paper's part of work. The paper is "Monte Carlo simulation of model amphiphile-oil-water systems", by Larson et al. (1985). Depending on the relative abundance of the amphiphile-oil-water molecules, the system self-organizes into various structures. Details can be found in that paper, and others, e.g., subsequent papers by Larson.
HOW IT WORKS
The modeling method implements Monte Carlo simulation under the Metropolis scheme. Detailed description of the method can be found in Larson et al. (1985).
In brief, one of the following proposals are offered at each time step (tick):
- A water and a lipid molecule interchange positions
- An intermediate member of an amphiphilic chain interchanges position with a neighboring water or lipid molecule. Notice that while Larson et al. (1985) allow this chain twisting to occur and with a site pre-occupied by another amphiphile's unit (as long as no chain was broken), herein only interchanges with water or lipid molecules were allowed
- An amphiphilic chain reptates towards one of its ends. Herein only interchanges with water or lipid molecules were allowed, while Larson et al. (1985) allowed and amphiphile units, as long as no chain was broken
In temperatures close to zero, a proposal that results in increase of the system's energy is not accepted. As temperature increases, such proposals might be accepted with higher probability. Water molecules and hydrophilic members of amphiphiles are considered equivalent, and of the same kind, named "hydrophilic". In contrast, lipid molecules and hydrophobic members of amphiphiles are equivalent, and of the named "hydrophobic" kind. Thus, three combinations of pairwise interactions between neighboring sites are possible: hydrophilic-hydrophilic, hydrophobic-hydrophobic, and hydrophobic-hydrophilic. The interaction energies of the first two combinations are assumed equal and smaller than the interaction energy of the third combination (i.e., hydrophobic-hydrophobic). A site's neighborhood is the eight sites surrounding it. Periodic boundary conditions are at play.
Because many of the proposals are rejected, remember to have the speed of simulation at its highest, still being able to watch the changes in real time.
HOW TO USE IT
Experiment with different relative abundances of amphiphile-oil-water molecules, and various amphiphilic structures. If you manipulate the ratio of the three ingredients and the temperature appropriately, you will observe the formation of separated phases of oil and water, droplets of water in oil, droplets of oil into water, micelles, inverted micelles, bilayer membranes, inverted bilayer membranes, and amphiphiles acting as surfactants that solubilize oil phases in water. The control panel:
"hydrophiles": The number of hydrophilic units each amphiphile chain will have. "lipophiles": The number of hydrophobic units each amphiphile chain will have. "amphiphiles": The number of amphiphile chains in the mixture. "amphiphiles-fract": Computes and displays the fraction that amphiphiles occupy in the mixture. "lipids-fract": Input the fraction of the mixture that lipid molecules will occupy. "temperature": The temperature of the system. Start with maximum temperature, so that the system is mixed. Then, gradually cool the system down, so that structures may emerge spontaneously. "set up": Sets up the system, after the input of ingredients. "go": Starts the simulation.
RELATED MODELS
For an alternative modeling approach to the same system, check the model "Membrane Formation" in the NetLogo Models Library (Head and Wilensky, 2013). Instead of Monte Carlo simulation, the authors implement a method that resembles a Molecular Dynamics approach.
CREDITS AND REFERENCES
I would like to thank Dr. Tomàs Sintes, the tutor of "Statistical Physics in Biological Systems", for the creative and joyful atmosphere he cultured during the course, and for his advice and comments on the model.
References:
Head, B., and Wilensky, U. (2013). NetLogo Membrane Formation model. http://ccl.northwestern.edu/netlogo/models/MembraneFormation. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
Larson, R. G., Scriven, L. E., and Davis, H. T. (1985) Monte Carlo simulation of model amphiphile-oil-water systems. J. Chem. Phys. 83, 2411.
Comments and Questions
breed [amphicules amphicule] ; amphicule is here named a molecule/unit member of an amphiphilic chain ; "kind" specifies if the amphicule is either a lipophile (-1) or a hydrophile (+1). ; "leader" and "follower" gives the amphicule that precedes and follows in the chain. ; (arbitrarily, I assume the beginning of an amphiphile to be at its hydrophile end) amphicules-own [kind leader follower] ; the lipid molecules will be brown patches (with -1 as state, like the lipophiles) ; the water molecules are the blue patches (of +1 kind, like the hydrophiles). ; thus, the patch on where an amphicule sits must be of the same kind as itself patches-own [pkind] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to setup clear-all ask patches [ set pcolor blue + 2 set pkind 1 ] set-default-shape amphicules "circle" let lipids-number (max-pxcor + 1) * (max-pycor + 1) * lipids-fract ask patch 0 0 [ sprout-amphicules (lipophiles + hydrophiles) * amphiphiles ] ; the list of the patches which initially will host all amphicules, one on each patch if (lipophiles + hydrophiles) * amphiphiles > count patches [user-message (word "Amphiphiles are more than can fit in the world!")] let patch-list sublist (sort patches) 0 ((lipophiles + hydrophiles) * amphiphiles) ; initialization of the amphicules, mainly let i 0 ; for each of the amphiphiles while [i < amphiphiles] [ ; for each of the amphicules in each chain let j 0 while [j < lipophiles + hydrophiles] [ ask amphicule (j + (lipophiles + hydrophiles) * i) [ ;the first, a hydrophile (it is assumed that the minimum number of hydrophiles is 1) ifelse who = (lipophiles + hydrophiles) * i [ move-to item (j + (lipophiles + hydrophiles) * i) patch-list set kind 1 ask patch-here [set pkind 1] set leader nobody set follower amphicule (1 + (lipophiles + hydrophiles) * i) set color white set size 0.8 ] [ ; the last, a lipophile (it is assumed that the minimum number of lipophiles is 1) ifelse who = lipophiles + hydrophiles - 1 + (lipophiles + hydrophiles) * i [ move-to item (j + (lipophiles + hydrophiles) * i) patch-list set kind (- 1) ask patch-here [set pkind (- 1)] set color brown set leader amphicule (lipophiles + hydrophiles - 2 + (lipophiles + hydrophiles) * i) set follower nobody create-link-with leader [set thickness 0.2 set color black] ] [ ; for the intermediates move-to item (j + (lipophiles + hydrophiles) * i) patch-list ifelse j < hydrophiles [ set kind 1 ask patch-here [set pkind 1] set color white set size 0.8 ] [ set kind (- 1) ask patch-here [set pkind (- 1)] set color brown ] set leader amphicule (j - 1 + (lipophiles + hydrophiles) * i) set follower amphicule (j + 1 + (lipophiles + hydrophiles) * i) create-link-with leader [set thickness 0.2 set color black] ] ] ] set j (j + 1) ] set i (i + 1) ] ; initialization of the lipid, single sites if (lipids-number + count patches with [any? amphicules-here]) / count patches > 1 [user-message (word "Lipids are more than can fit in the world!")] ask n-of lipids-number patches with [not any? amphicules-here] [ set pcolor brown set pkind (- 1) ] reset-ticks end ; gives the fraction of the mixture that is occupied by amphiphile molecules to amphiphiles-fract clear-output output-print precision ((lipophiles + hydrophiles) * amphiphiles / (count patches)) 4 end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to go let option 0 let chosen1 nobody let neig-sum-1 0 let chosen2 nobody let Edif 0 let amphilist [] let plist [] let edge "back" let pchosen1 nobody let pchosen2 nobody let Eold 0 let Enew 0 let pchosen1kind 0 let pchosen2kind 0 let chosen1list [] let chosen2list [] let potentials [] ; !beware! !spaghetti code is following! ask one-of patches ; at each tick, a single proposal is made [ ;;;; First site selected is a lipid or water molecule ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; if not any? amphicules-here [ ; it chose a single site firstly set chosen1 self set neig-sum-1 sum [pkind] of neighbors ask one-of other patches [ ;;;; Second site selected is a lipid or water molecule ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ifelse not any? amphicules-here [ if pkind != [pkind] of chosen1 ; go on only if the second is of the other kind [ set chosen2 self set Edif 2 * (pkind * sum [pkind] of neighbors + [pkind] of chosen1 * neig-sum-1) if (Edif <= 0) or (temperature > 0 and (random-float 1.0 < exp ((- Edif) / temperature))) [ ; if the proposal is accepted, flip the states of the chosen two ask chosen1 [ set pkind (- pkind) ifelse pkind = 1 [set pcolor blue + 2][set pcolor brown] ] ask chosen2 [ set pkind (- pkind) ifelse pkind = 1 [set pcolor blue + 2][set pcolor brown] ] ] ] ] ;;;; Second site selected is amphicule ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [ set option 1 ] ] ] ;;;; First site selected is an amphicule, or the second site selected previously was an amphicule ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; In the latter case, disregard the first selection of a water or lipid molecule, and keep the second (the amphicule) as first ;;;;;;;;;;;;;; if (any? amphicules-here) or (option = 1) [ ask amphicules-here [ ;;;;; the first selected amphicule is either the hydrophilic or hydrophobic end of an amphiphilic chain ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;; in this case, chain reptation is proposed ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ifelse leader = nobody or follower = nobody [ set chosen1 self set pchosen1 patch-here set pchosen1kind [pkind] of pchosen1 if leader = nobody [set edge "front"] set amphilist (give-chain chosen1) set plist (give-patches amphilist) ; continue only if the amphicule has at least one water or lipid molecules as neighbors ; (reptation is allowed only with a water/lipid site: the chain reptates to the water/lipid site, ; and the water/lipid molecule is sent to the emptied site) ask pchosen1 [ set potentials neighbors with [not any? amphicules-here] set pchosen2 one-of potentials if pchosen2 = nobody [stop] ] if pchosen2 = nobody [stop] foreach plist [ask ? [set Eold Eold - pkind * sum [pkind] of neighbors]] ask pchosen2 [ set pchosen2kind pkind set Eold Eold - pkind * sum [pkind] of neighbors ] ; from here on, chain reptation is developed foreach amphilist [ask ? [hide-turtle]] ask chosen1 [move-to pchosen2] ifelse edge = "front" [ let i 1 while [i < lipophiles + hydrophiles] [ ask item i amphilist [move-to item (i - 1) plist] ask item (i - 1) plist [ set pkind [kind] of item i amphilist set pcolor blue + 2 ] set i (i + 1) ] ] [ let i 0 while [i < lipophiles + hydrophiles - 1] [ ask item i amphilist [move-to item (i + 1) plist] ask item (i + 1) plist [ set pkind [kind] of item i amphilist set pcolor blue + 2 ] set i (i + 1) ] ] ifelse edge = "front" [ ask last plist [ set pkind [pkind] of pchosen2 ifelse ([pkind] of pchosen2) = 1 [set pcolor blue + 2][set pcolor brown] ] ] [ ask first plist [ set pkind [pkind] of pchosen2 ifelse ([pkind] of pchosen2) = 1 [set pcolor blue + 2][set pcolor brown] ] ] ask pchosen2 [ set pkind [kind] of chosen1 set pcolor blue + 2 ] foreach plist [ask ? [set Enew Enew - pkind * sum [pkind] of neighbors]] ask pchosen2 [set Enew Enew - pkind * sum [pkind] of neighbors] set Edif Enew - Eold ; chain reptation plus calculation of energies are done... ; in the following cases, the proposal is rejected, and everything returns to its original position if (proper-chain? amphilist = "False") or ((Edif > 0) and (((temperature > 0) and (random-float 1.0 > exp ((- Edif) / temperature))) or (temperature <= 0))) [ (foreach amphilist plist [ ask ?1 [move-to ?2] ask ?2 [ set pkind [kind] of ?1 set pcolor blue + 2 ] ]) ask pchosen1 [ set pkind pchosen1kind set pcolor blue + 2 ] ask pchosen2 [ set pkind pchosen2kind ifelse pchosen2kind = 1 [set pcolor blue + 2][set pcolor brown] ] ] foreach amphilist [ask ? [show-turtle]] ] ;;;;; the first selected amphicule is an intermediate amphiphilic chain member ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;; in this case, chain twisting is proposed ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [ set chosen1 self set pchosen1 patch-here set pchosen1kind [pkind] of pchosen1 ask pchosen1 [ ; currently, only twisting with water/lipid molecules sites is allowed as proposals set potentials sort neighbors with [not any? amphicules-here] set potentials patch-set potentials set pchosen2 one-of potentials set Eold (- pkind * sum [pkind] of neighbors) if pchosen2 = nobody [stop] ] if pchosen2 = nobody [stop] ask pchosen2 [ set pchosen2kind pkind set Eold (Eold - pkind * sum [pkind] of neighbors) ] ; from here on, chain twisting is developed ask chosen1 [ hide-turtle move-to pchosen2 set chosen1list (give-chain chosen1) ] ask pchosen1 [ set pkind [pkind] of pchosen2 ifelse ([pkind] of pchosen2) = 1 [set pcolor blue + 2][set pcolor brown] ] ask pchosen2 [ set pkind [kind] of chosen1 set pcolor blue + 2 set Enew (- pkind * sum [pkind] of neighbors) ] ; chain twisting plus calculation of energies are done... ; in the following cases, the proposal is rejected, and everything returns to its original position if (proper-chain? chosen1list = "False") or ((Edif > 0) and (((temperature > 0) and (random-float 1.0 > exp ((- Edif) / temperature))) or (temperature <= 0))) [ ask chosen1 [ move-to pchosen1 ] ask pchosen1 [ set pkind pchosen1kind set pcolor blue + 2 ] ask pchosen2 [ set pkind pchosen2kind ifelse pchosen2kind = 1 [set pcolor blue + 2][set pcolor brown] ] ] ask chosen1 [show-turtle] ] ] ] ] tick end ;;; Three reporters are following ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; reports a list with all amphicules of a chain, from first to last, given an ; amphicule member of it to-report give-chain [amphicule] let previous [leader] of amphicule let current amphicule let chain [] while [previous != nobody] [ set current previous set previous [leader] of current ] set chain lput current chain let i 1 while [i < lipophiles + hydrophiles] [ set chain lput [follower] of last chain chain set i (i + 1) ] report chain end ; reports a list with all patches that a chain lies, from first to last, given the list ; of the amphicule chain members to-report give-patches [amphilist] let patch-list [] foreach amphilist [ask ? [set patch-list lput patch-here patch-list]] report patch-list end ; reports true or false depending on either the chain of the input, given as a ; list, has a proper configuration (each patch hosts one amphicule, and these ; patches are chain-like neighbors) to-report proper-chain? [amphiculelist] let proper? "True" foreach but-last amphiculelist [ask ? [if distance follower > 1.5 or distance follower < 0.1 [set proper? "False"]]] foreach amphiculelist [ask ? [if any? other amphicules-here [set proper? "False"]]] report proper? end
There is only one version of this model, created over 10 years ago by Danis Kiziridis.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Amphiphile-oil-water system.png | preview | Preview for 'Amphiphile-oil-water system' | over 10 years ago, by Danis Kiziridis | Download |
This model does not have any ancestors.
This model does not have any descendants.