### Getting the full topology (segments level) from hoc

Posted:

**Fri Nov 08, 2013 1:02 am**Hi,

Is there a way to get the whole topology as in which segment compartments are connected?

I saw that "nt._v_parent_index" holds this information but how can i get to it from the hoc file

Another question:

I am trying to make a modify the dendritic tree so there are no segments that has more than one child. So i am counting the number of children from the original tree and changing the parents number of segments accordingly. Then i am disconnecting all children and reconnect them at 1/nsegs intervals. Though when i look at _v_parent_index there are still sections that are connected to the same segment in the original parent what am i doing wrong?.

my function looks like this:
Thanks!

Is there a way to get the whole topology as in which segment compartments are connected?

I saw that "nt._v_parent_index" holds this information but how can i get to it from the hoc file

Another question:

I am trying to make a modify the dendritic tree so there are no segments that has more than one child. So i am counting the number of children from the original tree and changing the parents number of segments accordingly. Then i am disconnecting all children and reconnect them at 1/nsegs intervals. Though when i look at _v_parent_index there are still sections that are connected to the same segment in the original parent what am i doing wrong?.

my function looks like this:

Code: Select all

```
proc disperseBranching(){localobj sl,conVec,tempSec,existList strdef fatherStr
forall{
comps = 0
sl=new SectionList()
existList =new SectionList()
sl.children()
somaref= new SectionRef()
fatherStr = secname()
forsec sl{
comps+=1
}
if (comps>somaref.sec.nseg){
somaref.sec.nseg = comps
}
dseg = 1/somaref.sec.nseg
connCount=somaref.sec.nseg
forsec sl{
newCon = dseg*connCount
connCount-=1
printf("newCon is %f dseg is %f currently in %s\n",newCon,dseg,secname())
disconnect()
secref= new SectionRef()
somaref.sec connect secref.sec(0), (newCon)
}
printf("finished with %s\n",fatherStr)
}
}
```