AIMS

Explore Micelle Formation with Coarse-Grained Molecular Simulations

The soap you use every day: model its molecules as beads, and investigate with an AI agent.

← Back to AIMS

Soap cleans because its molecules gather into balls called micelles, which hold grease inside them. A micelle holds dozens of soap molecules with tens of atoms each, more than a web browser can simulate one atom at a time for the hundreds of picoseconds a micelle needs to assemble even in a small simulation. AIMS models each soap molecule as four beads instead, and an AI agent sets up the experiments. A student asks a plain-language question, and the agent runs the molecules, counts the clusters they form, measures the shape of each cluster, or heats the box until the clusters break apart, and posts the measured data in the chat as a live chart. In the window below, sixty soap molecules start scattered at random at 300 K. Press Play and watch their tails gather.

View fullscreen
Sixty soap molecules at 300 K. Assembly takes one to three minutes of Play; the "Load this state" card in the first chat turn jumps to the finished micelle.

Why Trade Atoms for Beads?

An atomistic simulation computes the force on every atom from every nearby atom, a femtosecond or two at a time. For a few hundred atoms a browser can do that fast enough to watch, and the phase-change and heat-conduction articles on this site work that way. What makes a micelle is dozens of soap molecules turning their heads outward around one center, and a model that keeps every hydrogen atom spends its whole budget on detail the assembly does not depend on. Coarse-grained modeling keeps the degrees of freedom that matter and drops the rest. The Martini force field of Marrink and coworkers, used today to simulate cell membranes and proteins, maps about four heavy atoms onto one bead, and the tail beads in this lab have the size of Martini's. Because the units are real, the thermometer in the lab reads kelvin. Companion articles apply the same approach to liquid crystals, the glass transition of a polymer, and protein folding.

Running Experiments by Asking

AIMS is an AI-native environment. Running the molecules, counting their clusters, measuring the shape of each, and plotting the results are the agent's work. A student asks the agent to "watch the micelles form and count the clusters", and the agent recognizes the intent, configures the lab, runs the experiment, and posts a live chart of the results in the conversation.

Open Micelle Formation from the Examples menu (Materials Science, Soft Matter), open the chat, and type the prompts below.

Be patient. Every picosecond is computed in your browser, and the molecules need 300 to 1000 picoseconds, one to three minutes of Play, to assemble. Each of the three chat turns of the example keeps its last frame: press "Load this state" on its card and the lab jumps to it.

  1. Self-assembly — "Run the lipids for 1000 ps at 300 K and count the clusters every 50 ps."
  2. Break-up — "Now heat the box from 300 K to 800 K, holding about 80 ps at each step, and chart the number of clusters against temperature."
  3. Oil — "What happens in oil? Build 60 lipids with a small head, HS TL TL TL, switch the solvent to oil, and count the clusters every 50 ps for 1000 ps."

Two Rules Stand In for the Water

A soap molecule has two ends: a polar head that dissolves in water and a hydrocarbon tail that does not. Put enough of them in water and they gather into micelles, tails inside and heads outside, which is how soap carries grease away. Each molecule in this lab is four beads: a yellow head bead 7 Å wide and a tail of three gray beads 4.7 Å wide. Sixty of them share a closed box 66 Å on a side, a concentration of about 0.35 moles per liter. The lab and the agent call these molecules lipids, the general name for molecules with a polar head and an oily tail. The box has no water in it. Following Cooke, Kremer, and Deserno, who showed in 2005 that lipids made of a few beads assemble into membranes without any solvent, the two rules of the model stand in for the water: the tails attract one another with a well 630 K deep per bead contact, 1.5 times the 420 K that Martini gives two such beads, because the attraction also has to do the work of the hydrophobic effect, and the heads repel everything.

The head is wider than the tail on purpose. Israelachvili, Mitchell, and Ninham explained in 1976 how the shape of the molecule decides the shape of the aggregate: a wide head on a thin tail is a cone, and cones pack into balls; a head no wider than its tails is a cylinder, and cylinders pack into sheets. That is why soap makes micelles while the lipids of a cell membrane, each with two hydrocarbon chains side by side, make bilayers.

Self-Assembly

The agent counts clusters by joining any two molecules whose tails touch. The sixty molecules start scattered at random, 34 separate clusters, the largest with 9 molecules. At 300 K the tails find one another quickly. The agent averages the count over each 50 ps: 13 clusters over the first 50 ps, the largest with 24 molecules; 4 clusters over the next 50 ps, the largest with 41; and a single cluster of all 60 in every window from 300 ps on, the points from 350 ps on in the chart. It stays whole to the end of the nanosecond apart from one molecule that leaves it briefly in the window ending at 550 ps.

A count of clusters cannot tell a micelle from a tangle of molecules or a pile pressed together, because each of those also counts as one cluster. So the agent measures the shape of every cluster of five or more molecules at the end of the run: the radius of gyration of its tail beads, which is the size of its oily core, and the share of its molecules whose head sits farther from the center of the core than the average distance of their own tail beads. The single cluster has a core with a radius of gyration of 14 Å, and all 60 heads point outward: an oily core covered by heads, the structure of a micelle.

One Micelle or Two

Our runs of this example ended in one of two ways. In four of six runs, all 60 molecules joined one micelle between about 300 and 1000 ps after the start. In the other two, two micelles formed within about 500 ps, 36 and 24 molecules in one run and 35 and 25 in the other, and did not merge within the run: one pair was followed for 2.8 ns, the centers of its two micelles 34 to 42 Å apart and their sizes unchanged, every head outward and the cores with radii of gyration of 11 and 10 Å. A finished micelle is covered by heads, and in this model heads repel everything, so two finished micelles can sit side by side for a long time. A real soap solution above its critical micelle concentration holds very many micelles, each of a typical size. The box is far above that concentration, which is about 8 millimoles per liter for sodium dodecyl sulfate, a common soap, but it holds only 60 molecules, enough for one or two micelles. Press Reset and run the example again to see which ending a new run reaches.

The size of a micelle depends on the shape of the molecule. In runs of the same box with a tail of two beads instead of three, sequence "HD TL TL", the molecules made three smaller micelles, of about 25, about 19, and 12 to 16 molecules in two runs, with one to three molecules left floating free. A head no wider than the tails, sequence "HS TL TL TL", makes the molecule a cylinder, which by the packing argument should not fit on the surface of a ball. In two 2 ns runs of this box in water, those molecules made one micelle of all 60 anyway, 98 to 100 % of the heads outward and the core 13 to 14 Å in radius of gyration, so in water this small model does not show that part of the argument. The size of the head does show in oil, below.

Heating Breaks Them Up

Heating undoes the assembly. Stepping from 300 to 400 K and then up to 800 K in steps of 50 K, with 60 ps at each temperature and then 20 ps of counting, the micelle stays whole to 400 K. It loses a few molecules at 450 K, takes most of them back at 500 K, splits at 550 K into pieces of which the largest holds 35, and is in 18 clusters at 650 K and 25 at 800 K, the largest with 11 molecules. Over this range the thermal energy of a bead, 550 to 800 K in the same units, becomes comparable to the 630 K that holds two tail beads together. Real soap stays below the boiling point of water; the box leaves the water out, so the model can be heated past it.

Cooled again, the molecules reassemble. The second chat turn keeps its last frame, the broken-up box at 800 K. Press "Load this state" on its card and then Play: the thermostat of the lab stays at its setting, 300 K in the example, so the hot molecules cool and gather into micelles within a few hundred picoseconds. Loaded this way in the published example, the box held two micelles 430 ps later, each a gray core inside a shell of yellow heads. In another run cooled this way, the box held two micelles of 50 and 10 molecules after 200 ps and one micelle of all 60 after 400 ps.

Turned Inside Out in Oil

In oil the two ends trade places. The oily tails mix with the oil around them, while the polar heads, which the oil does not dissolve, cling to one another. Surfactants such as AOT gather in oil into inverse micelles: small balls with the heads inside, often around a tiny drop of water, and the tails outside. The lab models the oil the way it models the water, with rules instead of solvent molecules. Under Experiment Settings, Force Field, the Implicit Solvent setting switches the lipid beads from water to oil, and a chip on the lab names the solvent. In oil the heads attract one another and the tails only repel. The head attraction, 1200 K per contact, is not fitted to a measurement the way the tail attraction is: it is the value at which small-head molecules assemble in this box.

The third chat turn builds 60 molecules with a small orange head, 4.7 Å wide like the tails, and switches the box to oil. Because the heads now make the core, the agent counts clusters by joining any two molecules whose heads touch, and it measures each cluster on its core of heads and on the share of molecules whose tails sit farther from the center than their head. In four runs of 1 to 2 ns, most of the molecules had joined clusters within about 400 ps, and at the end of each run the box held four or five inverse micelles of 6 to 19 molecules, each with a core of heads 4 to 7 Å in radius of gyration and every tail pointing outward. These are much smaller than the micelle of 60 that the soap molecules make in water. The soap molecules behave differently in oil. With their 7 Å heads, all 60 gathered into one large cluster, tails outward, whose core of heads has a radius of gyration of 17 Å, about three times that of the small-head micelles. In these runs, the size of the head decided whether the molecules made small inverse micelles in oil.

What the Simulations Produced

The simulations were given the forces among beads. Everything below came out of them:

  • Self-assembly — 60 scattered soap molecules become one micelle by 300 ps in the published run, with every head outward.
  • Two endings — in two of six runs two micelles formed instead and stayed apart, one pair for 2.8 ns, each covered by heads that repel the other.
  • Shape decides size — molecules with a tail of two beads form three smaller micelles in the same box.
  • Break-up and reassembly — the micelle survives to 400 K, is in 25 pieces by 800 K, and reassembles when the box is cooled.
  • Inside out in oil — with the rules switched to oil, small-head molecules form four or five inverse micelles of 6 to 19 molecules, heads inside and every tail outward.

Conclusion

This article uses soap to illustrate a new way to learn science: students converse with an AI agent that turns a plain-language question into a molecular dynamics experiment and hands back measured data. Micelle formation, the textbook explanation of how soap works, becomes something students watch and measure for themselves in a browser: how scattered molecules gather into micelles, how to tell a micelle from a tangle, how the shape of a molecule changes the micelles it forms, and how the same kind of molecule turns inside out in oil. By pairing a physically grounded coarse-grained simulation with an AI that can set it up and run it, AIMS turns a student's curiosity into a genuine scientific investigation of the soap they use every day.

← Back to AIMS