USER GUIDE
BRAINCELL 2.0.
Brain cell in silico
© University College London, MIT licence
16/03/2026
TABLE OF CONTENTS
1 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
2 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:
| Category | Description | When to Use |
|---|---|---|
| Category 1 | NEURON + Python is already working | You run NEURON simulations regularly |
| Category 2 | Clean system (nothing installed) | Fresh OS or new to NEURON |
| Category 3 | Mixed/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:
- RAM: 4 GB (8 GB recommended)
- Disk Space: 5 GB free
- Processor: 64-bit processor
- Internet: Required for initial download
- BrainCell: Latest version (cloudpackage-v1.zip)
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:
- ✅ NEURON is already installed and launches successfully
- ✅ Python (Anaconda or system Python) is installed
- ✅ NEURON recognises Python (you can run simulations via Python)
- ✅ You actively run NEURON simulations
If any of these are false, go to Category 2 or Category 3.
2.2.2 Step 1: Download BrainCell
All Platforms
- Visit: https://neuroalgebra.net
- Download:
cloudpackage-v1.zip - Forum thread: https://forum.neuroalgebra.net/viewtopic.php?t=3
- Note: The ZIP file is password-protected. The password is available on the forum thread above.
- Create a directory for BrainCell:
Windows:
C:\braincell
macOS/Linux:
~/braincell
- Unblock the downloaded file (important!):
Windows:
- Right-click
cloudpackage-v1.zip→ Properties → Check "Unblock" → Apply
macOS:
xattr -d com.apple.quarantine ~/Downloads/cloudpackage-v1.zip
Linux:
- No action needed (file blocking not applicable)
- Extract the ZIP file into your BrainCell directory, entering the password when prompted.
2.2.3 Step 2: Compile NEURON Mechanisms (If Needed)
⚠️ Only perform this step if:
- You added new
.modfiles, OR - You modified existing mechanism files
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
build_mechs.bat(if you used it)
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:
- A console window with NEURON initialization messages
- The BrainCell main window
- Options to select Astrocyte or Neuron mode
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:
- ❌ NEURON is not installed
- ❌ Python/Anaconda is not installed
- ✅ Fresh OS or minimal system
Typical users: New users, fresh installations, dedicated simulation machines
2.3.2 Recommended Stable Configuration
For reliable operation across all platforms:
- Anaconda: 2023.09 or later
- NEURON: 8.2.2 or later (with Python 3.7–3.11)
Discussion and updates: https://forum.neuroalgebra.net/viewtopic.php?p=171#p171
2.3.3 Step 1: Install Anaconda
Windows
- Download Anaconda 2023.09:
- Direct link: https://neuroalgebra.net/assets/Anaconda3-2023.09-0-Windows-x86_64.exe
- Run the installer:
- Select "Just Me" (not "All Users")
- Use default installation path
- ✅ Check "Add Anaconda to PATH" (important!)
- Accept other default options
- Restart Windows
macOS
- Download Anaconda (Intel or Apple Silicon):
- Visit: https://www.anaconda.com/download
- Choose the appropriate installer for your Mac
- Open the downloaded
.pkgfile and follow the installer - Open Terminal and verify installation:
conda --version
python --version
- If conda is not recognized, add to PATH:
echo 'export PATH="$HOME/anaconda3/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
(Use ~/.bash_profile if you're using bash instead of zsh)
Linux
- Download Anaconda:
wget https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh
- Install:
bash Anaconda3-2023.09-0-Linux-x86_64.sh
- Follow the prompts:
- Accept the license
- Confirm installation location (default:
~/anaconda3) - Yes to initializing Anaconda
- Restart terminal or run:
source ~/.bashrc
- Verify:
conda --version
python --version
2.3.4 Step 2: Install NEURON
Windows
- Download NEURON 8.2.2:
- Direct link: https://neuroalgebra.net/assets/nrn-8.2.2-0-setup.exe
- Run the installer:
- Use default installation options
- Install to a simple path (e.g.,
C:\nrn) - The installer includes Python interfaces for Anaconda
- Restart Windows
- Verify installation by opening Command Prompt:
nrniv -python
You should see the NEURON prompt. Type quit() to exit.
macOS
- Download NEURON for macOS:
- Visit: https://neuron.yale.edu/neuron/download
- Choose the
.pkginstaller for your architecture (Intel/Apple Silicon) - Run the installer and follow prompts
- Verify installation:
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:
- Install dependencies:
sudo apt-get install build-essential libncurses-dev libreadline-dev \
libx11-dev libxt-dev bison flex automake libtool
- Download NEURON source:
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 and compile:
./configure --prefix=$HOME/neuron --with-nrnpython=python3
make
make install
- Add to PATH in
~/.bashrc:
export PATH="$HOME/neuron/x86_64/bin:$PATH"
export PYTHONPATH="$HOME/neuron/lib/python:$PYTHONPATH"
- Reload:
source ~/.bashrc
- Verify:
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:
- Console window with initialization messages
- BrainCell main window
- Astrocyte/Neuron mode selection
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:
- ⚠️ Python/Anaconda is installed, but NEURON is not
- ⚠️ NEURON is installed, but Python is not
- ⚠️ NEURON cannot find Python
- ⚠️ Multiple Python versions exist on your system
- ⚠️ Previous installation attempts failed
- ⚠️ NEURON launches but BrainCell doesn't work
This is the most common cause of installation problems.
2.4.2 ⚠️ CRITICAL RECOMMENDATION
❌ DO NOT:
- Attempt to patch your current installation
- Manually edit PATH variables
- Install additional Python versions
- Try to "fix" NEURON/Python integration manually
✅ 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
- Uninstall NEURON:
- Settings → Apps → Find "NEURON" → Uninstall
- Uninstall Anaconda/Python:
- Settings → Apps → Find "Anaconda" or "Python" → Uninstall all versions
- Remove remaining directories:
- Delete:
C:\nrn(if exists) - Delete:
C:\Users\[YourName]\anaconda3(if exists) - Delete:
C:\Users\[YourName]\AppData\Local\Programs\Python(if exists) - Clean PATH variable:
- Press Win, type "environment variables"
- Select "Edit the system environment variables"
- Click "Environment Variables"
- In both "User variables" and "System variables", edit PATH
- Remove any entries containing "python", "anaconda", or "nrn"
- Restart Windows (critical!)
2.4.3.3 macOS
- Remove Anaconda:
rm -rf ~/anaconda3
rm -rf ~/.conda
- Remove NEURON:
sudo rm -rf /Applications/NEURON
rm -rf ~/neuron
- Clean PATH:
Edit ~/.zshrc (or ~/.bash_profile):
nano ~/.zshrc
Remove lines containing "anaconda", "conda", "neuron", or "nrn"
Save and reload:
source ~/.zshrc
- Restart your Mac (recommended)
2.4.3.4 Linux
- Remove Anaconda:
rm -rf ~/anaconda3
rm -rf ~/.conda
- Remove NEURON:
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
- Clean PATH:
Edit ~/.bashrc:
nano ~/.bashrc
Remove lines containing "anaconda", "conda", "neuron", or "nrn"
Save and reload:
source ~/.bashrc
- Restart your system (recommended)
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:
- Anaconda first
- NEURON second
- BrainCell third
2.5 Advanced Option: Dedicated User Account (Optional)
For the cleanest possible environment, create a new OS user account:
Windows
- Press Win+R, type
netplwiz, press Enter - Click "Add" → Create a local account (not Microsoft account)
- Log in as this new user
- Follow Category 2 installation steps
macOS
- System Preferences → Users & Groups
- Click the lock, authenticate
- Click "+" to add a new user (Standard account)
- Log in as this new user
- Follow Category 2 installation steps
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:
- Ensure ZIP and batch files are unblocked (see Category 1, Step 3)
- Run PowerShell command:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
- Try running from Command Prompt:
cd C:\braincellinit.bat
Check for error messages
macOS/Linux
Symptoms: Script doesn't execute or permission denied
Solutions:
- Make script executable:
chmod +x init.sh
- Try running:
./init.sh
- Check for errors in terminal output
2.6.1.2 Issue: Mechanisms fail to compile
Windows
Solution: Install Microsoft C++ Build Tools
- Download from: https://visualstudio.microsoft.com/downloads/
- Scroll to "Build Tools for Visual Studio"
- Install "Desktop development with C++" workload
- Re-run
build_mechs.bat
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:
- Verify both NEURON and Anaconda are 64-bit
- Check installation order (Anaconda first, then NEURON)
- Verify Python from terminal:
python --version
- Test NEURON with Python:
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:
- Ensure you're using Anaconda's Python:
which python # macOS/Linux
where python # Windows
Should point to Anaconda directory
- Install missing packages:
conda install numpy matplotlib scipy
- Verify NEURON Python module:
python -c "import neuron; print(neuron.__version__)"
2.6.1.3 Issue: Permission errors (macOS/Linux)
Symptom: "Permission denied" when running scripts
Solutions:
- Make all scripts executable:
chmod +x *.sh *.hoc
- Check file ownership:
ls -la
Files should be owned by your user, not root
- If files are owned by 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:
- Install Rosetta 2:
softwareupdate --install-rosetta
- Use x86_64 versions of Anaconda and NEURON
- Run Python in Rosetta mode:
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:
- Check the full error message in the console
- Take a screenshot of the error
- Visit the forum: https://forum.neuroalgebra.net
- Post your issue including:
- Your operating system and version
- Your category (1, 2, or 3)
- Complete error message
- Steps you've already tried
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
3 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):
- 3D Main Process Tree – Obtain a full 3D reconstruction from NeuroMorpho.org (SWC, HOC, OBJ, ZIP). – If unavailable, generate an artificial arbour with typical branching and diameters for the cell type.
- Astrocyte Nano-structure Samples – Prepare ≈20–50 nanoscopic astroglial processes from serial-section 3D EM. – BrainCell uses these to derive statistical rules for generating realistic thin astrocytic processes.
- Neuron Nano-structure and Spines – BrainCell can auto-generate dendritic spines with adjustable density, size, and synapse placement. – Synapses can lie on spines or dendritic shafts; users can customise patterns and complexity.
- Tissue Volume Fraction – Mean proportion of tissue occupied by astroglia and neurons versus distance from soma. – Obtain from in situ two-photon imaging or published data.
- Membrane Surface and Volume Ratios – Mean surface density and surface-to-volume ratio of fine processes, typically from 3D EM.
- Electrophysiological Properties – A representative I–V curve from somatic patch-clamp recordings. – Optional: neurotransmitter-uncaging responses, extracellular ion changes, Ca²⁺ wave speed, etc., to refine the model.
- – Other functional data (e.g., responses to neurotransmitter uncaging, extracellular ion changes, calcium wave speed) are optional but can help refine the model.
4 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
- Navigate to the folder where you extracted BrainCell.
- Run the startup script:
- Windows: double-click init.bat
- macOS / Linux: run the corresponding startup file (init.hoc or a provided terminal command).
The BrainCell main window will open, displaying the Simulation Cell Configuration menu (Figure 2).
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:
- Astrocyte or Neuron - pick the cell type you want to simulate.
- For each type, you have three options:
- Base Geometry – create or modify a new cell with custom 3D and nanoscale features.
- BrainCell Export – load an existing, pre-built cell with nanostructures (faster for repeated simulations).
- Note: you cannot change the geometry of a loaded export.
- External Simulations – load an advanced HOC model with its own biophysics (e.g., from ModelDB) that uses a custom nrnmech.dll.
Select the option that matches your workflow to proceed.
- Astrocyte Astro / Base.
- BrainCell Export/Astrocyte Astro / Nano.
- Neuron Neuron / Base.
- BrainCell Export/Neuron Neuron / Nano.
- External Simulations External Simulations.
5 Astro/ Base. Setting up and running BRAINCELL: Astrocyte configuration.
5.1 Generate astocyte morphology.
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):
- Command Console (A) - displays system messages and the progress of loading simulation components (cmd.exe).
- Astrocyte Model Panel (B) - the main interface for loading or creating astrocyte geometries. Users can select predefined structures or import custom models that include soma and dendritic branches.
- Parameter Panel (C) - allows adjustment of key geometric parameters, such as:
- Maximum number of stalks per dendrite, and
- Number of leaves per stalk. These parameters define the density of nanoscopic astrocytic processes. Large values may require a computing cluster for simulation.
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.
.
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:
- Press “Select Library Stem Tree.”
- In the dialog window, navigate to the folder Astrocyte/New Style and select a file containing 3D geometry.
- A 3D viewer window will open showing the structure.
- Click “Use this” to proceed, or “Import another” to try a different file.
- The OriginalDendrite parameter defines the number of main branches (dendrites in NEURON terminology). The NeuroMorpho.org database can be used as a reference for compatible file formats.
- Once selected, the structure will appear in the preview panel (Fig. 5A).
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
- Editing Endfoot Geometry
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.
- Loading a Reconstructed Stem Tree
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:
- X–Y scale (pixel / µm)
- Z scale (pixel / µm)
- X–Y shift (µm) The window automatically closes once parameters are applied.
💡 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:
- Select “Select Diameter Distribution for Nano Geometry”, or
- Press “Start Astro.”
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.
.
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.
6 Generating astroglial morphology on the nanoscale
6.1 The geometry of nanoscopic processes
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).
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:
- Switch to “Some Dendrites”: change from “All Dendrites” to limit nano-geometry creation to selected dendrites.
- Initiate Reseed: press “Reseed” to open a new window for specifying placement options.
- Specify Locations: define which regions of the dendritic tree will host nanostructures.
- Select Dendrites: choose the target dendrites in the dialogue.
- Finalise: press “Done” to generate an astrocyte with nanostructures localised to the chosen branches.
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
- - branch diameter at distance from soma,
- - scaling coefficient (scalingDiam),
- - distance from soma (µm).
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:
- Nano geometry modification: Users can add and modify spines' nano geometry to study the impact of structural changes on neuron behaviour.
- Biophysical mechanisms addition: The tool enables users to add and change various biophysical mechanisms to neurons to investigate their impact on neuron behaviour.
- 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.
- Simulation models: Users can choose various modes to simulate the neuron's behaviour accurately. The simulation models include voltage clamp, current clamp, and dynamic clamp.
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.
Figure 7. Geometrical analysis panels generated by the “Geometrical Parameters” command. Displayed windows (from top left):
- Surface-to-volume ratio distribution
- Tissue volume fraction
- Total cell volume (cumulative with distance from the soma)
- Total cell surface area
- Diameters of primary processes
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.
- Nano geometry modification: Users can add and modify spines' nano geometry to study the impact of structural changes on neuron behaviour.
- Biophysical mechanisms addition: The tool enables users to add and change various biophysical mechanisms to neurons to investigate their impact on neuron behaviour.
- 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.
- Simulation models: Users can choose various modes to simulate the neuron's behaviour accurately. The simulation models include voltage clamp, current clamp, and dynamic clamp.
The simulation tool's main window provides the necessary features to simulate and analyse behaviour effectively.
7 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.
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:
- In the main menu, click “Astro + Nano” (Fig. 8A). This opens the Download Panel.
- Follow the prompts to open the NEURON Basic Panel, which helps locate the previously prepared astrocyte file containing nanostructural data.
- Select the astrocyte morphology to load.
- Once selected, BrainCell will open new options for simulation setup and biophysical mechanism management.
At this stage, you can:
- Simulate physiological processes using the selected astrocyte, and
- Manage its biophysical and intracellular mechanisms.
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.:
- Nano geometry modification: Users can add and modify spines' nano geometry to study the impact of structural changes on neuron behaviour.
- Biophysical mechanisms addition: The tool enables users to add and change various biophysical mechanisms to neurons to investigate their impact on neuron behaviour.
- Edit Gap Junction: The tool facilitates the addition and distribution of different types of gap junction on the cell, enabling the study of the cell's connectivity and behaviour.
- 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.
- Simulation models: Users can choose various modes to simulate the neuron's behaviour accurately. The simulation models include voltage clamp, current clamp, and dynamic clamp.
The neuron simulation tool's main window provides the necessary features to simulate and analyse neuron behaviour effectively.
8 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:
- Cell Structure Editor (Fig. 9A–B): Displays the neuron’s soma, dendritic tree, and axon.
- If an axon is not defined, BrainCell can automatically generate a simple default one, or you can import it from another project.
- Geometric parameters can be adjusted later through the editor.
- Each structural element (soma, dendritic branch, axon) must have a unique name; duplicated names will generate an error message.
- Spine Settings (Fig. 9C):
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:
- Choose your desired configuration in the setup window.
- Click OK to confirm.
- BrainCell will generate the 3D neuron model, which you can:
- Use directly for simulations,
- Combine with other neuron or astrocyte models, or
- Replace later with a different geometry from the database.
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):
- Panels A–B illustrate the import process, allowing identification of soma, dendrites, and axon, and setting of the maximum number of spines for the principal dendrite.
- Panel C shows the selected structure, where you can either accept it or load an alternative morphology.
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:
- Refine and customise cell geometry and morphology,
- Visualise modifications in 3D, and
- Add or configure biophysical mechanisms with spatially variable or stochastic properties.
This workflow enables the construction of realistic, fully customisable neuronal models ready for advanced simulation.
9 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:
- Combine the neck and head of dendritic spines into a single functional unit, or
- Split dendritic branches into specific regions, such as proximal and distal segments.
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 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
- Nano geometry modification: “Seed Spines” Enables the addition or modification of spine nano-geometry. This feature allows researchers to study how fine structural changes in dendritic spines affect synaptic integration and overall neuronal dynamics.
- Edit Gap Junction. Opens a dedicated editor for creating new or modifying existing gap junctions. Users can define their spatial distribution, conductance, and connectivity patterns to match specific network configurations or experimental data..
- Biophysical mechanisms addition: Provides options to introduce, remove, or adjust membrane and intracellular mechanisms (e.g., ion channels, pumps, transporters). These modifications allow exploration of how molecular mechanisms influence neuronal excitability and signal propagation..
- Synapse distribution: Facilitates the placement and classification of different synapse types across the dendritic tree. This enables detailed investigation of neuronal connectivity and synaptic input integration.
- Edit extracellular source. Allows full customisation of the extracellular ionic environment surrounding the neuron. Users can define the concentrations and types of ions or neurotransmitters, thereby controlling external conditions for specific simulation scenarios.
- Simulation models: BrainCell provides a library of ready-to-run simulation types, all accessible through the central SimManager once a cell geometry and biophysics preset have been loaded. The simulations are grouped by cell type and experimental paradigm.
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:
- Create different spine distributions – design unique spine patterns for different dendritic regions.
- Customise spine properties – adjust spine size, shape, electrical behaviour, and randomness within each set.
- Fine-tune control – edit each spine set individually for precise modelling.
10.2 How to Use the Spine Sets Feature
- Open Spine Sets
- Locate the “Spine Sets” option in the BrainCell interface (its location may vary slightly by version).
- Primary Panel
- Add Spine Set – click to create a new group of spines with chosen characteristics.
- Remove Spine Set – select an existing group and delete it.
- Auxiliary Panel
- Visualise Spines – view your neuron model with spines colour-coded by set to see where they are located.
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:
- Add, edit, or delete a spine set,
- Reseed all sets to reset their placement,
- Toggle between Show all sets and Show this set only,
- Click Done to finish and save changes.
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 11b. Panels for managing the spatial distribution of spine seeds.
10.4 Spine Seeding Panels
Left Panel - Single Spine Set
- Choose where to place spines: all dendrites or specific dendrites.
- Set spine density, including the maximum number of spines per section.
- Adjust the minimum distribution of spines along branches.
- Reseed the current set to generate a new random placement.
- Click Apply to confirm changes.
Right Panel - Seeded Dendrite(s)
- Select individual dendrites or sub-sections for spine placement.
- Use the mouse to click dendrites; hold Shift to select multiple.
- See a 3D visualisation of the neuron with highlighted areas where spines will be placed.
- View the number of dendritic sections selected.
- Click Done to finalise your selection.
10.5 Panel “Where to Seed the Nanostructures”
- (Fig.11b) This tab enables precise spatial control of spine distribution across the neuronal dendritic tree:
- Click directly on the dendrites in the 3D viewer to define spine locations.
- Hold Shift to select multiple dendrites simultaneously.
- Once placement is satisfactory, click Done to save the configuration.
- You may revisit this panel at any time to modify or reseed the distribution.
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.
Figure 12. Spine Geometry Modification Panel
- Main Panel of Spine Geometry: This central panel provides options and controls for modifying the geometry of spines within the dendritic tree.
- Panel for Uniform Distribution: This sub-panel is dedicated to achieving a uniform distribution of spines across the dendritic tree and offers precise control over their arrangement.
- Panel for Non-Uniform Distribution: In this sub-panel, spines are distributed non-uniformly using a user-defined formula, allowing for customised and intricate spine arrangements.
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:
- Regular – spines are placed at predictable intervals.
- Uniform – spines are spaced randomly but evenly overall.
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:
- Minimum: 2 segments
- No maximum limit (but more segments slow down calculations). Use the slider on the panel to set the desired level.
10.7.4 4. Defining Synapse Distance
Synapse spacing is critical for realistic models. BrainCell lets you:
- Adjust the minimum distance between synapses, either uniformly or non-uniformly (Fig. 12 B–C).
- Use a stochastic element - placement includes some randomness by default.
- For non-uniform patterns, enter a custom Python-style formula in a single line, then click Apply to generate the pattern.
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.
- Choose a regular or uniform distribution.
- Load predefined experimental templates when available.
- Adjust spine complexity and synapse spacing to balance biological realism and simulation speed.
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 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:
- Compartment Operations
- Split or merge compartments to change the model’s structure.
- Rename compartments for better organisation.
- Rescanning the Model
- Deep Rescan – use when you add new cell areas not originally listed by BrainCell; updates the model to include them.
- Light Rescan – use after adding new mechanisms so they integrate correctly.
- Export & Import
- Export to JSON – save your current set of biophysical mechanisms in a JSON file for backup or sharing.
- Import from JSON – quickly load previously saved mechanisms into your current model.
These features let you customise the cell’s structural regions, integrate additional mechanisms, and keep a reusable library for future simulations.
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
- Mechanisms Folder – shows a complete list of available mechanisms.
- Displayed Neuron Components – visualises the cell regions you’ve already built.
12.2.2 2. Two Display Modes
- Initial Mode – shows which mechanisms are present in each neuron segment.
- Secondary Mode – highlights the exact location of each mechanism within those segments.
12.2.3 3. Selecting Mechanisms
- Tick the checkboxes next to the desired mechanisms to include or exclude them for your simulation.
12.2.4 4. Cell-Part Operations
- Subgroup, merge, or rename structural parts to organise the neuron model more effectively.
12.2.5 5. Mechanism Interaction & Advanced Tools
- Insert or remove mechanisms dynamically.
- Adjust spatial distribution for precise control of where each mechanism acts.
- Visualise spatial inhomogeneity to fine-tune gradients or non-uniform distributions.
- Stochastic mechanism analysis – explore random or probabilistic behaviours of mechanisms.
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
- Select the Compartment to Split
- Choose the compartment you want to divide (e.g., a dendrite).
- Click the Split button.
- A graphical view of the selected compartment (such as the dendritic tree) will appear.
- Choose the Subparts
- Select the sections to include in the new sub-compartment.
- Highlighted areas will appear red, making it clear which segments you’ve selected.
- Name the New Subpart
- Click Done when your selection is complete.
- A prompt will appear to enter a unique name for the new sub-compartment (e.g., DendritesNew).
- Click Accept to confirm.
- Assign Biophysical Mechanisms
- The new sub-compartment will automatically appear in the Biophysical Mechanisms panel.
- From here, you can add or edit its properties (e.g., ion channels, capacitance, synaptic inputs) separately from the original 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.
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:
- Open the Merge Tool
- Go to the Manager of Biophysics panel.
- Under Compartment Operations, select Merge 2+ compartments into 1.
- Select Compartments to Merge
- A list of available compartments will appear (e.g., Soma, Dendrites, Axon, Spine Neck, Spine Head).
- Tick the checkboxes next to the compartments you want to combine (for example, merge Dendrites and Axon into one).
- Confirm the Merge
- Click Next.
- Review the prompt and confirm the operation.
- The selected compartments will be combined into one, sharing a single set of biophysical mechanisms.
- Adjust Biophysical Properties
- After merging, check the new compartment under Mechanism Operations.
- Add or edit its properties (e.g., ion channels, passive membrane settings).
12.5.1 Notes on Merging
- Use Deep Rescan or Light Rescan (in the Manager of Biophysics) to ensure that geometry and mechanism updates are correctly applied.
- Always verify the model after merging. Combining regions may alter simulation accuracy or behaviour.
- Merging is helpful when detailed compartmentalisation is unnecessary or when you want to reduce computational load.
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.
12.6.1 Steps to Rename a Compartment
- Open the Rename Tool
- Go to the Manager of Biophysics panel.
- Under Compartment Operations, click Rename a comp.
- Select the Compartment
- A list of current compartments will appear (e.g., Soma, Dendrites, Axon, Spine Neck, Spine Head).
- Choose the one you want to rename.
- Enter a New Name
- A pop-up window will ask for a unique name.
- Type the desired name (e.g., change Dendrites to DendriticBranch1).
- Click Accept to confirm.
- Check the Update
- The new name will appear everywhere in the model interface.
- Perform a Deep Rescan or Light Rescan to ensure the change is applied throughout the model.
12.6.2 Notes about compartment
- Each compartment name must be unique to avoid conflicts.
- Renaming only changes the label - it does not affect the geometry or biophysical mechanisms.
- Using clear, descriptive names makes it easier to work with complex models.
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.
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
- Select a Mechanism
- Click on the mechanism you want to change.
- A context menu will appear (Fig. 15C).
- Choose What to Edit
- The menu allows you to edit:
- Global variables
- State variables
- Parameters
- Click any of these to open a detailed editing window (Fig. 15D).
- Adjust Values and Heterogeneity
- In the editing window, you can view the current value of the selected variable (if it’s spatially uniform).
- To make the variable spatially inhomogeneous, click “Define as a function of distance.”
- This opens the Heterogeneity Editor (Fig. 15B), where you can define how the variable changes across the cell.
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:
- The upper panel lists the segments of each neuron part (e.g., soma, dendrites, axon).
- Heterogeneity is defined per segment, not per exact physical coordinate.
For example:
- If a dendrite has only one segment, it will be treated as uniform, no matter its physical length.
- To achieve more detailed spatial variation, increase the number of segments.
- Keep in mind: more segments = higher accuracy but longer computation time.
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
- Simple Model
- Choose from predefined mathematical profiles:
- Constant value
- Linear
- Quadratic
- Polynomial (2+ parameters)
- Exponential
- Useful for straightforward, analytical gradients.
- Custom Function
- Define your own function directly in the interface.
- Can be written in NEURON hoc syntax or Python.
- Enter the function in the pop-up editor.
- Custom Function from File
- Load a user-written function saved in an external file (NEURON or Python format).
- Ideal for complex or pre-tested formulas.
- Table Function
- Use experimental data to define heterogeneity.
- Import values manually or upload a text file containing the data.
- Special Function
- Visualise the neuron’s segmentation and discretisation.
- Gives precise control over how the cell is divided into segments for modelling.
- Segments are colour-coded for clarity.
13.1.4 Visualising Spatial Heterogeneity
At the bottom of the panel, you can choose how to visualise heterogeneity:
- Option 1 - Distance from Soma View heterogeneity as a function of distance from the soma to quickly spot regions with high or low variability.
- Option 2 - Spatial Colour Map Display a colour gradient directly on the neuron:
- Cool colours = low heterogeneity
- Warm colours = high 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.