Page 1 of 1

Reading species concentration in a MOD file using a list of species

Posted: Mon Sep 19, 2022 7:33 am
by Tuoma
I'm trying to make a .mod ion-channel mechanism file where the maximal conductance of the channel would depend on the concentration of a certain species. Currently all my molecular species are part of a list, meaning that they are called 'specs[0]' ... 'specs[19]' and I define my reactions as e.g.
reaction000 = rxd.Reaction(specs[0], specs[1], 0.0005)
Is this compatible with .mod mechanisms? I saw in viewtopic.php?t=4042 an example that might work if I renamed my species.

Re: Reading species concentration in a MOD file using a list of species

Posted: Mon Sep 19, 2022 3:05 pm
by ramcdougal
Unfortunately, the []s will cause problems for trying to read/write them from mod files.

specs0, specs1, ... specs19 would work for names (and then you could have e.g. specs0i, ispecs0, etc)