The
In fact, of course, the reversal potential is not a property of a channel population, or of a channel. It depends on the environment the channel is put in and the ions it is permeable to. But, it is needed in the Dynamics specification for the population so just putting it in as a parameter solves the immediate problem. In the process, however, it introduces the potential for easily creating contradictory models, by, for example setting different reversals for populations of the same type of channel.
A much better approach is to let the channel just say what it is permeable to. Some other element in the model can define the membrane reversal potentials for different channels, and the channel population object should then look up the relevant value for the permeant ion of its channel. This provides a cleaner expression of what is there, removes redundancy and lowers the entropy of the model specification.
The following three types are sufficient to provide a simple framework to centralize the definitions of species and reversal potentials on one place:
Once these are available, they can be used to define some species, and to create an environment component that sets their reversal potentials:
The next step is to add a species reference to the channel type, so that channel definitions can say what species they are permeant to.
Finally the channel population type needs modifying to add a derived parameter that addresses the reversal potential from the membrane properties:
This introduces a new construct, the
The path here uses XPath like syntax operating on the component tree in the model. In this case, it finds all the elements of thpe MembranePotential in the model. The predicate selects the one for which the species is the same as the species referred to from the channel used for this population. Finally, it takes the "reversal" parameter from the membrane potential component. This is made locally available as the parameter "erev".
The Dynamics of this model is exactly the same as example 4. The full model including both the type definitions and the components is included below.