7.5. Clamp Concentration¶
A concentration clamp lets you maintain a constant concentration of a molecule at a surface. This is done by creating and destroying molecules at the surface. Clamp concentrations are created and applied like all the other surface classes (e.g. absorptive, transparent).
To create this model, we’ll begin by making two meshes, one which will have the concentration clamp applied (plane) and the other will prevent molecules from diffusing away from the surface (thin cube).
7.5.1. Start New Project¶
After you start Blender, save the file (and set the project directory) by hitting Ctrl-s, typing ~/mcell_tutorial/clamp (or C:\mcell_tutorial\clamp on Windows) into the directory field, clamp.blend into the file name field, and hit the Save As Blender File button.
7.5.2. Create Cube and Plane¶
Hit the Model Objects button.
Hit the cube button
Hit the + button to add the cube to the Model Objects list.
Expand the Cube Object Options sub-panel.
Change the draw type from Solid to Wire.
In the 3D View Window, with the Cube selected, hit s, z, 0.1, and Enter.
Hit the plane button.
Hit the + button to add the plane to the Model Objects list.
In the 3D View Window, with the plane selected, hit s, 0.9, and Enter.
Hit the Molecules button.
Hit the + button to create a new molecule.
Change the Molecule Name to vol1.
Change the Molecule Type to Volume Molecule.
Change the Diffusion Constant to 1e-6.
7.5.3. Add the Surface Class¶
Hit the Surface Classes button.
Hit the + button to create a new surface class called Surface_Class.
Rename it to clamp_sc.
Hit the + button beside the empty clamp_sc Properties list. Set the following properties:
Select Single Molecule from the Molecules field.
Select vol1 from the Molecule Name field.
Change the Orientation drop-down box to Ignore.
Set Type to Clamp Concentration.
Set Value to 1e-5.
7.5.4. Assign the Surface Class¶
Now that we have created our surface class, we need to assign it to our mesh.
Hit the Assign Surface Classes button.
Hit the + to begin adding a new surface class.
In the Surface Class Name field, select clamp_sc.
Under Object Name, select the newly created Plane object.
Leave All Surfaces set for Region Selection.
7.5.5. Create Reaction Output¶
Hit the Plot Output Settings button.
Hit the + button with a circle around it. This button will add a count statement for every molecule defined, which is just vol1 in this instance.
7.5.6. Run the Simulation¶
Save the Blender file (Ctrl-s).
Hit the Run Simulation button.
Change the number of iterations to 500.
Lastly, hit the Export & Run button.
7.5.7. Visualize the Results¶
Once the simulation has finished running, hit Reload Visualization Data. Hit Alt-a to play back the animation.
In this example, we clamped the concentration of vol1 at a molarity of 1E-5 M. If you annotated the MDL in the previous example, then when you plot or visualize the results, you’ll notice that the concentration of molecules increases for a period of time and then reaches a steady state near 10 uM, which is what we would expect given what we asked for in the CLAMP_CONC command.