Cell morphology definitions with segments and segment groups
NML2_SimpleMorphology.nml
Demonstrates NeuroML morphology specification:
<segment> elements with proximal/distal 3D points and diameter
<segmentGroup> for grouping segments (soma, axon, dendrite)
Parent-child relationships for branching
import urllib.requesturl ="https://raw.githubusercontent.com/NeuroML/NeuroML2/master/examples/NML2_SimpleMorphology.nml"with urllib.request.urlopen(url) as resp: text = resp.read().decode()# Show morphology elementsfor line in text.split('\n'): stripped = line.strip()if'<morphology'in stripped or'<segment 'in stripped or\'<segmentGroup'in stripped or'<proximal'in stripped or\'<distal'in stripped or'</morphology'in stripped:print(stripped[:120])
<morphology id="SimpleCell_Morphology">
<segment id ="0" name="Soma"> <!-- name is optional-->
<proximal x="0" y="0" z="0" diameter="10"/>
<distal x="10" y="0" z="0" diameter="10"/>
<segment id ="1" name="MainDendrite1" >
<proximal x="10" y="0" z="0" diameter="3"/>
<distal x="20" y="0" z="0" diameter="3"/>
<segment id ="2" name="MainDendrite2">
<distal x="30" y="0" z="0" diameter="1"/>
<segment id ="3" name="Spine" >
<proximal x="25" y="0" z="0" diameter="0.2"/>
<distal x="25" y="1" z="0" diameter="0.2"/>
<segmentGroup id="soma_group" neuroLexId="sao1044911821"> <!-- Reserved/special name of a group -->
<segmentGroup id="thick_dendrites">
<segmentGroup id="spines" neuroLexId="sao1145756102">
<segmentGroup id="dendrite_group" neuroLexId="sao1211023249"> <!-- Reserved/special name of a group -->
<segmentGroup id="middle"> <!-- group defined between 2 segs -->
<segmentGroup id="tip"> <!-- group defined between 2 segs -->
</morphology>
TVBO Representation
TVBO represents point neurons — morphology is abstracted away into a single compartment. The dynamics (HH, IaF, etc.) are the same regardless of spatial extent.