mechanisms in a section?

NMODL and the Channel Builder.
Post Reply
jaambros
Posts: 29
Joined: Tue Oct 04, 2005 3:29 pm
Location: Ohio University

mechanisms in a section?

Post by jaambros » Fri Jun 13, 2008 2:39 pm

Hi,
Is there a way to find out programatically the names of the mechanisms in a section?
I would of thought that the MechanismType class would have a function for this (it has one for point processes).
It does have some (count and select), but they refer to the available mechs, not the ones in a given section.

Thanks in advance,
Jose Ambros-Ingerson
Ohio University

jaambros
Posts: 29
Joined: Tue Oct 04, 2005 3:29 pm
Location: Ohio University

Re: mechanisms in a section?

Post by jaambros » Fri Jun 13, 2008 3:36 pm

I figured out one way of doing this

Code: Select all

strdef mname
proc print_mechs(){ local i localobj mt
  mt = new MechanismType(0)
  for i=0, mt.count()-1 {
    mt.select( i )
    mt.selected( mname )
    if( ismembrane(  mname )) print mname
  }
}

ted
Site Admin
Posts: 5590
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: mechanisms in a section?

Post by ted » Fri Jun 13, 2008 8:46 pm

Thanks for posting that nice tip, Jose!

Post Reply