USER GUIDE

BRAINCELL 2.0.

Brain cell in silico

© University College London, 3-clause BSD license

16/03/2026

TABLE OF CONTENTS

INTRODUCTION

1.1 Getting Started with BrainCell

1.1.1 Welcome to the BrainCell User Manual

BrainCell is a next-generation simulation platform for constructing and analysing multi-scale models of neurons and astroglia. It enables the creation of realistic, multi-compartmental biophysical representations of brain cells, linking detailed morphology with their physiological function.

Built on the NEURON–Python computational environment, BrainCell integrates cellular morphology, membrane dynamics, and intracellular mechanisms into a unified workspaceWith this tool, researchers can explore how geometry, ion transport, and cellular interactions shape neuronal and glial behaviour across spatial and temporal scales.

The primary goal of BrainCell is to facilitate the mechanistic interpretation of experimental data, allowing users to reproduce, test, and predict complex cellular processes within a biologically grounded computational framework.

This manual provides a step-by-step guide to BrainCell’s features, interface, and workflow - helping you make the most of its modelling capabilities and apply them effectively to your research.

1.1.2 Basic Windows Requirements (Quick Check)

This section provides only the minimal prerequisites required to run BrainCell on Windows. For detailed installation instructions and troubleshooting, see the next section.

Before installing BrainCell, make sure the following software is installed:

Python (Anaconda) Install Anaconda 2023.09 (Windows, x64) Download: https://neuroalgebra.net/assets/Anaconda3-2023.09-0-Windows-x86_64.exe

NEURON Install NEURON 8.2.2 (Windows, mingw build, Python 3.7–3.11 compatible) Download: https://neuroalgebra.net/assets/nrn-8.2.2-0-setup.exe

After installation, verify that NEURON’s Python environment script

C:\nrn\bin\nrnpyenv.bat

correctly points to your Anaconda installation.

Important note

NEURON uses the Windows environment variable %APPDATA%, which is specific to the current user. For this reason, Anaconda must be installed for the current user only. If it is installed for all users, NEURON may fail to detect the Python environment.

More detailed setup instructions are provided in the following section


BrainCell Installation Guide

2.1 Choose Your Starting Point

Before installing BrainCell, determine which of the following three categories applies to you. Each category has its own correct installation path.

2.1.1 About this Installation

This manual guides you through installing BrainCell, a computational neuroscience simulation tool. BrainCell requires NEURON (simulation environment) and Python (Anaconda recommended) to run.

Platforms covered: Windows 10/11, macOS 10.15+, Linux (Ubuntu 20.04+, Debian, Fedora)

Estimated installation time: 30-60 minutes for clean installation

2.1.2 Quick Start: Identify Your Category

Choose the category that matches your current system:

CategoryDescriptionWhen to Use
Category 1NEURON + Python is already workingYou run NEURON simulations regularly
Category 2Clean system (nothing installed)Fresh OS or new to NEURON
Category 3Mixed/incomplete installation⚠️ NEURON or Python is partially installed

⚠️ CRITICAL: If you're in Category 3 (mixed environment), DO NOT attempt to patch your installation. Follow the clean installation process - it's faster and more reliable.

2.1.3 System Requirements

Minimum:

2.2 Category 1 - Existing NEURON + Python Users

(Experienced users with a working environment)

2.2.1 Who belongs here?

You are in Category 1 if ALL of the following are true:

If any of these are false, go to Category 2 or Category 3.

2.2.2 Step 1: Download BrainCell

All Platforms

Windows:

C:\braincell

macOS/Linux:

~/braincell

Windows:

macOS:

xattr -d com.apple.quarantine ~/Downloads/cloudpackage-v1.zip

Linux:

2.2.3 Step 2: Compile NEURON Mechanisms (If Needed)

⚠️ Only perform this step if:

Windows

Double-click:

build_mechs.bat

If compilation fails: Install Microsoft C++ Build Tools (x64) from: https://visualstudio.microsoft.com/downloads/ (scroll to "Build Tools for Visual Studio")

Then run build_mechs.bat again.

macOS

Open Terminal in the BrainCell directory and run:

chmod +x build_mechs.sh
./build_mechs.sh

If compilation fails: Install Xcode Command Line Tools:

xcode-select --install

Linux

Open Terminal in the BrainCell directory and run:

chmod +x build_mechs.sh
./build_mechs.sh

If compilation fails: Install build essentials:

Ubuntu/Debian:

sudo apt-get update
sudo apt-get install build-essential

Fedora/RHEL:

sudo dnf install gcc gcc-c++ make

2.2.4 Step 3: Platform-Specific Setup

Windows: Unblock Scripts

Right-click each of the following files → Properties → Check "Unblock" → Apply:

init.bat

If Windows blocks execution:

Open PowerShell and run:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

macOS: Make Scripts Executable

Open Terminal in the BrainCell directory:

chmod +x init.sh
chmod +x build_mechs.sh

Linux: Make Scripts Executable

Open Terminal in the BrainCell directory:

chmod +x init.sh
chmod +x build_mechs.sh

Step 4: Launch BrainCell

Windows

Double-click:

init.bat

macOS/Linux

Open Terminal in the BrainCell directory and run:

./init.sh

Or, using NEURON directly:

nrngui init.hoc

Verification

After launch, you should see:

If you see this, installation is complete!

2.3 Category 2 - Clean System Installation

(No NEURON or Python installed)

2.3.1 Who belongs here?

You are in Category 2 if:

Typical users: New users, fresh installations, dedicated simulation machines

For reliable operation across all platforms:

Discussion and updates: https://forum.neuroalgebra.net/viewtopic.php?p=171#p171

2.3.3 Step 1: Install Anaconda

Windows

macOS

conda --version
python --version
echo 'export PATH="$HOME/anaconda3/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

(Use ~/.bash_profile if you're using bash instead of zsh)

Linux

wget https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh
bash Anaconda3-2023.09-0-Linux-x86_64.sh
source ~/.bashrc
conda --version
python --version

2.3.4 Step 2: Install NEURON

Windows

nrniv -python

You should see the NEURON prompt. Type quit() to exit.

macOS

nrniv -python

If not recognized, add to PATH in ~/.zshrc (or ~/.bash_profile):

export PATH="/Applications/NEURON/nrn/x86_64/bin:$PATH"

Then reload:

source ~/.zshrc

Linux

Ubuntu/Debian:

sudo apt-get update
sudo apt-get install neuron

Or compile from source:

sudo apt-get install build-essential libncurses-dev libreadline-dev \
                     libx11-dev libxt-dev bison flex automake libtool
wget https://github.com/neuronsimulator/nrn/releases/download/8.2.2/nrn-8.2.2.tar.gz
tar -xzf nrn-8.2.2.tar.gz
cd nrn-8.2.2
./configure --prefix=$HOME/neuron --with-nrnpython=python3
make
make install
export PATH="$HOME/neuron/x86_64/bin:$PATH"
export PYTHONPATH="$HOME/neuron/lib/python:$PYTHONPATH"
source ~/.bashrc
nrniv -python

2.3.5 Step 3: Download and Setup BrainCell

Follow the same steps as Category 1, Steps 1-3 for your platform.

2.3.6 Step 4: Compile Mechanisms

Run the build script for your platform (see Category 1, Step 2).

For clean installations, this step is usually required to compile the included mechanism files.

2.3.7 Step 5: Launch BrainCell

Follow Category 1, Step 4 for your platform.

Verification

You should see:

Installation complete!

2.4 Category 3 - Mixed or Incomplete Environment

⚠️ CRITICAL: Most Common Failure Scenario

2.4.1 Who belongs here?

You are in Category 3 if ANY of the following apply:

This is the most common cause of installation problems.

2.4.2 ⚠️ CRITICAL RECOMMENDATION

DO NOT:

DO THIS INSTEAD:

Follow the clean installation process below.

Clean installation is faster and more reliable than troubleshooting mixed environments.

2.4.3 Clean Installation Process

2.4.3.1 🛑 Step 1: Remove ALL Existing Installations (CRITICAL)

This step is mandatory. Skipping it will cause problems.

2.4.3.2 Windows

2.4.3.3 macOS

rm -rf ~/anaconda3
rm -rf ~/.conda
sudo rm -rf /Applications/NEURON
rm -rf ~/neuron

Edit ~/.zshrc (or ~/.bash_profile):

nano ~/.zshrc

Remove lines containing "anaconda", "conda", "neuron", or "nrn"

Save and reload:

source ~/.zshrc

2.4.3.4 Linux

rm -rf ~/anaconda3
rm -rf ~/.conda

If installed via package manager:

# Ubuntu/Debian
sudo apt-get remove --purge neuron
sudo apt-get autoremove
# Fedora
sudo dnf remove neuron

If compiled from source:

rm -rf ~/neuron

Edit ~/.bashrc:

nano ~/.bashrc

Remove lines containing "anaconda", "conda", "neuron", or "nrn"

Save and reload:

source ~/.bashrc

2.4.3.5 Step 2: Verify Clean System

Open a new terminal/command prompt and verify these commands fail:

python --version    # Should fail or show system Python only
conda --version     # Should fail
nrniv              # Should fail

If any of these work, you haven't fully removed the installations. Return to Step 1.

2.4.3.6 Step 3: Fresh Installation

Now follow Category 2 (Clean System Installation) exactly as written for your platform.

Install in this exact order:

2.5 Advanced Option: Dedicated User Account (Optional)

For the cleanest possible environment, create a new OS user account:

Windows

macOS

Linux

sudo adduser braincell
sudo usermod -aG sudo braincell
su - braincell

Then follow Category 2 installation steps.

2.6 Troubleshooting

2.6.1 Common Issues & Solutions

2.6.1.1 Issue: BrainCell doesn't start

Windows

Symptoms: Double-clicking init.bat does nothing, or window closes immediately

Solutions:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
cd C:\braincellinit.bat

Check for error messages

macOS/Linux

Symptoms: Script doesn't execute or permission denied

Solutions:

chmod +x init.sh
./init.sh

2.6.1.2 Issue: Mechanisms fail to compile

Windows

Solution: Install Microsoft C++ Build Tools

macOS

Solution: Install Xcode Command Line Tools

xcode-select --install

Linux

Solution: Install build tools

Ubuntu/Debian:

sudo apt-get update
sudo apt-get install build-essential

Fedora:

sudo dnf install gcc gcc-c++ make

Issue: NEURON can't find Python

Symptom: NEURON launches but Python commands fail

Platform: All

Solutions:

python --version
nrniv -python>>> import sys>>> print(sys.version)>>> quit()

If still failing: Go to Category 3 and perform clean installation

Issue: "Module not found" errors

Symptom: Python import errors when running BrainCell

Solutions:

which python     # macOS/Linux
where python     # Windows

Should point to Anaconda directory

conda install numpy matplotlib scipy
python -c "import neuron; print(neuron.__version__)"

2.6.1.3 Issue: Permission errors (macOS/Linux)

Symptom: "Permission denied" when running scripts

Solutions:

chmod +x *.sh *.hoc
ls -la

Files should be owned by your user, not root

sudo chown -R $USER:$USER ~/braincell

2.7 Platform-Specific Issues

macOS: Apple Silicon (M1/M2/M3) Compatibility

If BrainCell doesn't work on Apple Silicon:

softwareupdate --install-rosetta
arch -x86_64 python

Linux: Missing GUI libraries

Symptom: NEURON starts but no GUI appears

Solution: Install X11 libraries

Ubuntu/Debian:

sudo apt-get install libx11-dev libxt-dev

Fedora:

sudo dnf install libX11-devel libXt-devel

2.8 Getting Help

If you're still experiencing issues:

Forum support typically responds within 24-48 hours.

2.9 Appendix: Command Reference

Quick Commands by Platform

Windows

# Check Python
python --version
# Check Anaconda
conda --version
# Check NEURON
nrniv -python
# Launch BrainCell
cd C:\braincell
init.bat

macOS/Linux

# Check Python
python --version
# Check Anaconda
conda --version
# Check NEURON
nrniv -python
# Launch BrainCell
cd ~/braincell
./init.sh

2.10 Summary Flowchart

START
  ├─ Do you have NEURON + Python working? ──YES──> Category 1
  │                                                   (Quick setup)
  NO
  ├─ Is your system clean (nothing installed)? ──YES──> Category 2
  │                                                       (Fresh install)
  NO
  └─ Mixed/partial installation? ──YES──> Category 3
                                           (Clean & reinstall)

Version: 2.0 Last Updated: January 2026 Platforms: Windows 10/11, macOS 10.15+, Linux (Ubuntu 20.04+) Feedback: https://forum.neuroalgebra.net


Experimental Data or Approximations Needed to Build a Realistic Cell Model

To create a biologically meaningful cell in BrainCell, gather the following data (or use reasonable estimates):

GETTING STARTED

4.1 Launching BrainCell

Figure 1. Download and installation overview. (a) Screenshot of the BrainCell download page on Neuroalgebra.net. (b) Example folder structure of the BrainCell 1.0 package on the host computer.

4.1.1 Starting BrainCell

Figure 2. Introductory menu of BrainCell 2.0 showing the Simulation Cell Configuration panel with options for Astrocyte or Neuron mode, and loading methods (Base Geometry, BrainCell Export, External Simulations).


4.2 Simulation Cell Configuration

When the program starts, you can choose the cell type and how to load its model:

Select the option that matches your workflow to proceed.


Astro/ Base. Setting up and running BRAINCELL: Astrocyte configuration.

5.1 Generate astocyte morphology.

FigureFigureFigure
Figure 1

5.1.1 Launching Astrocyte model

Figure 3. Astrocyte module control windows opened by the initialisation file init.hoc. (A) Command Console showing the loading of NEURON mechanisms. (B) Astrocyte Model Panel for selecting and loading predefined astrocyte geometries (basic or dendrite–soma combined). (C) Parameter Panel for setting nanoscopic morphology parameters - “Max number of stalks” and “Number of leaves.”

When you start BrainCell in Astrocyte mode, NEURON automatically opens three control windows that work together to initialise and configure the model (Figure 3):

5.1.2 Generating or Downloading the Astrocyte Stem Tree

To build a new astrocyte model, you first need to define the basic dendritic (stem) tree structure. BrainCell offers several ways to do this:

5.1.3 Option 1 - Select library stem tree from NeuroMorpho.org

Click “Select Library Stem Tree” to import an existing 3D reconstruction of an astrocyte. You can use files in general .zip, .hoc, or .swc formats obtained from the NeuroMorpho.org database. It is recommended to store these files in the directory: ...\Geometry\Astrocyte\New Style for easier access.

.

FigureFigure
Figure 2

Figure 4. Importing a 3D astrocyte structure. (A) Example from the NeuroMorpho.org webpage displaying a 3D cell reconstruction. (B) BrainCell operational panels for selecting astrocyte morphology..

5.1.4 Option 2 - Load from local directory

Alternatively, choose a file from your local BrainCell installation folder: ...\BrainCell\Geometry\ Files can be in SWC or HOC format.

To view a 3D structure:

If you change your mind, you can reselect a file at any time - simply click “Select Library Stem Tree” again or choose “Select Stem Tree with Endfoot.” When satisfied, click “Start Astro.” ⚠️ After pressing “Start Astro,” the setup will lock in and cannot be reversed.

5.1.5 Option 3 - Load reconstructed or endfoot-enhanced tree

Selecting “Select Stem Tree with Endfoot” opens a pop-up window (see Fig. 5B) for editing endfoot geometry. Here, you can define the morphology of both main and secondary endfoot branches and assign local biophysical mechanisms.

The option “Select reconstructed stem tree” loads a detailed 3D reconstruction (for example, RealAstrocyteSkeleton1.hoc in the ...\Geometry\ directory). This model represents a CA1 astrocyte skeleton reconstructed using the Vaa3D software (Allen Institute, available at vaa3d.org). The corresponding window (Fig. 5) provides tools for scaling and centring the structure at the coordinate origin, simplifying alignment and compartment placement. Adjustable parameters include:

💡 Note: In all cases, BrainCell will prompt you to locate the appropriate geometry file. Ensure that required 3D data have been downloaded in advance from NeuroMorpho.org.

5.1.6 Option 4 - Add nano-neometry to astrocytic tree

After defining the 3D stem structure, you can enrich the model with nanoscopic astrocytic processes. To do so:

BrainCell will then generate nanostructures randomly, following physiological constraints derived from experimental morphometric statistics. When learning the software, we recommend using “Start Astro” to familiarise yourself with its features and workflow.

5.2 Finalising and Preparing the Astrocyte Geometry

We recommend pressing the “Start Astro” key when first becoming familiar with the BrainCell software. This option automatically loads the selected geometry and initiates all relevant setup panels, allowing you to explore and understand the program’s functionality and available features.

.

FigureFigureFigureFigureFigure
Figure 3

Figure 5. Operational panels for creating and editing astroglial morphology in BrainCell.

(A) File Navigation Panel - lists available .hoc files that define 3D astrocytic structures within the user’s directory. (B) Endfoot Geometry Panel - enables editing of astrocyte endfeet and adding associated biophysical mechanisms. (C) 3D Export Panel - provides tools for exporting the constructed 3D astrocyte model for later analysis or integration with other simulations. (D) Morphology Transformation Panel - allows for precise scaling and spatial shifting of the 3D shape, which is essential for accurate astroglial morphology adjustments.

Note: Before proceeding to additional model design steps, ensure that the cell stem tree geometry has been successfully uploaded to the designated GEOMETRY directory.


Generating astroglial morphology on the nanoscale

6.1 The geometry of nanoscopic processes

Figure
Figure 4

Once the stem tree has been loaded, the next step is to define the astrocyte's nanostructure. A popup window (highlighted in yellow) offers two options:

Option 1 - Load Default Nano-Geometry

Press “Diameter Distribution for Nano-Geometry.” This loads a pre-computed file containing diameter statistics generated by the Nano (Geometry) module from sampled 3D-reconstructed astroglial processes. By default, BrainCell imports the file testshape.dat_radii_dist.txt which represents the distribution of process diameters measured in the CA1 stratum radiatum. After loading, press “Start Astro.”

Option 2 - Generate Nano-Geometry Automatically

Press “Start Astro” without selecting an external file. In this case, BrainCell automatically generates nanoscopic processes using internal algorithms that replicate experimentally observed morphometric trends.

In both cases, you can later adjust key morphometric parameters of the generated nanostructures. Detailed controls for these adjustments are provided in the chapter Simulating Astrocyte Physiology.

6.1.1 Populating astrocyte tree with nanoscopic processes

Pressing “Start Astro” launches the main operational interface - the Repertoire of Computation window - where complete astrocyte morphology is modelled (Figure 6).

FigureFigureFigure
Figure 5

Figure 6. Astrocyte Main Window and configuration panels.

(A) Control Panel: provides detailed settings for fine-tuning astrocyte geometry. (B) Simulated Variable Panel: displays simulated parameters mapped onto the astrocyte morphology (e.g., membrane voltage) and a live digital output plot. (C) Biophysics, Stochastic, and Extracellular Sources Settings: configure the cell’s biophysical properties, stochastic parameters, and extracellular input conditions. (D) Nanostructure Placement: defines where nanostructures are placed - across the entire astrocyte or restricted to specific dendrites. (E) Nanostructure Density Distribution: sets the density pattern of nanostructures (uniform or non-uniform), influencing both spatial coverage and physiological behaviour.

Localising Nano-Geometry

An important control located in the upper-left corner of the main window (Fig. 6A) allows the user to restrict nano-geometry generation to specific dendrites.

Follow these steps:

Note: Localised nano-geometry significantly increases computational load but is valuable for studying highly specific subcellular domains and local signalling dynamics.

6.1.2 Nano-Geometry Configuration Panels

Leaf Geometry Panel (Fig. 6A, top)

Defines the distribution of cylindrical leaf compartments (nanoscopic processes).

When experimental 3D statistics are unavailable, a uniform random distribution can be generated within user-defined lower and upper diameter limits.

Note: This panel is ignored if statistical data from a reconstructed nano-geometry file have already been loaded.

Stalk Geometry Panel (Fig. 6A, middle)

Sets upper and lower limits for stalk cylinder diameters, determining how densely the tissue is populated with transitional nanostructures between the main branches and leaves.

Specific Membrane Conductance Panel

Allows setting of membrane conductance using the control “Gm (mS/cm²)”, accounting for the total surface area of exposed nanostructures.

The default resting membrane potential is –85 mV, as defined in NEURON’s Distributed Mechanism panel.

Dendritic Geometry Panel (Fig. 6A, bottom)

Controls branch diameter scaling , i.e., how dendrite diameter decreases with distance from the soma, according to empirical measurements. The relationship follows:

where

6.1.3 Customising Cell Geometry

The “Edit Biophysics” and “Edit Morphology” options enable rule-based modifications of any morphological or biophysical property as a function of distance from the soma. This feature allows users to construct highly customised cell architectures for specific simulation goals.

Note: These editing panels should be skipped if a fully 3D-reconstructed stem tree has already been imported.

6.1.4 Tissue-filling properties of astroglial morphology

Tissue Volume Filling and Geometrical Parameters

The tissue volume-filling properties and surface-to-volume ratios of nanoscopic processes are determined by their individual shapes and by the effective density of simulated nanostructures, as defined in the previous section.

To monitor these parameters, press the “Geometrical Parameters” key (Figure 7). This command opens several analysis windows that display quantitative characteristics of the generated astrocyte morphology - including total cell volume, surface area, surface-to-volume ratio, and volume-filling fraction within the simulated tissue.

All calculated values are automatically saved to the file: ...\neuronSims\Text results\VolumFraction.txt

Below are the key features of the main window:

The neuron simulation tool's main window provides the necessary features to effectively simulate and analyse neuron behaviour.

6.2 "Geometric parameters" button

The “Geometrical Parameters” button calculates and visualises the principal morphometric characteristics of the modelled astrocyte. When pressed, it generates a series of analytical plots and data windows summarising the cell’s geometry.

FigureFigure
Figure 6

Figure 7. Geometrical analysis panels generated by the “Geometrical Parameters” command. Displayed windows (from top left):

The morphometric characteristics displayed in Figure 7 can be compared directly with experimental data derived from 3D electron microscopy reconstructions or two-photon excitation imaging of astroglia. Such comparison allows users to evaluate any discrepancy and adjust the density or scaling of nanoscopic processes accordingly, using the Stalk Geometry and Dendritic Geometry options (see Figure 6) until the model accurately reproduces measured tissue statistics. These geometric-parameter windows can be accessed at any stage of modelling to verify morphological realism and ensure parameter consistency. Once this step is complete, the astroglial morphology is fully established. Further fine structural tuning - such as for FRAP (fluorescence recovery after photobleaching) experiments - can be performed later, as described in subsequent sections. The model is now ready to simulate astroglial functions using the appropriate membrane and intracellular biophysical mechanisms introduced in the following chapters.

The simulation tool's main window provides the necessary features to simulate and analyse behaviour effectively.


Astrocyte - Loading a Pre-existing Astrocyte Morphology

BrainCell allows users to load previously created astrocyte morphologies that already include nanostructural detail. This feature enables users to continue simulations, analyse existing models, or apply new biophysical mechanisms without redefining geometry.

FigureFigureFigureFigure
Figure 7

Figure 8. Operational panels for loading pre-existing 3D astrocyte structures with nanoscopic detail. (A) Download Panel: provides access to a previously prepared 3D astrocyte morphology. (Visual: an icon representing data download.) (B) Roadmap Panel: lets users choose between creating a new astrocyte (Base) or loading a pre-existing nanostructured model (Nano). (Visual: a roadmap-style diagram branching to both options.) (C) Schematic Illustration Panel: displays a schematic view of the 3D astrocyte morphology, including its nanoscale architecture. (Visual: a simplified 3D diagram showing astrocytic nanostructure.)

7.1 Loading a Pre-existing Astrocyte (“Astro + Nano”)

To open a saved astrocyte model that already includes nano-geometry:

At this stage, you can:

Important: After loading a pre-existing astrocyte model, its geometry cannot be altered. All subsequent operations relate only to simulations, parameter tuning, and mechanism management.:

The neuron simulation tool's main window provides the necessary features to simulate and analyse neuron behaviour effectively.


Neuron mode. Setting up and running BRAINCELL: Neuron module.

8.1 Importing and generating complete neuron morphology

8.1.1 Building a 3D Neuron Model

The Neuron module of BrainCell enables the creation, import, and editing of fully 3D neuronal geometries, independent of the astrocyte module. When you load or create a neuron model, two main interface windows appear:

Allows you to define the maximum number of dendritic spines and modify their geometric characteristics. These parameters can be refined later if required.

To create a new neuron:

FigureFigureFigure
Figure 8

Figure 9. Import, selection, and finalisation of a 3D neuronal structure. (A) Cell Structure Definition Panel: defines the soma, dendrites, and axon. Future updates will support custom naming of geometry and dendritic subgrouping. (B) Cell Shape Selection Panel: provides options to choose or modify the desired neuron morphology. (C) Spine Density Control Panel: adjusts the maximum spine density per dendrite (noting that thicker dendrites generally host fewer spines). Future versions will support continuous spine-density editing.

Workflow Summary (Fig. 9):

To explore different neuron shapes, simply repeat the import and selection steps. When satisfied with the current morphology, click “Use this one” to confirm.

After confirmation, BrainCell opens the main Neuron Editor window, where you can:

This workflow enables the construction of realistic, fully customisable neuronal models ready for advanced simulation.


Navigating Neuron Simulation: Exploring Main Windows for Enhanced Analysis

BrainCell provides a powerful and intuitive environment for customising and analysing neuronal geometry and biophysical properties. Users can define how structural and functional components are grouped or divided during model setup:

In the main window (Figure 10), you can modify the neuron’s geometry, apply and test various biophysical mechanisms, and explore how these structural and functional choices influence neuronal behaviour.

.

Figure
Figure 9

Figure 10. Main window for neuron simulation. The main simulation interface provides all tools required to configure, simulate, and analyse neuronal behaviour.

Key Features of the Main Neuron Window

Myelinated Axon (SimMyelinatedAxon) is the most fully featured neuronal simulation. It models action potential propagation along an axon whose geometry can be imported from a morphology file, drawn by hand in the GUI, or set to a built-in predefined shape. The myelin sheath can be deployed, scalped, or removed entirely, and the simulation tracks how each configuration affects conduction velocity and ionic dynamics. Real-time graphs display membrane voltage at three points along the axon, K⁺ equilibrium potential, ionic currents, and ion concentrations as functions of both time and distance. A dedicated inside-out radial diffusion engine (using NEURON's RxD system) computes K⁺ accumulation in the periaxonal space between the axon and Schwann cells across multiple concentric shells, applying Dirichlet boundary conditions at the nodes of Ranvier and zero-flux conditions under the myelin.

Voltage CA1 Neuron (SimVoltageCA1Neuron) is a dedicated neuronal simulation for CA1 pyramidal cell electrophysiology, allowing exploration of dendritic integration and somatic firing patterns in a morphologically realistic neuron.

Calcium Dynamics (SimCalciumDynamics, astrocyte) simulates intracellular Ca²⁺ and IP₃ signalling within astrocyte morphologies, driven by the cadifus.mod kinetic scheme which couples IP₃ receptor gating, Ca²⁺ diffusion across radial annuli, and mobile/immobile buffer interactions.

Calcium Wave (SimCalciumWave) models the propagation of intercellular Ca²⁺ waves, using configurable initial calcium parameters to explore the spatiotemporal spread of calcium signals through coupled compartments.

Glutamate (SimGlutamate) simulates glutamate dynamics including uptake via the electrogenic astrocytic transporter (GluTrans.mod), iterating concentration and current variables across the cell morphology at each time step.

Potassium (SimPotassium) simulates extracellular K⁺ accumulation and clearance, iterating K⁺ fluxes and concentrations across compartments to study spatial buffering by astrocytes and the Na⁺/K⁺-ATPase pump (nkpump.mod).

Spatial Voltage Distributions (SimSpatialVoltageDistributions) maps steady-state and time-varying membrane potential distributions across the full cell morphology, useful for studying dendritic filtering and the spatial decay of synaptic inputs.

Constant Electrical Simulations (SimConstantElectricalSimulations) applies fixed-amplitude stimulation protocols to characterise passive and active membrane properties under controlled, time-invariant input conditions.

Frequency-Domain Electrical Simulation (SimFrequencyElectricalSimulation) analyses the cell's impedance and voltage transfer properties by driving the membrane with sinusoidal inputs across a range of frequencies, enabling resonance and filtering analysis.

FRAP - Cylinder / Plane / Sphere (SimFrapCylinder, SimFrapPlane, SimFrapSphere) simulate Fluorescence Recovery After Photobleaching experiments in three geometric configurations. Each simulation sets an initial bleached concentration profile (circular, planar, or spherical), then evolves the diffusion of a fluorescent species via FRAP.mod to recover the apparent diffusion coefficient from the recovery kinetics.

Outside-In Diffusion (SimOutsideInDiffusion) models the influx of extracellular species into the cell, using the outside-in diffusion engine and range variable history recording to track how extracellular sources (configurable via the Extracellular Manager) drive intracellular concentration changes over time.

Local Field Potential (SimLocalFieldPotential) computes the extracellular field potential generated by the simulated cell at one or more virtual electrode positions. It uses LFPCalculator.py to sum transmembrane currents weighted by the electrode–segment distance geometry, producing estimates of the LFP waveform that can be compared to electrophysiology recordings.

User Simulation is a template-based entry point that allows users to define and integrate their own custom simulation project directly into the SimManager framework. Rather than modifying BrainCell's built-in simulations, a user places their own Python simulation class - derived from the Simulation abstract base class defined in SimABCs.py - inside a dedicated folder under _Code/Simulations/Sims/. The simulation folder is registered with SimManager by adding it to sys.path via sourcePythonCode, after which SimManager instantiates the class and presents it alongside the built-in simulations. This mechanism gives user-defined simulations full access to BrainCell's loaded cell geometry, biophysics presets, Manager infrastructure, and GUI primitives, while keeping the custom code entirely separate from the core codebase and maintaining backward compatibility.

10 Customising Neuronal Connectivity: Spine Set Configuration.

10.1 Configuring Spine Sets

BrainCell lets you create and customise dendritic spines - the tiny protrusions where neurons form synapses. This feature helps you build realistic models and control how spines affect electrical and biochemical properties.

With the Spine Sets tool, you can:

10.2 How to Use the Spine Sets Feature

Figure
Figure 10

Figure 11a. The panel displayed is used to manage spine seeding.

The left panel - Manager of Spine Seeding - lists all existing spine sets and lets you:

The right panel - Spine Locations (all sets) - shows a visual map of spine positions along the dendritic tree, with the currently selected set highlighted.

Using these tools, you can add or adjust the nano-geometry of spines and explore how structural changes affect neuronal behaviour.

10.3 The editing of spine locations.

Figure
Figure 11

Figure 11b. Panels for managing the spatial distribution of spine seeds.

10.4 Spine Seeding Panels

Left Panel - Single Spine Set

Right Panel - Seeded Dendrite(s)

10.5 Panel “Where to Seed the Nanostructures”

The Spine Sets configuration system thus provides an integrated framework for shaping neuronal connectivity at the nanoscale, enabling BrainCell users to model realistic dendritic structures and study how spine organisation impacts synaptic processing and network behaviour.


10.6 The spine, head and neck geometry. Location over dendritic tree.

This part explains how to use the tool to analyse the geometry distribution of dendritic spines (Fig.12). The panel provides two distribution options, regular and uniform, allowing the user to set numerical parameters for each distribution via a window upon selection. The tool also considers the minimum distance between synapses in a dendritic tree as an essential parameter for synapse distribution.

FigureFigureFigure
Figure 12

Figure 12. Spine Geometry Modification Panel

10.7 Configuring Spine Distributions

10.7.1 1. Selecting a Distribution Type

To begin, choose how spines will be distributed along dendrites. Two options are available:

Select your preferred type by clicking the corresponding button (Fig. 12). A parameter window will appear, where you can enter the numerical settings for the chosen distribution.

10.7.2 2. Using Pre-Defined Distribution Types

For convenience, BrainCell includes experiment-based spine geometry templates from: Tønnesen J., Katona G., Rózsa B., et al. Spine neck plasticity regulates the compartmentalisation of synapses. Nat Neurosci 17, 678–685 (2014). https://doi.org/10.1038/nn.3682.

Click the corresponding button on the panel to load one of these pre-established distributions. The tool will automatically apply published experimental parameters for the selected type.

10.7.3 3. Adjusting Spine Complexity

You can control the complexity (number of segments) used to model each spine:

10.7.4 4. Defining Synapse Distance

Synapse spacing is critical for realistic models. BrainCell lets you:

This allows both randomised and user-defined spacing for fine-grained control.

10.7.5 Summary spine geometry and synapse placement

This tool gives full control over spine geometry and synapse placement.


11 Neuron mode. Download previously created neuron model.

The combination "Neuron + Nano” creates a new panel. Once the panel appears, you can proceed with the following steps and open the NEURON Basic Panel to locate the previously prepared Neuron with Nanostructure. To proceed with the simulation and management of biophysical mechanisms, select the neuron with Nanostructure in hoc-file. This will take you to a new option for simulation and management (see Fig.13).

Note: At this stage, you cannot modify the geometry.

Figure
Figure 13

Figure 13: Left: The "Alternative Run Control" panel is designed to initialise and run simulations with specific settings like initial membrane voltage, run time, and integration step size, including options for continuous or single-step simulation. It emphasises using this customised run control to maintain the defined stochasticity models.

Right: The "Repertoire of Computation" panel, referred to as "Previously created Neuron morphology ", appears to be a visualisation and simulation panel. It has sections for editing cell biophysics, gap junctions, synapses, and extracellular sources, as well as a range of simulation categories such as voltage, electric stimuli, and ion-specific dynamics. The panel also warns about integrating custom biophysics mechanisms into the simulation.


12 Manager of biophysical mechanisms.

The Manager of Biophysical Mechanisms lets you add, edit, and organise biophysical mechanisms within your neuron model to study their effect on neuronal behaviour.

Click the “Manage the Distance of Mechanisms” button in the upper-right corner of the main window (Fig. 10 . Main Window). This opens two main panels (Fig. 14):

12.1 Cell Compartments & Mechanisms

This panel provides tools for editing compartments and managing mechanisms:

These features let you customise the cell’s structural regions, integrate additional mechanisms, and keep a reusable library for future simulations.

FigureFigure
Figure 14

Figure 14. Panels for Managing Biophysical Mechanisms

A - Distributed Mechanisms Manager This panel lets users organise and edit the distribution of biophysical mechanisms across cell compartments. You can add or split regions, scan existing areas for their assigned mechanisms, adjust spatial distributions, and export or import mechanism sets for reuse in other models.

B - Area-Centric Mechanism List Shows all mechanisms available for the currently selected cell area. Use this view when you want to see which mechanisms are present in a particular compartment and add or remove them as needed.

C - Mechanism-Centric Area List Shows all cell areas associated with the currently selected mechanism. Use this view when you want to see where a given mechanism is applied and edit its distribution across compartments.

Use the Apply button to confirm additions or removals. The toggle button at the bottom switches between the area-centric (B) and mechanism-centric (C) views, providing a flexible way to manage mechanism placement and distribution.

12.2 Managing Mechanisms and Cell Parts

Windows B and C give you full control over biophysical mechanisms and the structural organisation of your neuron model.

12.2.1 1. Mechanism Management

12.2.2 2. Two Display Modes

12.2.3 3. Selecting Mechanisms

12.2.4 4. Cell-Part Operations

12.2.5 5. Mechanism Interaction & Advanced Tools

Windows B and C provide a powerful, visual way to edit cell parts and mechanisms, making it easier to customise, analyse, and refine your neuron model for accurate simulation results.

12.3 Split, Merge and Remain option.

12.4 Splitting Cell Compartments

The Split function in BrainCell lets you divide any part of a cell into multiple sub-compartments, give them custom names, and assign different biophysical mechanisms to each. This is especially useful when you want to model distinct properties within a single region (e.g., dividing a dendrite into sections with different ion channel densities).

12.4.1 Steps to Split a Compartment

This feature allows you to model fine-grained, localised cellular behaviour. For example, you can divide a single dendrite into over 150 segments, giving each its own electrical or synaptic properties to match experimental data or test specific hypotheses.

FigureFigureFigure
Figure 15

12.5 Merging Cell Compartments

The Merge function lets you combine two or more compartments into a single region. This is useful when you want to simplify a model, reduce the number of compartments, or make several regions share the same biophysical mechanisms.

Steps to Merge Compartments:

Figure
Figure 16

12.5.1 Notes on Merging

12.6 Renaming Cell Compartments

The Rename function allows you to assign custom names to existing compartments, making models easier to navigate and understand. This is especially helpful when compartments represent specific functional or anatomical regions.

Figure
Figure 17

12.6.1 Steps to Rename a Compartment

12.6.2 Notes about compartment


13 Adjust the spatial distribution of biophysical mechanisms.

The panel (Figure 15) adjusts the spatial distribution of the mechanism across any part of the cell, allowing the user different options to define the mathematical formula for the spatial distribution.

FigureFigureFigureFigure
Figure 18

13.1 Synapse distribution.

The tool facilitates the addition and distribution of different types of synapses on the dendritic tree, enabling the study of the neuron's connectivity and behaviour.

Figure 15: Panels for adding spatial properties to biophysical mechanisms in a cell. A) Mechanism Selection Panel: Users can select a biophysical mechanism and choose to modify its spatial. B) Spatial Property Definition Panel: Users can define the spatial properties of the selected parameters or variables. C) Examples Panel: Displays examples of the types of parameters and variables that can be modified for each biophysical mechanism. D) Spatial Model Activation Panel: Users can enable the spatial properties of the selected parameter or variable by pressing the "Define as a function " button.

13.1.1 Main Interface for Editing Biophysical Mechanisms

The main interface (Fig. 15A) provides a central view of the neuron, with each segment (soma, dendrites, axon, etc.) shown in its own panel. Within each segment’s panel, you can see and manage all the biophysical mechanisms assigned to that region.

13.1.1.1 Editing a Mechanism

This interface provides direct, visual control over each neuron part and its mechanisms, enabling precise customisation of electrical and biophysical properties.

In the Heterogeneity Editor, you can define the variable as a function of distance. This allows you to customise the properties of the variable based on the spatial location. Once you've described it, you can save your changes (by clicking the Apply button) and edit other mechanisms.

13.1.2 Spatial Inhomogeneity of Biophysical Mechanisms Editor.

The Heterogeneity Editor (Fig. 15B) lets you define how a mechanism’s properties vary across different segments of a neuron.

The window is divided into three main areas:

For example:

13.1.3 Spatial Inhomogeneity Specification

BrainCell lets you define how a biophysical mechanism varies across different parts of the neuron. This is done in the central panel of the Heterogeneity Editor, which provides five modes for setting spatial inhomogeneity.

13.1.3.1 Modes for Specifying Spatial Inhomogeneity

13.1.4 Visualising Spatial Heterogeneity

At the bottom of the panel, you can choose how to visualise heterogeneity:

These visualisation tools help you verify and refine the spatial variation of your chosen mechanism.


14 Adjust the stochastic distribution of mechanisms.

The central panel (Figure 16) adjusts the mechanism's stochastic properties across any part of the cell, allowing the user to define the mathematical formula for the stochastic distribution using different options.

FigureFigureFigureFigure
Figure 19

Figure 16: Panels for adding stochastic properties to biophysical mechanisms in a cell. A) Mechanism Selection Panel: Users can select a biophysical mechanism and choose to modify its stochastic properties.

B) Stochastic Property Definition Panel: Users can define the stochastic properties of the selected mechanism's parameters or variables.

C) Examples Panel: This panel displays examples of the types of parameters and variables that can be modified for each biophysical mechanism.

D) Stochastic Model Activation Panel: Users can enable the stochastic properties of the selected parameter or variable by pressing the "Define stochastic model" button.

To begin editing any mechanism, click on it. This will bring up a menu where you can select what you want to edit. The menu includes options for global variables, state variables, and parameters. You can access another window that provides more detailed information about the selected variable by clicking on any of these options.

In the new window, you'll see the current value of the variable if it's spatially homogeneous and “nan” is spatial non–uniform. To make this mechanism stochastic, click the "Define as a stochastic model" bar. Doing this will open a new window called the Stochasticity Editor.


14.1 Stochasticity Editor

The Stochasticity Editor lets you define how a variable behaves as a stochastic (random) function over time. You can choose from built-in noise models, import your own, or use experimental data to describe variability. Once defined, you can save the settings and continue editing other mechanisms.

The window has four main sections:

14.1.1 1. Upper Panel - Variable Information & Bounds

14.1.2 2. Stochastic Model

Choose the type of stochasticity and its distribution:

14.1.3 3. Visualisation & Modelling

Tools to explore the selected stochastic model:

14.1.4 4. Apply or Disable

Note: Stochastic dynamics can be run and tested using the special run control panel “AltRunControl” provided by BrainCell.


15 Manager of synapses.

The following information is vital for those who wish to create synaptic inputs.

Figure
Figure 20

Figure 17. The Synaptic Simulations. A) Panel of Alternative Run Simulation for Stochastic Variables: The panel demonstrate alternative run simulations for stochastic variables within the synaptic environment. B) Panel of Manager of Synaptic and Presynaptic Mechanisms: The manager acts as a central control system, orchestrating the interactions between different synaptic elements and ensuring efficient communication within the neural network (Details in the text).

15.1 Synaptic Panel

The Synaptic Panel (Fig. 17B) allows you to create and distribute synaptic inputs across a neuron’s dendritic tree. The number of synapses is automatically matched to the number of spines defined in the main geometry panel (Fig. 10).

⚠️ Important: You cannot change the number of synapses here - adjust spine number and density in the main panel instead.

What you can do in this panel:

Functional effect:

💡 To include synaptic release probability in your simulation, enable stochasticity via AltRunControl and check “Enable stochasticity.”

15.1.1 Layout of the Synaptic Panel

The panel is divided into three main sections:

This panel is designed to help you understand and fine-tune synaptic organisation and function in your neuron model.

15.1.2 Synaptic manager “upper part”.

The information section in the upper portion of the panel is where you can find valuable data about the synapses on the dendritic tree. This section will indicate the number of synapses distributed throughout the dendritic tree, including the spatial range and whether the parameters are spatially homogeneous. Additionally, it will provide you with stochastic variables of its parameters, which is crucial for understanding the behaviour of the synapses.

To change the location of the synapses on spines or dendrites, use the tools located in the upper right portion of the panel. By manipulating these tools, you can adjust the position of the synapses to your desired location.

The “Synapse location” button opens a pop-up panel (Fig.18A).

FigureFigureFigure
Figure 21

Figure 18: Pop-Up Panels of Synaptic Manager. A) shows the synaptic location manager, allowing users to visualise the spatial distribution of synapses. B) displays the manager of presynaptic signals, which provides information about the presynaptic neuron's activity. C) presents the manager of synaptic parameters, where users can modify synaptic properties such as strength and plasticity. D) shows the manager of presynaptic and postsynaptic mechanisms, located in the mechanism directory, which enables users to customise the synaptic transmission and reception mechanisms.

15.2 Synapse Location Panel

The Synapse Location panel (Fig. 18A) is divided into two main sections: Upper and Lower.

15.2.1 Upper Part - Choosing Synapse Placement

Here you can decide how synapses are positioned relative to spines and dendrites. Three placement options are available:

Select the option that best fits your simulation. The software will automatically adjust the synapse locations.

15.2.2 Lower Part - Information & Actions

This panel makes it easy to experiment with different synapse placement strategies and immediately check how they affect your neuron model.

15.3 Synaptic Structure - Synaptic Manager (Top Part)

The top section of the Synaptic Manager (Fig. 18B) lets you define the type of synaptic connections in your neuron model.

BrainCell supports two types of synapses:

Select the desired synapse type in the top panel. The chosen structure will appear in the middle section of the Synaptic Manager for further editing.

⚠️ Note: The “probability of release” parameter is not available when using the presynaptic-only configuration (Source PP → NetCon → Target PP → Section).

15.4 Synaptic Manager - Middle & Bottom Sections

The middle section of the Synaptic Manager (Fig. 18B) is designed to let you organise and configure presynaptic and postsynaptic mechanisms with full control over their parameters.

15.5 Middle Section - Presynaptic & Postsynaptic Mechanisms

Note: In Source PP → Section mode, you can also add other point mechanisms such as electrodes (potential clamp), external current injections, or any localised current/potential changes supported by NEURON.

15.6 Bottom Section - NetCon & Advanced Controls

The bottom section manages the NetCon connection between presynaptic and synaptic mechanisms.

This combined interface gives you full control over synapse type, spatial distribution, mechanism parameters, and stochastic behaviour, enabling highly customised synaptic modelling.


16 Spatially - non-uniform sources of extracellular ions.

This section provides detailed instructions for organising the calculation of ion concentration near a model cell in BrainCell, regardless of the concentration source.

Main Panel Functions:

FigureThe main panel features two key buttons: Extracellular -> cell diffusion and Cell -> extracellular Diffusion.

These features allow for comprehensive modelling and simulation of ion concentration changes around a model cell, providing insights into both external and cell-released ion dynamics.

The " Neuron " software starts with a uniform distribution of extracellular ions. Still, sometimes researchers need to study the specific spatiotemporal dynamics of these ions, including different types, neurotransmitters, and neuromodulators. To help with this, BRAINCELL has added a feature Figurethat lets users create different scenarios for ion dynamics. To access this feature, look for the option in the upper right corner of the main panel and select it. This will take you to the extracellular ion distribution editor. It's important to remember that using this editor doesn't account for the potential effects of neuron feedback on ion concentrations.

However, it allows researchers to conduct more detailed investigations into ion dynamics, leading to a better understanding of how neurons behave and interact in the extracellular environment.

16.1 Ion Concentration Modelling

BrainCell includes tools to simulate ion concentration dynamics around a model cell, whether ions originate outside the cell or are released from it.

Cell - > extracellular Diffusion The main panel provides two key options:

Figure
Figure 22

16.1.1 1. Extracellular -> cell diffusion

Simulates how external ion sources affect the cell.

Steps:

16.1.2 2. Cell -> extracellular Diffusion

Simulates ion release from the cell and its spread into the extracellular space.

Steps:

These features let you create custom extracellular ion scenarios, going beyond NEURON’s default uniform ion distribution. You can model the dynamics of ions, neurotransmitters, or neuromodulators to study their local effects.

⚠️ Important: The extracellular ion editor does not account for feedback from the neuron itself on ion concentration changes. It is intended for controlled investigations of ion dynamics rather than full bidirectional coupling.

16.1 Extracellular -> cell diffusion

The Extracellular -> cell diffusion (Figure 19) is a tool for simulating extracellular ion dynamics release by external courses. This chapter will guide you through its key features and how to use them effectively.

FigureFigureFigure
Figure 23

Fig. 19. External ionic concentration

A) The existing external sources panel is a convenient tool for viewing and managing previously created external sources. Users can select an external source from this list to edit or delete it.

B) The external source creation panel allows users to design software using three templates: point single release, point constant diffusion, and spherical area of concentration. Users can specify the location and properties of the external source.

C) The visual graphical panel allows users to specify the coordinates and area of an external source by dragging and dropping. Users can also use Shift to specify the radius of the external source.

16.1.1 Extracellular Ion Concentration Editor

The Extracellular Ion Editor lets you precisely control and visualise ion concentrations around the model cell, adapting to complex spatial and temporal scenarios.

16.1.1.1 1. Modifying Ion Concentrations

16.1.1.2 2. Workflow

16.1.2 Panels & Tools

16.1.2.1 Panel A - Extracellular Concentration Changes

16.1.2.2 Panel B - Ion and Concentration Selection

16.1.2.3 Source Shape

16.1.2.4 Source Dynamics

16.1.2.5 Concentration Series

16.1.2.6 Spatial Localisation & Visualisation

16.1.3 Summary extracellular ions

These tools allow you to design complex ion environments, combine multiple sources, and visualise how extracellular ion concentrations evolve over time and space. This helps you explore how neurons interact with their chemical surroundings under different experimental or simulated conditions.

17 Extracellular– intracellular / Intracellular – extracellular diffusion equations

The extracellular diffusion modules simulate how ions or neurotransmitters spread between sources and the surrounding space. BrainCell distinguishes two complementary cases:

The following formalism applies to both; only the sign of the flux differs.

17.1 Fundamental Diffusion Equation

where

For a spherically symmetric point source:

17.2 Instantaneous Point-Source Solution

For a single pulse of total quantity released at and :

This describes how concentration falls off with distance and time.

17.3 On–Off (Time-Limited) Source

For a source active between and :

where is the complementary error function.

For , ; for , diffusion proceeds passively.

17.4 Time-Factor Function

In BrainCell, the temporal profile of a finite-duration release is wrapped into a dimensionless function timeFactor(Δt):

where

This function smoothly approximates a rectangular pulse and avoids numerical discontinuities.

17.5 Combined Expression for Extracellular Concentration

where is the baseline extracellular concentration (mM).

17.6 Parameter Notes

SymbolMeaningTypical value
Diffusion coefficient0.3 µm² ms⁻¹ (for K⁺); 0.5 µm² ms⁻¹ (for Glu)
Released quantityuser-defined
Basal concentration2.5 mM for K⁺, 1.5 mM for Na⁺
Activation windowin ms
Rise/decay time constants10 ms / 200 ms typical
Distance from sourceµm

Summary

These equations define how ions or neurotransmitters diffuse from (or toward) a point or spherical source over time. They are implemented in BrainCell’s diffusion modules (Outside–In)

17.1 Manager of Extracellular Sources Panel

Description: When the user activates the extracellular sources function, the first panel displays all the current ion concentration sources in the neuron cell. Initially, several predefined sources are available but remain inactive until the user manually activates them.

Instructions:

Use these tools to customise the extracellular ion environment around your model cell effectively.

17.1.1 Single Ion Panel

The Single Ion Panel lets you add and configure predefined or custom ions to simulate their dynamics around the model cell.

17.1.2 Predefined Ions

BrainCell includes a library of commonly used ions and molecules:

17.1.3 Creating Custom Ions

You can define new ions or molecules by setting their spatial and temporal properties.

17.1.4 Spatial Distribution

How the ion source is positioned and spreads:

17.1.5 Temporal Dynamics

How ion concentration changes over time:

You can adjust parameters such as start time, release radius, and duration.

17.1.6 3. Global Parameters

17.1.6.1 Positioning Ion Sources

17.1.6.2 Saving Your Ion Setup

18 Cell ion release –> extracellular diffusion

The Inside–Out Diffusion tool simulates how a cell releases ions into the extracellular space and how these ions spread over time. It is designed to give you full control over simulation precision, computational cost, and visualisation.

18.1 1. General Settings

18.2 2. Diffusion Management

18.3 3. Simulation Control

18.4 4. Visualisation Configuration

With these panels, you can run highly detailed extracellular diffusion simulations that reveal how ions move and interact in complex cellular environments. Use the “Read Me” buttons in each section for more detailed feature-specific instructions.

Figure
Figure 24

Figure 20 Cell–Extracellular Diffusion Control Panel (BrainCell module)

The Cell – Extracellular Diffusion Control Panel provides all the tools needed to set up, run, and visualise extracellular ion diffusion simulations in BrainCell.

18.4.1 A. General Settings

18.5 B. Inside–Out Diffusion Manager

18.6 C. AltRunControl Panel

18.7 D. Concentration Visualisation Configuration

💡 Tip: Use the “Read Me” buttons in each section for detailed instructions.

18.8 E. Panel of Neuron extracellular diffusion. We recommend using it for detailed computation.

18.9 Summary extracellular diffusion

These panels work together to let you:

This gives you full flexibility for advanced extracellular ion dynamics modelling.


19 Gap Junctions in BrainCell

19.1 Gap Junction Sets in Astrocytes

BrainCell allows you to configure and manage gap junction sets in astrocytes with full control over their:

Each gap junction set can be individually edited, enabling highly customised astrocyte network simulations.

19.1.1 Interface of Gap junction panel

When you open the Gap Junction feature, you will see two panels:

Figure
Figure 25

Figure 21. Left Panel - Manager of Gap Junction Sets:

A list of existing Gap Junction sets, each potentially with a unique identifier, like "Ext GJs: Chemic / "GapCaExt" indicating a set of 356 Gap Junctions.

Options to add a new set of external or internal Gap Junctions (GJs) with default settings.

Functionality to edit or delete the selected set of Gap Junctions.

A reminder that if the cell geometry is modified, "nseg" must be changed or new sections added, followed by reopening the widget for updates to take effect.

Buttons are to show either all sets or only the selected set.

A "Done" button to exit the manager.

Right Panel - Manage and Run: Options to show the gap junction manager or the run control panel for simulations.


19.2 Parameters of gap junctions in Neurons and Astrocytes.

This user manual section provides detailed instructions for creating different types of Gap Junctions (GJ) within cells using BrainCell software. These GJ connections can be established in both astrocytes and neurons. It's important to note that there is a critical distinction between these two cell types: in astrocytes, you can create internal GJ connections within the same cell and external GJ connections directed to other cells. In contrast, in neurons, you can only create external GJ connections.

Let's begin by exploring the main window, which is depicted below.

Figure
Figure 26

Figure 22. Main Window for Gap Junction (GJ) Creation and Editing

Adding and Modifying Gap Junctions in BrainCell

BrainCell software allows you to add and adjust Gap Junctions (GJs) to customize your cell models. Here's a step-by-step guide:

Initial Setup:

What You Can Do:

Customizing Gap Junctions in BrainCell allows you to create detailed and biologically relevant cell models tailored to your research needs.


20 Exporting and Importing Biophysical Mechanisms

BrainCell includes a flexible export/import feature that lets you save and reuse biophysical mechanism sets across different cell models.

This functionality is available in the Biophysics Manager panel, making it easy to organise and reuse your customised mechanism setups for future studies.

Figure
Figure 27

20.1 Export Functionality

When exporting, the user can selectively choose and export mechanisms associated with specific cells. This information is then stored in a designated text file. The file's structure is outlined below, providing clear insights into the placement of each mechanism and its respective parameter values.

20.2 FigureExport Text File Structure

Import Functionality

The imported text file uses a straightforward structure that allows users to easily comprehend and modify the mechanisms' parameter values. This flexibility enables users to customise and adapt the parameters as needed. Moreover, the software facilitates the import of already modified text files, streamlining the database creation process for sets of mechanisms about a specific cell type.

With this robust feature, users can effortlessly establish a comprehensive database of mechanism sets associated with cell types, enhancing the software's utility and facilitating in-depth analyses.


20.1 FigureFigureFigureFigureExport cell model.

Figure 23. Control Panel for Exporting Finished Cell Model.

The Control Panel for Exporting Finished Cell Models is a crucial component of the BrainCell, providing users with comprehensive options for exporting their completed cell models. This panel provides convenient access to various export features, facilitating seamless transfer of cell models to external platforms or for further analysis.

A) Key to Call the Model Export Panel: The Control Panel features a designated key that users can activate to open the Model Export Panel. This key is a quick, intuitive way to access the export functionality.

B) Pop-up Export Panel: Upon activation, the Model Export Panel appears as a pop-up window, displaying a range of export options and settings. This intuitive interface allows Users to navigate and configure their desired export parameters conveniently.


20.2 Model Export Panel

The Model Export Panel allows you to save your completed cell model with all its essential features for use in other simulations, studies, or external tools.

You can export the following components:

With the Control Panel for Exporting Finished Cell Models, researchers can save their work in multiple formats while retaining key features such as geometry, mechanisms, and synapses. This makes it easy to share models, integrate them into other workflows, and run advanced analyses on different platforms or computing clusters.

20.3 Structure of export file.

FigureFigure
Figure 28

Figure 24. Form and Structure of the Export File. The panel displays warm messages (A) details about the format and arrangement of the export file (B).

Whenever the user exports a cell model, a notification window (Fig.20) will warn them of any errors or inaccuracies that may have occurred during the exporting process. It is important to note that these errors are usually minor and do not impact the further utilisation of the model. However, they serve as alerts for possible limitations within the model.

A successfully saved file in "hoc" - format will display inside as a commentary (Fig.20) a record of the mechanisms and their respective lines saved to the file. This valuable information facilitates efficient use of the model's features in subsequent calculations or when modifying the model.

20.4 BrainCell Software: Model Export. Result of Simulation Parameter Selection

20.4.1 Model Export Feature

The Model Export feature in BrainCell helps you save specific parameters and long calculations for reuse. It is especially useful when you want to perform simulations without extra graphics or features, or when you need to run parameter sweeps efficiently.

20.4.1.1 1. Purpose

20.4.1.2 2. Creating a Parameter File

20.4.1.3 3. Export Parameters Window

The window has:

20.4.1.4 4. Saving Parameters

20.4.1.5 5. Running Calculations

By using the Model Export feature, you can:

FigureFigureFigureFigure💡 Tip: Refer to Fig. 24A–C for visual guidance while selecting and saving parameters.

Figure 25. Exporting Control Parameters using Pop-up Windows

BrainCell allows users to define and export control parameters using pop-up windows. A. The first window saves specific parameters. B) the second window provides a selection interface for customising the output file. C) the third window gives an example of selecting soma diameter as a parameter. Users can easily create and export parameters for tailored simulations and analyses with these pop-up windows.

20.4.2 Exporting Computation Run Parameters

BrainCell allows you to export the results of your simulations by creating a Result file that stores selected variables over time. This feature is ideal for analysing outputs or running automated parameter sweeps.

20.4.3 1. Creating the “Runner.hoc” File (Fig. 26A)

20.4.4 2. Recording & Saving Variables

20.4.5 3. Parameter Sweep Calculations

20.4.6 4. Configuring the Parameter Grid (Fig. 26E)

20.4.7 Summary export

Using these tools, you can:

This workflow makes it easy to systematically explore model behaviour and capture exactly the data you need for further study.

FigureFigureFigureFigureFigure
Figure 29
Figure
Figure 30

Figure 26. Exporting of control of computation Pop-up Windows. BrainCell allows users to define and export the control of computation pop-up windows. A. The first window saves specific parameters. B) the second window provides a plot for customising the output file. C) the third window gives an example of selecting somatic gpas as a variable in the result file. D) window gives an example of selecting soma gk as a parameter. F) the window for the grid definition.

21 Managing Computation Results

BrainCell provides an organised way to export and manage cell models along with their simulation results. This structure makes it easy to store, retrieve, and review all files related to a particular model and its calculations.

21.1 Creating a Dedicated Folder for Each Cell Model

21.2 Folder Structure and Contents

Each exported cell model folder contains:

This structure keeps all model details and results linked in one place, so you can trace how outputs were generated and under what conditions.

21.2.1 Loading and Inspecting Saved Cell Models

21.3 Summary

By creating a dedicated folder for each exported model, you ensure:

This workflow supports efficient project management and thorough analysis of model behaviour and outcomes.

FigureFigureFigure
Figure 31

Figure 27. Organisational Structure of Imported Cell Models and Simulation Results

Overview: This figure demonstrates the directory structure export of BrainCell software, showcasing imported cell models and computer simulation results.

A) Initial Directory View:

Two directories, "Cell1" and "Cell2," house cell models and related files in the "Neuron/NanoGeometry" subdirectory.

B) Structure of Cell1 Directory:

The directory structure for the "Cell1" folder is displayed in this window. This structure remains consistent for all saved models.

C) Results Directory:

Within this directory, various result files showcase computation outcomes for different cell models. In this instance, ten result files correspond to five calculation parameters. The first file illustrates action potential (AP) dynamics, while the second file (VARS) displays selected variable dynamics during the cell export process.

21.1 Re-Importing Cell Models

BrainCell allows you to reimport previously saved models for further editing and simulations.

⚠️ Tip: Always export the updated model to a new folder to avoid overwriting previous results.

21.2 Importing External Cell Models from NEURON

BrainCell includes an experimental feature that allows importing models written in the NEURON simulation language. This lets you analyse, modify, and expand pre-existing neuron models within the BrainCell environment.

🔬 Note: This feature is in active development and may change in future versions.

21.3 Steps to Import a NEURON Model


22 Simulation modes: Examples of cell simulation inside of BrainCell.

Various computational scenarios are available in BrainCell, all conveniently located on the right side of the main program panel.

While sharing some foundational similarities, these scenarios exhibit unique features tailored to astrocytes and neurons. For astrocytes, there is a specific scenario designed to simulate the dynamics of spontaneous calcium responses. For neurons, a dedicated scenario focuses on modeling the dynamics of glutamate release from an array of basket cell terminals.

The following sections provide a detailed breakdown of each scenario, enabling straightforward replication in computational studies. These scenarios are not merely instructional; they serve as versatile source packages capable of simulating a variety of physiological tasks specifically designed to address diverse research objectives.


22.1 CA1-Neuron Voltage Simulation (Neuron mode only)

CA1 pyramidal cells (PCs) are a major output of the hippocampus. They integrate signals from the entorhinal cortex both directly (via the temporoammonic pathway) and indirectly (through the dentate gyrus → CA3 → CA1 loop).

The dendrites of CA1 PCs contain many types of voltage-gated ion channels, distributed in highly non-uniform ways:

22.2 Action Potential Dynamics Calculation

This feature lets you simulate action potential dynamics based on the loaded cell shape and synapses defined on its spines.

Key considerations:

This setup allows detailed exploration of how cell morphology and synaptic inputs shape action potential behaviour.

22.3 Adapting Cell Sections

If your imported model uses non-standard section names (e.g., different terms for soma, dendrites, axon), BrainCell will:

This ensures compatibility and accurate channel placement, while giving you flexibility to adapt imported morphologies.

22.4 Visualising Electrical Dynamics

BrainCell provides three interactive graphs to explore the cell’s voltage behaviour:

Figure
Figure 32

These tools make it easy to observe, compare, and interpret how action potentials propagate and how dendritic regions behave during simulations.


23 Membrane voltage distribution

In the main control panel, pressing 'Compute the spatial voltage distribution' opens window panels which report membrane voltage across selected cell processes upon a step current injection at the soma (a common electrophysiological test scenario). The default resting potential is -85 mV.

FigureFigureFigureFigure
Figure 33

a b

c

Figure 28. Window panel to monitor membrane space voltage distribution. A, Settings panel with space profile of voltage after inserting 1.5 nA into the soma. b, Dynamic voltage landscape mapped on the cell morphology. c, The corresponding voltage profile plot along individual processes ('dendrites' in NEURON).

The initiation panel (Fig. 28a) provides the following settings:

'Stimulus amplitude (nA)', the amplitude of constant depolarising current injected into the soma. 'Duration (ms)', duration of constant depolarising current.

'Computation time (ms)', simulation run time (time of display). 'Run' to start the simulation.


24 Exploring Constant Electrical Stimulation

The "Constant Electrical Stimulation" tool lets to explore the dynamic interplay between current and voltage, unlocking the secrets of electrical signalling in digital neurons.

FigureDirectly Stimulate the Soma:

Bypass synaptic complexities and focus on the core of the neuron – the soma. Inject a steady current stream directly into the soma, observing its immediate and sustained impact on the membrane potential - three parameters: Offset, Duration and Amplitude.

Simulation of Alpha Synapses:

Activate alpha synapses on the soma and witness the interplay between direct and indirect stimulation. See how the neuron integrates these inputs, revealing the intricate dance of voltage fluctuations - 6 parameters: rise and decay time, reverse conductance number of stimuli and interval between stimuli. Potential.

The dedicated panel makes it easy to access current-clamp mode, allowing for quick configuration of stimulation parameters and experimentation. This demo serves as a starting point for exploring complex neurophysiological phenomena. Adjust parameters, try out different configurations, and better understand how neurons react to electrical stimuli.

25 Exploring Variable Electrical Stimulation

The "Variable Electrical Stimulation" tool lets to explore the sinus curve injected into the soma. Discover membrane potential dynamics with this feature! Experiment with alternating current and learn about voltage fluctuations within neurons.

FigureExplore demo mode:

- Dedicated Panel: Input the periodic signal frequency and observe the dynamic response in current clamp mode.

- Sinusoidal Playground: Experiment with frequency range and analyse the relationship between stimulus and response.

- Current Clamp Magic: Inject current into soma and mimic real-world effects of electrical stimulation on a neuron.

"Variable Electrical Stimulation" is a tool that can help:

- Visualize action potential generation.

- Investigate membrane properties.

- Design custom electrical stimulation protocols.

Remember: As you explore, remember that the specific responses you observe will depend on the chosen cell model and its unique biophysical properties. Don't hesitate to experiment with different models and parameters to unlock the full potential of this versatile tool.


26 Linescan FRAP experiment: probing intracellular connectivity of Brain Cell

In the "Fluorescence Recovery After Photobleaching (FRAP) for Intracellular Indicators" section of the BrainCell software manual, we show how FRAP can evaluate effective diffusivity in cellular compartments near the bleached area.

FRAP is particularly useful in verifying if the modelled cell morphology accurately replicates empirically documented intracellular diffusivity and connectivity. The BrainCell software enables users to conduct FRAP experiments and corresponding simulations directly from the main window, providing a practical tool to test astrocyte morphology against empirical data.

The software's default settings are based on data from CA1 astrocyte studies using linear photobleaching tests with Alexa Fluor 594 or Alexa Fluor 488.9

The FRAP test in BrainCell simulates a photobleaching area represented by a linear segment on the XY plane. Select 'Line-scan FRAP' to access this function, which opens a dedicated control window (refer to Fig. 29 in the manual).

The initiation panel of 'Line-scan FRAP' (Fig. 29a) includes several adjustable settings:

FigureFigureFigureFigure
Figure 34

Figure 29. Panels for controlling and monitoring simulated line-scan FRAP

26.1 FRAP Simulation Overview

26.2 RAP Panel Controls

26.3 Bleaching & Recovery Cycles

26.4 Running FRAP

26.5 Visualisation & Interaction Tips

26.6 Notes

.


27 FRAP with round spot bleaching

This section introduces a beginner-friendly computational scenario for studying cell geometry using FRAP (Fluorescence Recovery After Photobleaching). FRAP involves briefly using a laser to “bleach” (dim) a small region of a cell, then watching how fluorescence recovers as unbleached molecules move back into the area.

BrainCell makes it easy to simulate FRAP on virtual cells. You can:

This is particularly useful for exploring cell geometry and molecular diffusion.

⚡ Default settings are based on published CA1 astrocyte experiments using linear photobleaching with Alexa Fluor 594 / 488.

The photobleaching area is represented as a spherical segment within the cell. To begin, select “Round Spot FRAP” to open the dedicated control window (Fig. 30).

27.1 Round Spot FRAP - Adjustable Settings (Fig. 30a)

With these options, BrainCell provides a powerful yet easy-to-use platform for exploring:

This tool is valuable for both researchers and students, offering an intuitive way to simulate and analyse FRAP experiments without advanced programming knowledge.

FigureFigureFigureFigureFigure
Figure 35

Figure 30. Window panels to control and monitor simulated spot FRAP.

A. Parameter Settings Panel: This panel is where you can adjust various settings for the FRAP simulation. Here, you can set parameters like the spot radius, initial concentration, time of recovery, number of trials, scatter radius, and diffusion coefficient. These settings allow you to customize the FRAP simulation according to your specific research needs or experimental design.

B. Concentration Dynamics Visualization: This part of the interface shows a color-coded, dynamic map of the concentration of non-bleached molecules on the cell's morphology. It provides a visual representation of how the concentration changes over time during the recovery process post-photobleaching, offering an intuitive understanding of the molecular behavior within the cell.


28 Ca²⁺ Wave Simulations

Pressing the “Calcium Wave” button on the main control panel opens dedicated windows (Fig. 31) for configuring, running, and visualising intracellular Ca²⁺ dynamics. This module simulates calcium waves triggered by a local increase of IP₃, which activates Ca²⁺ channels. BrainCell uses the standard NEURON-integrated reaction–diffusion formalism for calcium signalling. The model includes diffusion, buffering, pumps, channels, and leaks.

28.1 Core Calcium Dynamics Equations

28.1.1 1. Reaction–Diffusion Equation

where

28.1.2 2. Buffering Kinetics

For each buffer species i (mobile or stationary):

Typical parameters:

28.1.3 3. SERCA Pump Flux

where

28.1.4 4. Passive Leak Flux

where is the membrane leak constant.

28.1.5 5. IP₃-Dependent Channel Flux

Channel open probability:

Inactivation variable :

6. Summary of Constants

SymbolMeaningTypical value
Diffusion coefficient0.22 µm² ms⁻¹
SERCA maximum uptake5×10⁻³ mM ms⁻¹
SERCA half-activation0.3 µM
ER leak rate constant10⁻⁴ ms⁻¹
IP₃ channel conductance5×10⁻³ mM ms⁻¹
IP₃ dissociation constant0.1 µM

28.1.6 Summary

This calcium-wave model reproduces realistic intracellular Ca²⁺ propagation through combined diffusion, buffering, and membrane fluxes. All parameters are editable through the Ca²⁺ Reaction–Diffusion Settings Panel (Fig. 31c), and the results are displayed dynamically in the [Ca²⁺] Landscape (Fig. 31b).

.

FigureFigureFigureFigureFigureFigureFigureFigurea b c

d

Figure 31. Control and Monitoring Panels for Ca²⁺ Wave Dynamics

28.1.7 Ca²⁺ Wave Panel

28.1.8 Ca²⁺ Reaction–Diffusion Parameter Settings

The Ca²⁺ reaction–diffusion settings panel (Fig. 31c) displays explanations above each control key, helping users adjust parameters with confidence.

28.1.9 Running & Restarting Simulations

Note: The current BrainCell version simulates IP₃ rises at the soma by default, but it can be adapted to trigger local IP₃ release at any chosen region within an astrocyte.


29 Simulating microscopic Ca2+ events

Pressing 'Calcium dynamics' key prompts four new windows (Fig. 31):

FigureFigureFigureFigureFigureFigureFigureFigurea b c

Figure 32. Panels for Controlling and Monitoring Microscopic [Ca²⁺] Dynamics

29.1 Calcium Stimulation Parameters Panel

The Calcium Stimulation Parameters panel (Fig. 31a) lets you configure key settings that control microscopic Ca²⁺ entry dynamics. This feature models Ca²⁺ influx as a stochastic sequence of single-channel openings, often occurring in bursts. Because many of these microscopic parameters remain experimentally uncertain, the panel is designed to support both exploratory simulations and hypothesis testing.

29.2 Adjustable Parameters

Note: In astroglia, Ca²⁺ dynamics are relatively slow; simulations should last ≥100 s to fully capture the process.

Using this panel, you can precisely shape the temporal and spatial profile of Ca²⁺ entry to investigate how microscopic channel events influence cellular calcium waves and other signalling behaviours.

30 Simulating Glutamate Transporters

Neuronal membranes are rich in high-affinity glutamate transporters that generate rapid inward currents when glutamate binds. In BrainCell, you can model these transporters’ behaviour and their effect on membrane voltage.

To access this feature, open the main panel and press the “Glutamate Transporters” button. This opens a dedicated menu (Fig. 32) to simulate the dynamic membrane-voltage landscape across the cell in response to local, volume-limited glutamate application (uncaging) at a chosen site.

30.1 Uncaging Glutamate Panel (Fig. 33a, top)

This panel provides self-explanatory controls for setting up glutamate uncaging within a defined circular area of the cell. Key adjustable parameters include:

These settings allow you to mimic experimental glutamate application with high spatial and temporal precision.

30.2 Transporter Kinetics

BrainCell implements the six-state kinetic model of glutamate transporters based on Bergles & Jahr (1997, Neuron 19: 1297–1308). Each transporter can exist in one of six states Ci (i=1,…,6), representing sequential binding, translocation, and release steps.

This module enables detailed simulation of glutamate uptake and its influence on membrane voltage and ion homeostasis, helping researchers explore synaptic signalling and astrocyte–neuron interactions under controlled glutamate release scenarios.

30.3 Parameters

30.4 Important Notes for Glutamate Uncaging Simulations

30.5 Voltage Clamp Configuration

Transporter currents are calculated under a somatic voltage clamp setup:

This configuration ensures stable recording of glutamate transporter–mediated currents.

30.6 Monitoring Panels

This setup enables precise spatiotemporal control of glutamate application

FigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigure
Figure 36

Figure 33. Window panels with parameter settings and readout plots simulate the dynamic membrane voltage landscape mapped onto cell morphology in response to volume-limited application ('uncaging') of glutamate. a, Glutamate uncaging parameter settings. b, Voltage-clamp parameter settings, including electrode positioning. c, Visualisation panel. d, Time course graph panel.

Window panel 'Glu setting' (Fig. 33a) provides parameters:

'X, Y and Z coordinate (um) ' set respectively x, y and z-coordinates of the centre of the uncaging circle. 'Uncaging radius (um) ' sets the radius of the uncaging circle.

'Uncaging onset (ms) ' sets the onset of uncaging.

'Glutamate concentration Max (mM)' sets the maximum glutamate concentration during uncaging. 'Rise' and 'Decay tau (ms)' set the dynamics of glutamate uncaging.


31 Simulating Potassium Dynamics (Intra- and Extracellular)

BrainCell allows you to simulate potassium (K⁺) dynamics inside and outside the cell, including local K⁺ influx, intracellular redistribution, and efflux/leakage (Fig. 34).

To access this feature:

31.1 Simulation Control & Visualisation

31.2 Potassium Settings Panel

This tool enables precise modelling of potassium redistribution under controlled local input and efflux conditions, with real-time visualisation of both concentration changes and membrane response.

FigureFigureFigureFigureFigure
Figure 37

Figure 34. Window panels to control and monitor intracellular K+ dynamics and extracellular K+steady-state distribution. a, Parameter settings for monitoring [K+]in and [K+]o landscape mapped onto cell morphology. b, Parameter settings pertinent to volume-limited [K+]in entry and [K+]o distribution. c, Shape visualisation with voltage-clamp positioning. d, Somatic voltage clamp applied (bottom), for the sake of simplicity.

Important Notes on Potassium Dynamics Simulation

The current potassium dynamics module focuses on the diffusion landscape of intracellular K⁺ and uses simplified first-order kinetics for K⁺ entry and extrusion. These reactions are set to be independent of membrane voltage to keep the simulation conceptually clear and computationally light.

31.3 ⚡ Advanced modelling:

For more detailed and physiologically realistic simulations, users can include:

Such mechanisms - including astroglial Kir4.1 channels - are available within the standard NEURON environment and can be integrated to improve biological fidelity.

31.4 Monitoring Panels

This setup allows researchers to observe intracellular K⁺ redistribution under simplified assumptions and serves as a starting point for more detailed, biophysically complete potassium models using NEURON’s extended channel and pump libraries.

FigureFigureFigureFigure
Figure 38

Figure 35. Window panels displaying simulated dynamics of intracellular [K+]in and extracellular [K+]o steady-state distribution mapped onto cell morphology (a) and (b), and [K+]in the time course (c) at a selected branch (dendrite), in response to volume-limited injection of potassium current (as in Fig. 34).

31.5 Potassium Settings Panels

1. Intracellular Potassium Panel - “Potassium setting”

This panel defines the parameters for K⁺ entry and intracellular diffusion:

⚠️ Note:

The Basal [K⁺]ₙ concentration appears twice in the original UI. It represents the initial intracellular K⁺ level before simulation starts.

31.6 2. Extracellular Potassium Panel - “Extracellular potassium distribution”

This panel controls the extracellular [K⁺] configuration:


32 Basket cell GABA diffusion (Neuron mode only)

32.1  Building and Analysing Realistic Basket Cell Models with GABA Release Dynamics

This tutorial guides you through creating and exploring realistic basket cell neuron models, with a particular focus on GABA (γ-aminobutyric acid) release and uptake dynamics. It is part of a series of step-by-step scenarios designed to help you construct biologically meaningful neuron models and study inhibitory neurotransmission.

In this tutorial, you will learn how to:

Purpose and Applications

By completing this tutorial, you will be able to:

This workflow is particularly useful for researchers investigating inhibitory interneurons, synaptic integration, and network behaviour under varying inhibitory strengths and spatial distributions.

The main panel window.

Figure
Figure 39

Figure 36. Source of Diffusion Panel

This panel provides a comprehensive interface for creating, running, and visualising diffusion simulations with optional animation export.

32.1.1 Animation Controls

32.1.2 What to Animate

32.1.3 Simulation Setup

32.1.4 Simulation Parameters

Hints

Recording Period (Dt)

Simulation Controls

This panel combines diffusion source configuration, simulation control, and advanced visualisation tools, making it easy to run customised diffusion experiments and generate high-quality animations for analysis or presentation.


33 Axon Myelination (Neuron Mode Only)

BrainCell allows you to add myelin to the axon of your neuron model, enhancing the realism of the simulation.

Figure
Figure 40

Figure 37. Myelinated Axon Modelling Panel. This panel enables users to create, import, and simulate a neuron model with a myelinated axon.

33.1 Myelinated Axon Simulation Panel

After clicking “Axon Modelling”, the main control panel for creating and simulating an axon with myelin (Schwann cells) appears (Fig. 37–38). This panel enables you to import, design, and configure a neuron model with a myelinated axon and is divided into several functional sections:

The left-hand side of the panel shows a visual representation of the axon model. Use the input fields, sliders, and checkboxes to modify parameters. Click “Start Simulation” to run the model.

Tip: Some parameters are interdependent - changing one may affect the availability or validity of others. For advanced configuration details, refer to the dedicated sections of this manual.

Figure
Figure 41

Figure 38. Axon Myelination Panel. The panel provides comprehensive tools for configuring and simulating myelinated axons.

33.1.1 Geometry and Sheath Panel

Figure
Figure 42

Figure 39. Geometry and Sheath Panel Overview. This panel defines the structural foundation of the axon and its myelin sheath.

33.1.1 2. Myelin Sheath

A visual preview highlights the axon and its segments, updating in real time as changes are made. Click “Start Simulation” to run the model with the selected geometry and myelination settings. A status indicator below the preview shows the current myelination state (e.g., “Myelin: REMOVED”).

Note: Adjusting these settings may impact other simulation parameters (e.g., conduction velocity, diffusion properties). Review related panels (e.g., Myelin Parameters or Biophysics Settings) to ensure the model remains consistent.

33.1.1.1 Draw Axon Panel Overview

When you select "Draw by hand" in the Geometry and Sheath panel, NEURON’s CellBuilder window opens, allowing for manual construction of neuronal structures, including axons.

Figure
Figure 43

Figure 40. Draw Axon Panel Overview. This panel allows users to construct and edit axonal geometry interactively.

33.1.1.2 Axon Parameters Panel Overview

This panel is used to configure the axon's physical properties and its myelin sheath. It consists of two main sections:

Figure
Figure 44

1. Axon Trunk Parameters:

2. Axon Sheath Parameters:

33.2 Schwann Cell Channel Location in the Radial Diffusion Grid

Background

In Configuration B, potassium diffuses radially through concentric shells surrounding the axon. The Schwann cell membrane is located at the sheath boundary (Rₛₕₑₐₜₕ), which separates the inner region from the outer region. Ion channels and receptors located on the Schwann cell membrane must sense the extracellular potassium concentration [K+]o[K^+]_o[K+]o​ and inject their ionic current back into the diffusion grid.

The parameter schwannKoShell determines the shell where this interaction occurs. The position is expressed as an offset relative to Rₛₕₑₐₜₕ.

Parameter: schwannKoShell

The value represents an integer offset from the Rₛₕₑₐₜₕ shell:

At the selected shell, two processes are coupled:

Example with 5 Inner Shells and 5 Outer Shells

schwannKoShell:  -4   -3   -2   -1    0   +1   +2   +3   +4   +5
Shell:            1    2    3    4    5    6    7    8    9   10
Zone:            ←── Inner (D) ──→  R_sh  ←── Outer (D/α) ──→
Radius:          R_axon ─────→ R_sheath ─────────────→ R_max

Clamping

The allowed range depends on the current grid configuration and extends from

-(numInnerShells - 1)  to  +numExtShells

If a value outside this range is entered, it is automatically clamped to the nearest valid value. The graphical interface then updates the displayed value accordingly.

Physical Interpretation

The default value (schwannKoShell = 0) places the channels at the inner surface of the myelin sheath, facing the periaxonal space.

Note that the axonal interaction point is fixed:

These rules do not depend on the schwannKoShell parameter. Only the interaction point of the Schwann cell with the diffusion grid is affected.

.

33.2.1 Myelin Parameters Panel

FigureFigure
Figure 45

Figure 41. Myelin Parameters Panel. This panel defines the detailed biophysical and structural parameters of the myelin sheath along the axon.

33.2.2 Diffusion and Concentration Parameters Panel

Figure
Figure 46

Figure 42. This panel lets to set potassium diffusion and concentration values for myelinated axon simulation.

Carefully adjust these values to model physiological conditions, as they affect ion movement and action potential propagation during the simulation.

33.2.3 Biophysics and Clamps Panel

FigureFigure
Figure 47

Figure 43. This panel allows you to configure the biophysical properties and experimental manipulations for your axon simulation. The panel has two different configurations, which I'll describe below:

- ✅ Use real biophysics: Selected

- ☐ Use test sines: Not selected

Configuration 1: Realistic Biophysics

Configuration 2: Test Sine Waves

- ☐ Use real biophysics: Not selected

- ✅ Use test sines: Selected

User Notes:

33.2.4 Mechanism Management for the Myelinated Axon Model

In BrainCell, the biophysical properties of the myelinated axon model are controlled through a JSON configuration file (SimMyelinatedAxon.json). This file defines the baseline parameters for all mechanisms, including channel conductances, reversal potentials, and other electrophysiological properties.

When a simulation starts, BrainCell reads this JSON file and applies the parameters to the corresponding sections of the model. These parameters define the initial configuration of the simulation.

33.2.5 Editing Mechanism Parameters

Users can modify mechanism parameters during a session using the Biophysics Manager.

Typical adjustable parameters include:

Any parameter changed through the Manager of Biophysics is applied immediately to the active model.

Importantly, these changes remain active across subsequent Init and Run cycles. During the same BrainCell session, the JSON file is not reloaded, and therefore the edited values remain in effect.

33.2.6 When Parameter Changes Are Lost

Manual parameter edits are stored in the section memory of the currently instantiated model. These edits are lost only if the model sections are destroyed and recreated.

This occurs in the following situations:

1. Activating “Use test sines” mode

When this mode is enabled, BrainCell rebuilds the model structure. A warning dialogue appears to inform the user that the current parameters may be reset.

2. Changing the model geometry

Certain geometry modifications require the model sections to be recreated. Examples include:

When sections are recreated, the previous parameter edits are discarded and BrainCell reloads the baseline parameters from the JSON file.

33.2.7 Saving Edited Parameters Permanently

If you want to preserve modified parameters for future simulations, you must write them back to the JSON configuration file.

To do this:

Once exported, the modified values become the new baseline configuration. Every new BrainCell session will start using these updated parameters.

33.2.1 Summary

SituationParameters Applied
First simulation runParameters loaded from the JSON file (baseline)
After editing parameters in the Manager of BiophysicsEdited parameters remain active
After section recreation (geometry changes or test sine mode)JSON baseline parameters are restored
After exporting edited parameters to JSONEdited parameters become the new baseline

33.2.1.1 Visualisation of computation

Figure
Figure 48

Figure 44. Panel for visual results.

✅ - Checkbox (checked): Indicates that the option is enabled or selected

☐ - Checkbox (unchecked): Indicates that the option is disabled or not selected

▼ - Dropdown arrow: Allows adjusting numerical values

Legend for visualisation options:

Here is an example of plots if the user keeps these options.

Figure
Figure 49
Figure
Figure 50
Figure
Figure 51

Here is an example of plots if the user keeps these options.

Figure
Figure 52

Here is an example of plots if the user keeps these options.

Figure
Figure 53

Here is an example of plots if the user keeps these options.

Figure
Figure 54
Figure
Figure 55
Figure
Figure 56

11. ☐ Print "ik" and "ko" in sec centres [Unchecked option]


34 LFP. Recording local field potential for a single cell.

Local Field Potentials (LFPs) represent the combined electrical activity of nearby neurons and are a soft for studying how neural circuits interact and communicate. The LFP simulation module in BrainCell allows researchers to calculate extracellular potentials at user-defined spatial locations around a neural structure. This feature is particularly useful for investigating how neural activity spreads through tissue and influences the surrounding environment.

The interface is designed to be intuitive and flexible, enabling users to:

The interactive workflow allows immediate feedback: users can adjust parameters, reposition electrodes, and see the impact on LFP signals without restarting the full simulation.

FigureFigureFigureFigure
Figure 57

Figure 45. Local Field Potential (LFP) Interface

The LFP interface provides tools to:

.

Sub panels.

Key Parameters:

Real-Time Monitoring:

Visualisation and Controls:

Warnings:


35 Submitting BrainCell Export Files to the NSG (Neuroscience Gateway)

The NSG Portal allows users to run BrainCell simulations on high-performance computing clusters. Follow these steps to prepare and submit your BrainCell models for execution on the NSG platform.

Access the NSG portal and sign in with your account credentials.

Figure
Figure 58

Figure 46. Neuroscience Gateway (NSG) login interface.The NSG (Neuroscience Gateway) portal provides access to high-performance computing (HPC) resources for large-scale neuroscience simulations.

Users can log in with their NSG credentials to run BrainCell and NEURON-based models on supercomputing clusters hosted by the San Diego Supercomputer Center (SDSC) at UC San Diego.

The page allows new users to register, existing users to log in, and includes links to usage policies, statistics, and support documentation.

{ load_file("stdrun.hoc") }

This ensures NEURON recognises standard functions on Linux.

Figure
Figure 59

Figure 47. Folder management interface on the Neuroscience Gateway (NSG) platform.

After logging in, users can create, edit, or delete project folders that organise simulation files and results. In this example, the folder “Neuron” contains resources for BrainCell astro-neuronal simulations.

The Folder Details section displays the folder label and description, while the side navigation panel lists all user directories (e.g., NeuroAstro, Data, Tasks).These folders are used to manage uploaded models, organise input data, and prepare job submissions for execution on the NSG high-performance computing system hosted by the San Diego Supercomputer Center (SDSC).

The Folder Management Interface allows users to organise and manage their computational neuroscience projects within the NSG Portal. Folders Navigation Panel: Displays hierarchical folder structure, Shows folder contents with item counts in parentheses, Currently selected: "Used" and "NeuronAstro" folders, Subfolders shown: Data (4 items) and Tasks (7 items).

35.1 Configure and Run a Task

⚠️ Note:

FigureFigureFigure
Figure 60

Figure 48. Task management and job submission interface on the Neuroscience Gateway (NSG).

The Tasks panel lists all simulation jobs currently stored or running on the NSG platform. Each task entry displays the model label, the computational tool used (e.g., NEURON on Expanse), the input files, the parameters, and the submission date.

Users can view outputs, clone existing tasks, or delete completed ones directly from this interface. The right-hand panels show the Create New Task window, where users specify the input data, parameter files, and the simulation tool to execute.

The Task Summary and Set Parameters tabs provide detailed configuration options, including Python or NEURON execution modes and queue settings.

This workflow enables BrainCell users to run large-scale astrocyte and neuron simulations on NSG’s high-performance computing infrastructure with minimal local setup.

35.1.1 Linux MOD File Requirements

Common/

Linux systems require MOD files instead of "nrnmech.dll". Combine MOD files from "Common" and either "Astrocyte" or "Neuron" folders into the same folder as your HOC file. MOD files will compile automatically into "libnrnmech.so".

Set the following parameters to 1, as BrainCell does not yet support parallel computing:

Number of Nodes

MPI Tasks per Node

OpenMP Threads per Task

Cores per Node Reducing requested resources may decrease queue time.

"NEURON on Expanse" is sufficient for running BrainCell files that require NEURON and Python.


36 BrainCell Testing Suite

BrainCell includes an integrated Testing Suite designed to verify that all core modules are functioning correctly before launching full-scale simulations.

This utility is located in the directory:

...\cell-main\_Testing\

Each script in this folder initialises or tests a specific BrainCell module (e.g., geometry setup, diffusion, synaptic transmission, or import/export functions).

Running these tests ensures that all dependencies, compiled mechanisms, and inter-module connections are correctly configured - especially after installation or system updates.

.

Figure
Figure 61

Figure 49. BrainCell Testing Suite directory structure. The _Testing folder contains a collection of initialisation and diagnostic scripts for verifying BrainCell functionality. Each init_* file corresponds to a specific subsystem:

Users can execute individual scripts to diagnose module-specific problems or run the suite sequentially to perform a complete pre-simulation system check.

36.1 Running Tests

Method 1 - Quick Drag & Drop

Method 2 - Direct Execution

After running:

Tip: Each test is independent and automatically calls CommonPrologueForTests when required - you don’t need to run it manually.

This section ensures users can test, prepare, and run BrainCell models on the NSG supercomputing platform efficiently, reducing compatibility issues and simplifying large-scale simulations.


37 Creating and Editing Biophysical Mechanisms

BrainCell lets you design and customise biophysical mechanisms for your cell models. You can either use the built-in Biophysical Mechanisms Manager or create and edit mechanisms directly using JSON files. Editing JSON files gives you a simple, text-based and visual way to define mechanisms using any text editor.

Where the JSON Files Are Located

Figure
Figure 62

Figure 50. Biophysics directory structure in BrainCell.

(A) The main Biophysics folder (...\cell-main\Biophysics\) contains three subdirectories: Astrocyte, Neuron, and Common, which store mechanism definitions and scripts shared between modules. (B) The Neuron subdirectory includes functional modules for simulating different neuronal biophysical mechanisms, such as SimCalcium, SimPotassium, SimGlutamate, and SimMyelinatedAxon. These components define the ionic dynamics, synaptic mechanisms, and myelination properties used during neuron-mode simulations, allowing BrainCell to reproduce realistic electrophysiological and biochemical behaviour.

Biophysical mechanism files are stored in:

...\cell-main\Biophysics\

Inside this folder, you’ll find three subdirectories:

37.1 Creating a New JSON Mechanism

37.2 Editing an Existing JSON Mechanism

Example JSON file:

{
  "MechanismName": {
    "type": "voltage_gated_channel",
    "ion": "na",
    "equations": {
      "alpha_m": "0.1 * (v + 40) / (1 - exp(-(v + 40) / 10))",
      "beta_m": "4 * exp(-(v + 65) / 18)"
    },
    "parameters": {
      "gmax": 120,
      "e_rev": 50
    }
  }
}

37.3 Available Built-In Mechanisms

Examples of predefined mechanisms include:

AllMyelin
Myelin
SimCalcium
SimFrap
SimGlutamate
SimMyelinatedAxon
SimPotassium
SimVoltageCA1Neuron

You can modify these templates or create completely new mechanisms.

Best Practices

Use clear names for files and mechanisms (e.g., CaPump_Modified.json). ✅ Add comments using // (single line) or /* */ (multi-line) to explain complex equations. ✅ Validate JSON syntax with an online JSON checker before saving. ✅ Back up original files before making big changes. ✅ Ensure scientific accuracy - double-check ion types, equations, and parameters.

Applying Your Changes

Your new or updated mechanisms will now be available in the Biophysics Manager for use in your models.

Tip: Editing mechanisms via JSON is great for advanced users who want fine control over ion channels, pumps, or custom experimental conditions. It also allows easy sharing of mechanism files between collaborators.


38 Multi-Cell Networks

38.1 Exporting, Running, and Re-importing Simulations with Extra Cells

Overview

BrainCell enables simulations of multi-cell networks by combining a primary cell (either a neuron or an astrocyte) with one or more additional cells imported from morphology files. These additional cells - referred to as extra cells - can be loaded from standard SWC morphology files or from HOC-format morphology files.

Once imported and positioned in space, all cells form a shared simulation environment. The complete multi-cell configuration can then be exported as a standalone HOC file. This exported file can be executed independently and later re-imported into BrainCell for further editing or modification.

This section describes the full workflow for working with multi-cell models:

38.2 Setting Up Extra Cells

38.2.1 Importing Extra Cells

To add additional cells to your simulation:

BrainCell supports several morphology formats:

Each imported cell is automatically assigned a unique identifier such as:

EXTRA_CELL_1 EXTRA_CELL_2 EXTRA_CELL_3

Figure
Figure 63

Figure 51. Multi-cell simulation interface in BrainCell. (A) Main Control Panel (Repertoire of Computation): the central interface for configuring simulations. Pressing Add Extra Cells opens the Manager of Extra Cells window. (B) Manager of Extra Cells: panel for importing and managing additional cell morphologies within a shared extracellular environment. (C) Extra Cell Information Panel: displays details of each imported cell and allows positioning in 3D space by adjusting X, Y, and Z coordinates. (D) 3D Geometry Display: shows all loaded cells simultaneously, illustrating their spatial arrangement and the resulting extracellular environment. Multiple cells can be added to simulate interactions affecting extracellular ion concentrations and potentials.

Panel A - Repertoire of Computation

This is the central BrainCell control panel. It includes the Add Extra Cells button, which opens the Manager of Extra Cells window (Panel B). From here, users can import additional cell morphologies into the same simulation environment.

Panel B - Manager of Extra Cells

When first opened, this panel is empty because the primary (base) cell is already loaded. To add another cell, click Import Extra Cell. A file-browser window will appear, allowing you to select a morphology file from your computer. The selected file can represent any compatible geometry, including one previously generated in BrainCell.

After selecting the file, allow a few moments for the cell to fully load. Once loaded, it will appear simultaneously in:

Panel C - Positioning Extra Cells

After importing, each extra cell appears in the list of cells.

To position a cell spatially:

Note: Coordinates refer to the centre point of the root section of the extra cell, computed as the average of its first and last 3D points.

38.3 Assigning Biophysics

Each extra cell appears as an independent compartment in the Mechanism Manager.

Users can assign:

Extra cells can be configured independently from the primary cell using the same JSON-based preset system used elsewhere in BrainCell.

Panel D - Geometry Display

Each extra cell appears as an independent compartment in the Mechanism Manager.

All loaded cells appear together in the global 3-D geometry view.

Each cell retains its own visual representation, including:

This visualisation helps illustrate spatial relationships and interactions between cells.

Performance Note

Users can import as many cells as desired, but each additional cell increases computational complexity and simulation time. For large assemblies, ensure that hardware performance and memory capacity are sufficient to handle extended calculations.

38.4 Multi-Cell Biophysical Configuration

This section introduces the multi-cell mechanism editor in BrainCell, which allows users to manage and synchronise biophysical properties across multiple loaded cells.

Each imported cell (Cell 1, Cell 2, etc.) can have its own active and passive mechanisms - such as ion channels, transporters, or diffusion systems - applied to soma, dendrites, or glial compartments.

The panel provides a unified interface for selecting, comparing, and modifying these mechanisms, ensuring consistent physiological behaviour in multi-cell simulations.

Figure
Figure 64

Figure 52. Insert/Uninsert Mechanisms Panel in multi-cell simulation mode.

This window allows users to manage biophysical mechanisms for each cell in a multi-cell simulation. Each section lists the currently available or assigned mechanisms within different cell compartments - soma, dendrites, small glia, and large glia - as well as any additional imported cells (e.g., Extra Cell #1, Extra Cell #2).

Users can enable or disable specific modules such as morphology, capacitance, passive properties (pas), extracellular space, FRAP, CAI, GAT transporters, and others. No changes take effect until the Apply button is pressed. The lower control panel includes filters to hide ionic species or exclude mechanisms reserved for internal use, ensuring clarity when configuring multiple interacting cells. This tool enables consistent assignment of mechanisms across all imported cells, supporting complex network simulations in a shared extracellular environment.

38.5 Coupled Dynamics in a Shared Extracellular Space

This section describes how BrainCell models the interactions among multiple cells within a common extracellular environment. During a simulation, each cell continuously alters the local ionic composition. These extracellular ions diffuse through space, influencing neighbouring cells and creating realistic, bidirectional coupling between neuronal and glial populations.

To begin this type of simulation, open the main BrainCell control panel and press Inside–Out Diffusion. Two windows will appear - Panel A and Panel C - while Panel B (an alternative simulation panel) remains hidden by default.

Panel B offers a more advanced interface and is generally recommended for routine use.

On Panels A and C, users can configure the extracellular environment, including:

However, for the extracellular space to function properly, it must be spatially constrained and discretised into a computational grid. To create this grid, open Panel A and click “Specify a Grid...” to open Panel D. Panel D allows you to define the grid resolution and observation projection.

Once these parameters are set, return to Panel B and press Compute to initialise the extracellular diffusion simulation.

This process establishes a shared dynamic environment in which all loaded cells exchange ions and signals through a common extracellular domain, enabling fully coupled multi-cell simulations.

Figure
Figure 65

Figure 53. Inside–Out Diffusion control panels for multi-cell extracellular simulations in BrainCell. (A) Manager of Inside–Out Diffusion: main interface for configuring extracellular ion dynamics. Users can select ionic species (Na⁺, K⁺, Ca²⁺, Cl⁻, etc.), set diffusion coefficients, enable uptake mechanisms, and choose between “on-the-fly” or “deferred” computation modes. (B) Alternative Run Controller: advanced simulation manager that integrates directly with the diffusion module. It defines simulation duration, time step, and update intervals, and provides options for real-time visualisation and stochastic behaviour control. (C) General Settings Panel: specifies the numerical and physical parameters of the diffusion environment, including volume fraction, tortuosity, and boundary conditions (Dirichlet or Neumann). Users can also select the computational device (CPU or NEURON RxD module) and performance options. (D) Grid Definition Panel: used to create and visualise the 3D computational grid where extracellular diffusion is calculated. The panel allows users to define grid dimensions (Nx, Ny, Nz), spatial padding, and projection type (XY, YZ, or XZ), ensuring precise spatial control of the simulated extracellular space.

Together, these panels enable fully coupled simulation of ionic diffusion and cellular interactions within a shared extracellular environment.

Figure
Figure 66

Figure 54. Visualisation and animation of extracellular diffusion dynamics. This set of panels displays tools for analysing and animating the simulated diffusion processes in the shared extracellular space.

At this simulation stage, BrainCell provides several advanced options for managing and resuming extracellular diffusion computations. If a simulation is paused or interrupted, it can be continued from the last saved state using automatically generated checkpoint files that record time-step data and concentration maps.

Simulation results can be saved in multiple formats, including BIN, TXT, and CSV. The BIN format is recommended for large datasets, as it allows rapid reloading and continuation of calculations without data loss. The TXT and CSV formats are useful for further analysis, visualisation, or export to external tools such as MATLAB or Python.

All saved files can later be reopened within BrainCell, enabling users to replay animations, inspect concentration gradients, and compare different diffusion scenarios. These capabilities ensure flexible control, reproducibility, and efficient handling of long-running multi-cell simulations.

38.1 Exporting the Multi-Cell Network

38.1.1 Running the Export

Once your network is configured, export it using the standard BrainCell export function:

Note: HOC-format extra cells are automatically converted to SWC during export. The converted SWC files are stored in the subfolder alongside SWC-format cells.

38.2 Export Output Structure

After export, you will find the following files:

38.3 Running the Exported File

38.3.1 Standalone Execution

The exported NameExportFile.hoc can be run directly with NEURON without launching BrainCell:

Note: BrainCell must be installed on the machine for standalone execution to work, because the exported HOC file loads Python code from the BrainCell installation directory to reconstruct extra cells.

38.4 Running from BrainCell

Alternatively, use the standard BrainCell simulation runner (SimulationManager) after export as usual. The runner will automatically use the exported file.

38.5 Re-importing the Exported File into BrainCell

38.5.1 Re-import Workflow

You can re-import an exported multi-cell HOC file back into BrainCell to make further changes (for example, to modify biophysical parameters and export again). To do this:

38.6 Known Limitations

The following limitations apply to the current version of BrainCell multi-cell export and re-import. These are planned for resolution in future releases.

AspectLimitation
File portabilityDo not rename or relocate the exported HOC file or its subfolder.
BrainCell requiredStandalone execution of the exported file requires BrainCell to be installed. The file loads Python code from the BrainCell installation to reconstruct extra cells.
Re-import requires restartReimporting an exported file into BrainCell always requires closing and restarting the Application. Loading into an existing session is not supported.
Second export after re-importAfter re-importing and modifying the model, the second export correctly includes all extra cells. However, the morphology files in the subfolder are regenerated from the originals stored at the time of first export. If the original source morphology files have been moved or deleted, export may fail.
HOC-format morphologyHOC-format extra cells are converted to SWC at export time. The conversion is performed automatically but may not preserve all HOC-specific morphology features. Review the converted SWC visually after export.

38.7 Troubleshooting of Multi cell computations

38.8 Extra cells are missing after re-import

If extra cells do not appear after re-importing, check that:

38.9 Cells appear at wrong positions

If extra cells appear at incorrect spatial positions after re-import:

38.10 Simulation fails to run

If the exported HOC file fails to run:

BrainCell User Manual | Multi-Cell Networks