Syntax:
fix ID conc/random N file Nin insp1 insp2 ... Nout outsp1 outsp2 ...
Examples:
fix mine conc/random 100 data.time 2 CheA CheAa 2 CheAa CheA
Description:
Randomize the species type of certain particles at specified time increments in a spatial simulation. This is an effective way of coupling ChemCell to another model or simulation that pre-computed concentration vs time profiles of certain species.
Here is how the fix operates. Every N timesteps, the list of current particles is scanned. Each partice with a species type in the list of Nin input species has its species type reset to a new value which is one of the Nout output species. Each of the Nout species has a fractional probability associated with it (between 0.0 and 1.0), which sum to 1.0. The assignment of a particle to a new species is done randomly, in accord with those probabilities.
The probabilities for new species can be time-dependent and are read-in from the time-course data file, which has the following format. Lines beginning with a "#" character are ignored. Other lines must begin with a time value (in seconds), followed by Nout-1 values (between 0.0 and 1.0) which sum to a value <= 1.0. These are the probabilities for each of the Nout species. The value for the last Nout species is set to 1.0 - sum. The time stamp for successive lines in the file should be monotonically increasing.
On a timestep when the fix is applied, the file line with a time stamp just smaller (or equal) to the current time is used to set the Nout probabilities.
Restrictions:
This fix can only be used with spatial simulations.
Related commands:
Default: none