Does any one know how to iterate over all states of all mechanisms in a section?
I want to do this because I'm trying to record all states with vectors.
I can record the state if the mechanism's and state's names are known.
However, since the sets of mechanisms differ from cell to cell and from section to section,
it would be much better if we can know the names of mechanisms in currently accessed section.
Thanks!
How to iterate over all states of all mechanisms in a sec?
-
- Site Admin
- Posts: 6300
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: How to iterate over all states of all mechanisms in a se
They are known, by you, during the course of model setup. Just pair each insert statement with corresponding Vector.record() statements. An alternative strategy is to use subsets (SectionLists) to keep track of which sections have which mechanisms during model setup, then after model setup is completed, iterate over each SectionList and execute the appropriate Vector.record() statements. A third strategy would be not to intrude on model setup at all, but instead after setup is complete dohhshih wrote:Does any one know how to iterate over all states of all mechanisms in a section?
I want to do this because I'm trying to record all states with vectors.
I can record the state if the mechanism's and state's names are known.
Code: Select all
forall {
if (ismembrane("foo")) {
. . . statements that set up Vector recording of foo's states
}
if (ismembrane("bar")) {
. . . statements that set up Vector recording of bar's states
}
. . . etc . . .
}
Hints:
1. It is pointless to record density mechanism states at a section's 0 or 1 locations, because only internal nodes (i.e. nodes at segment centers) have their own states.
2. You're going to end up with a lot of Vectors. Make it easy on yourself by managing them with Lists; there's probably a note about this in the Forum's "Hot tips" area--if not, ask for an example.