MCell Home
DReAMM
Tutorials
About MCell
Download
Documentation
Publications
MCell & NPACI
Useful Links
Contact Us
CNL Home
MCell: A Monte Carlo Simulator of Cellular Microphysiology

MCell Quick Reference Guide

Version 2.76, March 16, 2005

Thomas M. Bartol Jr. Joel R. Stiles

MCell MDL Specification

1. Annotation
2. Constant
3. Definition of User Variables
4. Definition of Simulation Parameters
5. Definition of Logical Objects (Ligands, Release Patterns, and Reaction Mechanisms
6. Design of Templates for Physical Objects (Surfaces and Release Sites
7. Hierarchical Grouping of Physical Object Templates as Meta Object Templates
8. Creation of Actual Simulation Components
9. Visualization Data Output
10. Reaction Data Output
11. Generic "C" Style Data Output


1. Annotation
/*descriptive information ignored by parser*/User Comments. Comments may be nested.

2. Constants
INPUT_FILEA text constant which is the name of the MDL input file given in the MCell command line.
SEEDA numerical constant which is the random sequence index.
PIA numerical constant with a value of (3.14159265358979323846).

3. Definition of user variables
info_icon

Supplemental Info

X
Read more about creating user variables here.

text_variable_name = "literal_text"

Assigns a text value to text_variable_name.

text_variable_name = text_expression

Assigns a text expression (concatenated text) to text_variable_name. A text expression is of the form:

"literal_text"literal_text text_variable_name ...

numercial_variable_name = numerical_value

Assigns a numerical value to numerical_variable_name.

numercial_variable_name = numerical_expression

info_icon

Supplemental Info

X
Read more about using arithmetic operators and operations in MCell here.

Assigns value of a numerical expression to numerical_variable_name. Numerical expressions may include the standard arithmetic operations (+,-,*,/,^), the value of pi (avaliable through the keyword PI), and several other useful mathematical functions:
  • SQRT(n)computes the square root of n.
  • EXP(n)computes en.
  • LOG(n)computes loge of n.
  • LOG10(n)computes log10 of n.
  • SIN(n)computes sin of n radians.
  • ASIN(n)computes sin -1 of n ( in radians).
  • COS(n)computes cos of n radians.
  • ACOS(n)computes cos -1 of n (in radians).
  • TAN(n)computes tan of n radians.
  • ATAN(n)computes tan -1 of n (in radians).
  • ABS(n)computes absolute value of n.
  • MOD(n1,n2)computes modulus of n 1 with respect to n 2.
  • MIN(y,z)computes minimum of y and z.
  • MAX(y,z)computes maximum of y and z.
  • CEIL(y)computes smallest integer that is not less than y.
  • FLOOR(y)computes the largestest integer that is not larger than y.
  • ROUND_OFF(y,z)gets z rounded to y significant digits (NOT y decimal places) with trailing 0's truncated.

array_variable_name = [numerical_expression or numerical_range_specifier, ...]

Assigns comma-delimited array of numerical values to array_variable_name. A numerical_range_specifier is of the form:

[n 1 TO n 2 STEP n 3]

and generates a range of values between n 1 and n 2, at intervals of n .

4. Definition of Simulation Parameters
4.1. Required Statements
info_icon

Supplemental Info

X
Read more about the two required MDL statements here.

ITERATIONS = numerical_expression

Sets number of iterations to execute.

TIME_STEP = numerical_expression

Sets iteration time step of simulation in seconds.
4.2. Optional Statements

INCLUDE_FILE = text_expression

info_icon

Supplemental Info

X
Read more about INCLUDE_FILE here.

Includes the contents of the named file in the current MDL file.

RADIAL_SUBDIVISIONS = numerical_expression

info_icon

Supplemental Info

X
Read more about RADIAL_SUBDIVISIONS here.

Sets the number of radial subdivisions in the 3D random walk vector table. Must be a power of 2. Default=210=1024, maximum=212=4096.

RADIAL_DIRECTIONS = numerical_expression

info_icon

Supplemental Info

X
Read more about RADIAL_DIRECTIONS here.

Sets the number of radial directions in a single octant of a unit sphere (to be used in 3D random walk vector table). numerical_expression must be a power of 2. Default=214=16384 (requires ~400Kbytes of memory). Altrnatively, numerical_expression can be replaced by the keyword, FULLY_RANDOM, in which case execution is slower because the direction for each movement is generated directly from newly chosen random numbers (no vector table is used).

EFFECTOR_GRID_DENSITY = numerical_expression

info_icon

Supplemental Info

X
Read more about EFFECTOR_GRID_DENSITY here.

Sets the effector grid density, in units of mm -2. Default=1.

PARTITION_X = numerical_array

info_icon

Supplemental Info

X
Read more about spatial partitioning here.

Spatial partitioning along the x-axis, in µm. Default: no partitioning. Optimal placements of partitions lead to dramatic increases in execution speed.

PARTITION_Y = numerical_array

Spatial partitioning along the y-axis, in µm. Default: no partitioning.

PARTITION_Z = numerical_array

Spatial partitioning along the z-axis, in µm. Default: no partitioning.

CHECKPOINT_INFILE = text_expression

info_icon

Supplemental Info

X
Read more about MCell checkpointing here.

Sets the name of the file to be read in at a checkpoint. No default value.

CHECKPOINT_OUTFILE = text_expression

Sets the name of the file to be written out from a checkpoint. No default value.

CHECKPOINT_ITERATIONS = numerical_expression

Sets the number of iterations to execute before writing a checkpoint file. No default value.

5. Definition of Logical Objects (Molecules, Release patterns, and Reaction Mechanisms)
DEFINE_MOLECULE molecule_name {Defines a molecule with a user-given name.
REFERNCE_DIFFUSION_CONSTANT = numerical_expression e.g. D20,w. Optional. Used to calculate Monte Carlo binding probablity. Given in units of cm2s-1 .
DIFFUSION_CONSTANT = numerical_expression Required. Sets diffusion constant used to calculate random walk step lengths. Given in units of cm2s-1 .
CHARGE = numerical_expression Optional. The absolute value(i.e. magnitude) of the charge on a molecule. Default charge is needed.
}
info_icon

Supplemental Info

X
Read more about DEFINE_MOLECULE here.
DEFINE_RELEASE_PATTERN pattern_name {Defines a temporal pattern for molecule release from a release site.
DELAY = numerical_expression Delay in seconds between 0 and firsr release event.
RELEASE_INTERVAL = numerical_expression Time, in seconds, bewteen release events within a train (inverse of event frequency).
TRAIN_INTERVAL = numerical_expression Time, in seconds , between the beginning of one train and that of the next (inverse of train frequency).
TRAIN_DURATION = numerical_expression Length of each train, in seconds.
NUMBER_OF_TRAINS = numerical_expression Sets the number of trains that would be produced.
}
info_icon

Supplemental Info

X
Read more about DEFINE_RELEASE_PATTERN here.
DEFINE_SURFACE_REGIONS {Defines surface regions on object templates .
OBJECT existing_object_name {Surface object for which regions are to be defined.
REGION region_name { Defines the named region on the surface object.
ELEMENT_LIST = numerical_expression Comma delimited list of element specifiers. Allowed values for element specifiers are as shown for the REMOVE_ELEMENT statement.
}
...May specify as many regions on this object as desired.
}
...May define regions for as many object as desired.
}
info_icon

Supplemental Info

X
Read more about DEFINE_SURFACE_REGIONS here.
DEFINE_EFFECTOR_SITE_POSITIONS {Places effector sites on defined regions.
REGION existing_object_name [existing_region_name] {Regions of the object on which effector sites are placed.
EFFECTOR_STATE effector_state_name { Name of effector state placed in this region.
DENSITY = numerical_expression Site density at which effector sites are placed into the effector tile grid. To assign an exact number of effectors, use the expression NUMBER = numerical_expression instead of DENSITY.
POLE_ORIENTATION = orientation Orientation of the added effector sites relative to the normal vector (used to determine the front and back faces) of the surface. orientation may be POSITIVE_FRONT or POSITIVE_BACK.
}
...May place as many effectors on this region as desired. (N.B. total density of all placed effectors must not exceed EFFECTOR_GRID_DENSITY).
}
...May place effectors on as many regions as desired.
}
info_icon

Supplemental Info

X
Read more about DEFINE_EFFECTOR_SITE_POSITIONS here.
DEFINE_REACTION reaction_name {Define reaction mechanism with a user-given name.
state_name[>adjacent_state_name {rate_constant}] ... Unimolecular transition. Multiple paths to different adjacent states may be listed separately, each enclosed in a separate set of square brackets. rate_constant is the name of a file (i.e., a text_expression) containing a series (in XY columar ASCII format) of time-dependent rate constants (X column is time in seconds, and Y column is the rate constant).
state_name[ >adjacent_state_name {rate_constant: .molecule_name, polarity}] ... Tranistion that involves a molecular operation. Multiple paths may be listed.
  • + indicates binding of molecules.
  • ~ indicates molecular flux, i.e., instantaneous translocation of molecules across effector site upon successful "binding"
  • - indicates unbinding of molecules
  • # indicates destruction of molecules
  • * indicates production of a single diffusing molecule according to unimolecule ransition probability
  • @ indicates production of 0 or more diffusing molecules according to Poisson probability
For binding interactions (+), rate_constant is a numerical expression in units of M-1s-1 . For molecular flux interactions (~), rate_constant is a numerical expression in unit of M-1s-1 if the molecule is neutral; absolute (magnitude) units of AM-1i.e. CM-1s-1 are used if the molecule is charged. For all other interactions, rate_constant is a numerical expression in units of s-1 . Note that for all of the above mentioned interactions rate_constant may also be the name of a file containing rate constant values that vary as a function of time. The keywords allowed for polarity depends on the molecular interaction operator used:
  • for binding (+) or flux (~), polarity must be:

    POSITIVE_POLE, NEGATIVE_POLE, or BOTH_POLES

  • for unbinding (-), polarity must be:

    POSITIVE_POLE, NEGATIVE_POLE, EITHER_POLE or BINDING_POLE

  • for destruction (#), the polarity keyword is ignored.
  • for production reaction (* or @), polarity must be:

    POSITIVE_POLE, NEGATIVE_POLE, or EITHER_POLE

REFERENCE_STATE state_name {Defines the reference state for reaction mechanism.
molecule_name NUMBER_BOUND = numerical_expression Specifies the number of ligands bound to any one of the effector states listed for the reaction for each type of ligand molecules that participates in the reaction mechanism.
...Must specify number bound for each type of molecule.
} }
info_icon

Supplemental Info

X
Read more about DEFINE_REACTION here.

6. Design of Templates for Physical Objects(Surface and Release Site)
6.1. Define Box Object
box_name BOX {Designs a template for a box object.
CORNERS = coordinate1, coordinate2 Define the corners of a box in 3 dimensions( µm). coordinate1 and coordinate2 are each numerical arrays representing the coordinates of the lower-left-front and upper-right-back corners of the box, respectively. The box is aligned with a right-handed cartesian coordinate system, with its right side in the positive X direction, its back in the positive Y direction, and its top in the positive Z direction.
FULLY_CLOSED = boolean Specifies whether the box is closed; A closed box could be used for counting molecules. boolean is YES, NO, TRUE or FALSE.
optional_surface_modifiers See below.
optional_geometric_transformation See below.
}
info_icon

Supplemental Info

X
Read more about BOX here.
6.2. Define Polygon List Object
polygon_list_name POLYGON_LIST {Design a template for a polygon list object.
VERTEX_LIST {Specifies all the unique vertices in the list of planner polygons.
vertex_coordinate Indicates the coordinates of a single vertex. vertex_coordinate is a 3D numerical array.
...May specify as many vertex coodinates as needed.
}
ELEMENT_CONNECTIONS {Specifies the connections between the vertices for the planar polygonal elements in the polygon list.
connection_specifier Defines the connections between the vertices of a single planar polygonal element. connection_specifier is a numerical array. The values in the array are the 0-based indices of the vertices in the vertex list which comprise this element. The order of the vertex indices in the array is used to determine the direction of the element's normal vector using the right-hand rule.
...May specify as many connection specifiers as needed.
}
FULLY_CLOSED = boolean Specifies whether the polygon list object is closed. This command is reserved for future versions of MCell, currently is ignored by parser when the simulation initiates. boolean is YES, NO, TRUE or FALSE.
optional_surface_modifiers See below.
optional_geometric_transformations See below.
}
info_icon

Supplemental Info

X
Read more about POLYGON_LIST here.
6.3. Define Spherical Ligand Release Site
release_site_name SPHERICAL-RELEASE_SITE { Designs the template for a spherically shaped ligand release site with uniform distribution inside .
LOCATION = coordinates Defines the xyz coordinates for the center of the release site. coordinates is a 3D numerical array scaled in µm.
MOLECULE = molecule_name Specifies which previously defined molecule (a logical object) is to be released from this site.
number_specifier Specifies the number of molecules to be released from this site; it can be indicated by an exact number, by volume-dependent distribution of the ligand, or by Gaussian distribution. See below.
SITE_DIAMETER = numerical_expression Specifies the diameter of the release site ( µm). A diameter of zero indicates a point source.
RELEASE_PATTERN = pattern_name Optional. Specify the name of a previously defined release pattern ( a logical object) that will determine the release timing for this site. If no release pattern is specified, one release event will occur at time zero.
optional_geometric_transformation See below.
}
info_icon

Supplemental Info

X
Read more about SPHERICAL_RELEASE_SITE here.
6.4. Define Number Specifier
number_specifiers
info_icon

Supplemental Info

X
Read more about number specifier definition here.

NUMBER_TO_RELEASE = numerical_expression

Specifies the number of molecules to be released.


GAUSSIAN_RELEASE_NUMBER {Designs a template to compute the number of molecules to release based on a Gaussian distribution.

MEAN_NUMBER = numerical_expression Specifies the mean number of ligand molecules released from the site.

STANDARD_DEVIATION = numerical_expression Specifies the standard deviation value for the release distribution; if the standard deviation is 0, then this function is the same as NUMBER_TO_RELEASE.

}
VOLUME_DEPENDENT_RELEASE_NUMBER {Designs a template to compute the number to release based on a fictitous vesicle volume.

MEAN_DIAMETER = numerical_expression Specifies the fictitous diameter of the vesicle. The diameter will be normally distributed; the vesicle volume and number of release therefore will be non-normally distributed.

STANDARD_DEVIATION = numerical_expression Specify the standard deviation value for the diamemter.

CONCENTRATION = numerical_expression Specify the concentration inside the vesicle, it is used to compute the volume-dependent release number.

}
6.5. Optional Surface Modifier
REMOVE_ELEMENT = element_specifier
info_icon

Supplemental Info

X
Read more about REMOVE_ELEMENT here.
Removes the specified surface element (wall or face) from a box or polygon list object. Allowed values for element_specifier are:
  • TOP, BOTTOM, LEFT, RIGHT, FRONT, or BACK for box objects.
  • A numerical expression corresponding to a 0-based index number of a planar polygonal element for a polygon list object.
  • ALL_ELEMENTS refers to all of the elements of a box or polygon list object.
surface_permeability {Modifies permeability of specified surfaces of a box or polygon list object to a given molecule. Possible values of surface_permeability are:

TRANSPARENT, REFLECTIVE, or ABSORPTIVE

MOLECULE = molecule_name Name of the type of molecules to which the surface permeability applies.
ELEMENT = element_specifier Surface element to which surface permeability modifications are made. Allowed values are the same as those for the REMOVE_ELEMENT statement.
}
info_icon

Supplemental Info

X
Read more about surface_permeability here.
ADD_EFFECTOR { Tiles a surface with stationary effector molecules.
STATE = state_name Specifies state_name of the effector site, usually associated with its role as a chemical reaction intermediate.
DENSITY = numerical_expression Site density at which effector sites will be placed into the tile grid.
ELEMENT = element_specifier Surface element to which surface permeability modifications are made. Allowed values are as the same as those for the REMOVE_ELEMENT statement.
POLE_ORIENTATION = orientation Specifies orientation of the added effector sites relative to the normal vector (determing front and back faces) of the surface. orientation May be POSITIVE_FRONT or POSITIVE_BACK.
}
info_icon

Supplemental Info

X
Read more about ADD_EFFECTOR here.
6.6. Optional Geometric Transformation
TRANSLATE = [dx, dy, dz]
info_icon

Supplemental Info

X
Read more about TRANSLATE here.
Moves object through space in x, y and z directions for a distance given in µm by a 3D numerical array.
ROTATE = axis_vector, angle
info_icon

Supplemental Info

X
Read more about ROTATE here.
Rotates object around an axis that extends from the world origin [0,0,0] and passes through a point given by the 3D numerical array, axis_vector. Rotation is performed for the number of degrees given by angle.
SCALE = [x_multiplier, y_multiplier, z_multiplier]
info_icon

Supplemental Info

X
Read more about SCALE here.
Scales object by multiplicative x, y, and z factors.

7. Hierarchical Grouping of Physical Object Templates in Meta Object Templates
meta_object_name OBJECT {Designs a template for an aggregate (meta) object.
list_of_object_templates A list of object templates as shown below.
optional_geometric_transformations Geometric transformations as described above.
}
info_icon

Supplemental Info

X
Read more about meta object templates here.
The list_of_object_templates may include both newly designed and existing object templates, it is done as follows:
new_object_template Design new physical or meta object template within the current meta object using syntax described in section 6.
copy_of_existing_object_template Make a copy of an existing physical or meta object templated using systax shown below:
object_name OBJECT existing_object_name {Assigns a copy of existing_object_name to object_name.
optional_geometric_transformations Geometric transformations as described above.
}

8. Creation of Actual Simulation Componets from Physical and Meta Object Templates
INSTANTIATE object_name OBJECT {Creates actual objects for simulation from object templates.
list_of_object_templates A list of object templates as shown in section 7.
optional_geometric_transformations Geometric transformations as described above.
}
info_icon

Supplemental Info

X
Read more about INSTANTIATE...OBJECT here.

9. Visualization Data Output
VIZ_DATA_OUTPUT {Information for instantiated objects may be output(stored) for imaging.
MODE = visualization_mode Selects mode (format) of visualization data storage. Possible values for visualization_mode are: DX, IRIT, RAYSHADE, POVRAY, RENDERMAN, VOXEL_IMAGE_MODE and VOXEL_VOLUME_MODE.
MOLECULE_FILE_PREFIX = "file_prefix" Used to define the prefix of the output file for molecule positions and states at each selected time step. The prefix must be contained inside double quotes.
OBJECT_FILE_PREFIXES {Associates output object file directories or file names with simulation objects.
surface_object_name = text_expression Selects named surface object for visualization output. text_expression is used to save information required for imaging the surface object into data files with user-given names.
...May specify as many designators as needed.
}
STATE_VALUES {Associates visualization state values with logical or physical object templates of molecules, chemical reaction intermediates, or surfaces.
logical_or_physical_object_name = numerical_expression The named logical or physical object is associated with the visualization state value given by numerical_expression.
...May specify as many state value associations as needed.
} }
info_icon

Supplemental Info

X
Read more about VIZ_DATA_OUTPUT here.
output_specifier:
ITERATION_LIST = [list_of_iterations] Read more about ITERATION_LIST here. Specifies simulation iterations after which visualization data will be collected. list_of_iterations is a numerical array of simulation iterations and/or >iteration_range_specifier. An iteration_range_specifier has the form:

[start_iteration TO end_iteration STEP numerical_expression]

TIME_LIST = [list_of_times] Read more about TIME_LIST here. Specifies simulation times after which visualization data will be output. list_of_times is a numerical array of simulation times and/or time_range_specifier. A time_range_specifier has the form:

[start_time TO end_time STEP numerical_expression]

ITERATION_FRAME_DATA {Specify type of visualization data to be output and the simulation iteration numbers after which visualization data will be output.
frame_data_specifier = [list_of_iterations ]Associates a type of visualization data to be output with a list of iteration numbers after which visualization data will be output. frame_data_specifier may be: SURFACE_POSITION, SURFACE_STATES, EFFECTOR_POSITIONS, EFFECTOR_STATES, MOLECULE_POSITIONS or MOLECULE_STATES. list_of_iterations is a numerical array of iteration numbers and/or frame_data_specifier as described in the ITERATION_LIST statement above.
...May specify as many frame data associations as needed.
}
info_icon

Supplemental Info

X
Read more about ITERATION_FRAME_DATA here.

10. Reaction Data Output
REACTION_DATA_OUTPUT {Used to select chemical reaction results to be saved in data files.
reaction_specifier Specifies time or iteration points to save the chemical reaction data. See below.
{COUNT[count_what, count_where, count_how, ...] ...}=> file_name Select desired reaction results for output to a user-named data file, file_name (a text_expression).

count_what specifies the name of the reaction intermediate (molecule or effector state) or reaction state transition (binding, unbinding, etc.) to be output.

count_where specifies the spatial location of the item indicated by count_what; it could be WORLD (which stands for the entire simulation world), existing_object or existing_region.

count_how can be a list of of specialized options for additional control over the manner of counting.

The allowed values for count_where and count_how depend upon the item specified by count_what. Note that mathematical expressions involving multiple COUNT statement may be specified within the braces {} surrounding the COUNT statement block. See below for selected examples.
...May specify as many COUNT statement as needed.
}
info_icon

Supplemental Info

X
Read more about REACTION_DATA_OUTPUT here.
reaction specifier
ITERATION_LIST = [list_of_iterations]Specifies simulation iterations after which reaction data will be output. list_of_iterations is a numerical array of simulation iterations and/or >iteration_range_specifier. An iteration_range_specifier has the form:

[start_iteration TO end_iteration STEP numerical_expression]

TIME_LIST = [list_of_times]Specifies simulation times after which reaction data will be output. list_of_times is a numerical array of simulation times and/or time_range_specifier. An time_range_specifier has the form:

[start_time TO end_time STEP numerical_expression]

STEP = numerical_expression Time intervals(seconds) between saved data points.
info_icon

Supplemental Info

X
Read more about STEP here.
Selected examples of COUNT statement blocks presently implemented (subject to change and expansion):
{COUNT[ligand_name, WORLD, FOR_EACH_TIME_STEP]} =>file_name Count number of the ligand "ligand_name" in the entire simulation environment at each time step.
{COUNT[ligand_name, existing_region, FOR_EACH_TIME_STEP, ALL_HITS]} =>file_name Count all collisions between the ligand "ligand_name" and the selected surface region at each time step.
{COUNT[ligand_name, existing_region, FOR_EACH_TIME_STEP, ALL_HITS_FRONT]} =>file_name Count only collisions between the ligand "ligand_name" and the FRONT side of the surface region at each time step.
{COUNT[ligand_name, existing_region, FOR_EACH_TIME_STEP, ALL_HITS_BACK]} =>file_name Count the number of collisions between the ligand "ligand_name" and the BACK side of the surface region at each time step.
{COUNT[ ligand_name, object_name, FOR_EACH_TIME_STEP]} =>file_name Count the number of the ligand "ligand_name" inside a fully closed physical object comprising the instantiated physical or meta object named object_name at each time step.
{COUNT[state, WORLD, FOR_EACH_TIME_STEP]} => file_name Count all the effector sites in the specified state in the entire simulation environment.
{COUNT[ state[> adjacent_state], WORLD, SUM_OVER_ALL_EFFECTORS, FOR_EACH_TIME_STEP, ALL_EVENTS]} =>file_name Count all transitions of an effector type from state to adjacent_state, summing over all effectors in the entire simulation environment, and output the number of transitions that occur during each time step.
{COUNT[ state[> adjacent_state], WORLD, SUM_OVER_ALL_EFFECTORS, FOR_EACH_TIME_STEP, INITIAL_EVENTS]} =>file_name Count the subset of transitions from state to adjacent_state in which the previous state was not adjacent_state. Sum over all effectors in the entire simulation environment, and output the number of transitions that occur during each time step.
{COUNT[ state[> adjacent_state], WORLD, FOR_EACH_LIGAND, SUM_OVER_ALL_TIME_STEPS]} =>file_name Count the subset of transitions from state to adjacent_state for each individual ligand molecule of type ligand_name over all time steps.
{COUNT[state[> adjacent_state], WORLD, SUM_OVER_ALL_LIGANDS, FOR_EACH_TIME_STEP]} =>file_name Count the subset of transitions from state to adjacent_state. Sum over all ligand moleculess in the entire simulation environment, and output the number of transitions that occur during each time step.
{COUNT[ state[> adjacent_state], WORLD, SUM_OVER_ALL_LIGANDS, CUMULATE_FOR_EACH_TIME_STEP]} =>file_name Count the subset of transitions from state to adjacent_state. Sum over all ligand molecules in the entire simulation environment, and output the cumulated number of transitions at each time step.
{COUNT[ state[> adjacent_state], existing_region, SUM_OVER_ALL_LIGANDS, FOR_EACH_TIME_STEP]} =>file_name Count the subset of transitions from state to adjacent_state in the defined surface region, sum over all ligand molecules at each time step.
{COUNT[ state[> adjacent_state], existing_region, SUM_OVER_ALL_LIGANDS, CUMULATE_FOR_EACH_TIME_STEP]} =>file_name Count the subset of transitions from state to adjacent_state. Sum all ligand molecules over the defined surface region, and output the number of transitions that cumulate at each time step.
{COUNT[ state[> adjacent_state], existing_region, FOR_EACH_LIGAND, SUM_OVER_ALL_TIME_STEPS]} =>file_name Count the subset of transitions from state to adjacent_state for each ligand molecule on the defined surface region; sum all transitions over the time course of the simulation.
{COUNT[ state[> adjacent_state], existing_region, SUM_OVER_ALL_EFFECTORS, CUMULATE_FOR_EACH_TIME_STEP, ALL_EVENTS]} =>file_name Count the subset of transitions from state to adjacent_state; sum over all effectors on the defined surface region, and output the cumulated number of transitions at each time step.
{COUNT[ state[> adjacent_state], existing_region, SUM_OVER_ALL_EFFECTORS, CUMULATE_FOR_EACH_TIME_STEP, INITIAL_EVENTS]} =>file_name Count the subset of transitions from state to adjacent_state in which the previous state was not adjacent_state. Sum over all effectors on the defined surface region, and output the cumulated number of transitions at each time step.
{COUNT[ state[> adjacent_state], existing_region, SUM_OVER_ALL_EFFECTORS, FOR_EACH_TIME_STEP, ALL_EVENTS]} =>file_name Count the subset of transitions from state to adjacent_state; sum over all effectors on the defined surface region, and output the number of transitions that occurs during each time step.
{COUNT[ state[> adjacent_state], existing_region, SUM_OVER_ALL_EFFECTORS, FOR_EACH_TIME_STEP, INITIAL_EVENTS]} =>file_name Count the subset of transitions from state to adjacent_state in which the previous state was not adjacent_state; sum over all effectors on the defined surface region, and output the number of transitions that occurs during each time step.
{COUNT[ state, existing_region, FOR_EACH_TIME_STEP]} =>file_name Count the number of effectors in the reaction state, state , on the defined surface region at each time step.
{COUNT expression1 + COUNT expression2} => file_name Addtion of the count expressions
{COUNT expression1 - COUNT expression2} => file_name Subtraction of the count expressions
{COUNT expression1 * COUNT expression2} => file_name Multiplication of the count expressions
{COUNT expression1 / COUNT expression2} => file_name Division of the count expressions
{EXPRESSION [numerical_expression]} =>file_name Evaluates a numerical_expression. This can be useful in mathematical expressions involving one or more COUNT statements.

11. Generic "C" Style Data Output
info_icon

Supplemental Info

X
Read more about generic C language output in MCell here.
Several generic file output commands which conform to normal C language syntax are provided in MCell. Several examples of their usage are given below; but please refer to documentations on C programming language for complete details. Note that only file output is supported, not file input.
file_handle = fopen(file_name, "w")Open a file called file_name for writing. If the file already exists, its contents will be overwritten. A handle to the file is stored in file_handle (see below for use of file_handle).
file_handle = fopen(file_name, "a")Open a file named file_name for appending. If the file already exists, fprintf statements(see below) will append information to the pre-existing contents. A handle to the file is stored in file_handle (see below for use of file_handle).
fclose(file_handle) Close the open file associated with the file_handle. The contents of the file will be saved.
printf("This printf statement will print %g words (including the number). \n",10)Print out formatted text and data to the window where MCell was started. See C language documentations on the printf function for more details.
fprintf( file_handle, "scale=[%f,%f,%f]\n", 1.0,1.0,2.0)Write the formatted text and data to the open file associated with file_handle. See C language documentations on the fprintf function for more details.
sprintf( text_variable_name, " scale=[%f,%f,%f]\n", 1.0,1.0,2.0)Write formatted text and data into text_variable_name. See C language documentations on the sprintf function for more details.
print_time("The date is: %m%d%y\n")Print out formatted date and time information to the window where MCell was started. See C language documentations on the strftime function for more details.
fprint_time(file_handle,The date is: %m%d%y\n")Print out formatted date and time information to the open file associated with file_handle. See C language documentations on the strftime function for more details.