NetLogo Models Library:
This model simulates the motion of a simple polymer. Polymers are simply long chains of identical, smaller molecules called monomers, which often have some mobility, causing many polymers to be flexible. Many common materials and chemical substances are polymers, for example plastics and proteins.
The polymer is modeled using a cellular automaton approach involving only local interactions.
Initially the monomers are colored alternating orange and blue. Blue monomers interact only with their two neighboring orange monomers, and vice versa.
Movement occurs in two alternating phases, one for the orange monomers, one for the blue. For each monomer (of the appropriate color) a random direction to move in is chosen. Before making the actual move we check if the move would cause the chain to either break or cross itself. If not, the monomer moves one step in that direction.
To check if a move will break the chain, we see if the moving monomer will leave a blank patch behind it. To check if it will cross the chain, we see if the movement will cause the monomer to be next to another piece of the chain in front of it.
SETUP: initializes the simulation
GO: starts the simulation
GO ONCE: advances the simulation one step only
One interesting thing to notice is that, despite all the interactions being local, the polymer has a very realistic macroscopic movement.
Try a much longer polymer. This is done by making the world size bigger. (You'll probably want to reduce the patch size.)
Slow down the simulation, and observe the local interaction closely.
Activate the 3D view, and try to follow a turtle.
Measure the distance between the two ends of the polymer and plot how it changes over time.
Are other movement rules possible, without causing the chain to break or cross?
Try having different mobility for different kinds of monomers.
Make a preferential direction for movement, determined by a slider.
Allow monomers to break apart from the polymer, in some particular situations. Why might this happen?
In order for the model to operate correctly on a torus, the dimensions of the world must be even, so we put the world origin in the corner.
CA 1D Elementary - an introduction to cellular automata Life Turtle-Based - a cellular automaton implemented, like this one, using turtles Radical Polymerization - another model about polymers
For a detailed treatment of this model, see Yaneer Bar-Yam, Dynamics of Complex Systems (2003), pages 496-502. Westview Press, Boulder, CO. The book is available online at https://necsi.edu/dynamics-of-complex-systems.
See also Y. Bar-Yam, Y. Rabin, M. A. Smith, Macromolecules Rep. 25 (1992) 2985.
If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.
For the model itself:
Please cite the NetLogo software as:
Copyright 2005 Uri Wilensky.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at email@example.com.