Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
67 lines (44 sloc) 1.98 KB
note on gfrd model files:
known issules:
file should have unix style line terminators, that is a LF, (0x0A or \n) or parser will fail on linux
last line of model-file should have a LF (or that line is not parsed)
speciestype names:
conform regex "[a-zA-Z][\w\-*_']*"
variable names:
conform regex "[a-zA-Z][a-zA-Z0-9_]*"
particle placement:
conform regex "(\(([^,]+),([^,]+),([^,]+)\)\s*(?:,\s*(.+))*)"
=> exact position in form (x, y, z) [,N]
with N is amount of particles (as number or expression), x,y,z, should also be expressions, use following loop parameters:
n = 0..N-1 or x = 0..1 or xx = -1..+1
when N is omitted a single particle is placed at the specified coordinate
non conform: specifies number or expression for random placement of N particles.
expressions: as described in exprtk (case sensitive, NO enhanced_features, break_continue, return_statement, rtl_io_file, rtl_vecops, control_structures)
declared variables are evaluated and assigned in order of the model file (lines from top to bottom).
variables assigned on the command-line (-d argument) take precedence over the model-file.
build in functions:
// Calculate the number of particles in a volume (in liter or dm^3) with a concentration (in molar or mol/dm3).
concentration( mol , volume) -> number of particles
// Convert a reaction rate from units 'per nanomolar per second' to units 'meter^3 per second'
per_nM_per_sec_to_m3_per_sec(rate) -> rate
More to follow: ? k_D(), k_a(), k_d(), ...
build in constants:
pi, e, inf, NA,
More to follow: ? kb, ...
text variables:
declare with $ prefix,
example:
dir = $ '~/data_out/'
file = $ dir + 'file.abc'
Mode flags:
definition
On = whole simulation (pre-run and main-run)
Run = main-run only (not in pre-run)
Off = Not at all
Default mode for sections (no need to specify)
CopyNumbers = Run
ParticlePosition = Run
Particles = On
Progress = On
ReactionRecord = Run
ReactionRule = On
You can’t perform that action at this time.