-
Notifications
You must be signed in to change notification settings - Fork 222
Proposal for morphologies
Morphology are used for simulation, access and plotting. For simulation, the geometry doesn't actually matter, only the electrical properties do. For access, the Morphology class is used to return the index of the compartment. Plotting should also be dealt with by the Morphology class.
I propose 1) to clearly separate properties that are relevant for simulation (i.e. electrically relevant) from others, 2) to make geometrical and electrical properties independent (ie not compute electrical properties from geometrical properties as is done currently), the relation being dealt with by the Morphology class, depending on specific implied geometry (eg truncated cone).
A morphology is a tree, each node being a branch. Each branch is a set of compartments. For each compartment, properties are:
-
area (to calculate transmembrane currents)
-
volume (for diffusion)
-
curved length
-
resistive length (for axial currents)
-
x,y,z coordinates of electrical midpoint
Some explanations for the last two properties (4 and 5). Since the resistance depends on intracellular resistivity, which is only specified later, we instead calculate an effective length, that is, so that resistance is intracellular resistivity divided by effective length (for a cylinder, pi * d**2/4L). This gives a quantity that has units of meter, which we call the resistive length. Then, (x,y,z) coordinates correspond to the actual coordinates of all properties such as V, Im and others, i.e., the midpoint of the compartment. It makes sense (and is simpler) to choose the midpoint of the compartment as the point that splits the resistive length in two equal parts. For a cylinder, this would simply be the geometrical midpoint, but for a truncated cone, it would be biased towards the smaller end. This way, it is very easy to calculate the resistance between two successive compartments, which is just the average resistance of the two compartments. In the same way, the resistances at the two ends of the branch are just half-resistances of the corresponding compartments.
Curved length (3) is the geometrical length of the compartment, but not the Euclidian distance between the two end points. It is rather the total length along the possibly curved compartment. It is therefore decoupled from coordinates. This will make it easier for resegmenting a tree.
We may add, for convenience, a distance
properties, which is the distance from the origin of the branch to the midpoint (derived from curved length). This can be useful when setting channel properties (point to think about; we might rather want distance from the soma than from origin, for example). Alternatively, we could also have a position
property, which would indicate the distance relative to the total curved length (between 0 and 1). But in all cases, all properties that are state variables of the spatial neuron are meant at the electrical point.
All these properties above are considered independent. Diameter and end point coordinates are not core properties, but depend on the specific geometry (cylinder, truncated cone, sphere). The old 'distance' (in the previous version) is only used internally for access (i.e. to determine which compartment is meant when specifying a distance). We only need distance from branch origin, not from soma origin.
The properties should not be directly modifiable by the user; rather, set at construction time.
One way is to assemble a morphology with blocks such as cylinders. We will need the following kinds of blocks:
- Isopotential sphere. This is the
Soma
class. - Cylinder.
- Sequence of truncated cones. I think this is better than a sequence of cylinders because diameter is continuous (and so we don't have the problem of what to do with the surface at junctions). Given that a cylinder is a sequence of truncated cones, this could be the default Morphology type. This implies that n+1 diameters are needed.
Boundary surfaces
One issue is what to do with the surface at the two ends of a cylinder or truncated cones. Physically, those should be included in the calculation of area for the two compartments. I propose to do that. Then when a branch is connected, the area of the end compartment of the parent branch of and of the start compartment of the child are updated.
Multicompartmental soma
First of all, it should be checked that simulation does not assume that the first compartment is an isopotential soma.
One problem is to build the dendritic tree when the soma has several compartments. Then how to connect branches at different ends (or even in the middle)? In the current system, connecting a branch at the start actually means that the soma is the child of a dendrite. This could be built indeed in this way, but it might not be the most elegant solution.
Resegmenting is not difficult in the context of general geometrical parameters (area, electric length), it is more challenging for coordinates. That is, to split a compartment in two, we might divide electric length, area etc by two (does that work?). Coordinate interpolation is done independently (ie we do not enforce consistence).