Deep TMS Targeting via SimNIBS + Unsupervised Analysis
Tags: Computational Neuroscience · Biomedical Engineering · SimNIBS · TMS · Finite Element Simulation · Python · Clustering
This project investigates whether deep transcranial magnetic stimulation (TMS) coils can effectively target deep brain structures commonly addressed by deep brain stimulation (DBS), using biophysical simulation and data-driven analysis.
Using SimNIBS, I ran scalp-wide coil placement optimizations across multiple head reconstructions and then analyzed the resulting optimal coil coordinates in MNI space using clustering and visualization techniques. A second-stage simulation validated field intensity at the target regions using the cluster-derived optimal coordinates.
High-Level Pipeline
- Head model inputs: subject MRI-derived reconstructions and meshes (T1/T2 → headreco output).
- Optimization runs: simulate coil placements across the scalp to find the best location for each target.
- Coordinate normalization: convert subject-space outputs into MNI space via affine transforms.
- Unsupervised analysis: identify consistent “best” scalp regions using clustering + t-SNE.
- FEA validation: re-simulate using representative optimal coordinates to quantify induced field intensity.
Targets
Simulations were run for deep structures motivated by DBS targets / clinical relevance, including:
- Amygdala
- Anterior Cingulate Cortex
- Fornix
- Globus Pallidus
- Hippocampus
- Periaqueductal Gray
- Subthalamic Nucleus
- Ventromedial Thalamic Nucleus
What’s in the Repo
- Optimization scripts:
per-structure Python scripts (e.g.,
find_optimal_coords_for_*.py) that run SimNIBS optimization to estimate best scalp coil placement for each target. - Coordinate transform utilities:
interpret_affine_coordinates.pyfor mapping between subject coordinates and MNI coordinates. - Analysis:
kmeans_clustering.py,agglomerative_clustering.py, andTSNE_visualization.pyto identify trends and stable placement clusters across subjects. - FEA follow-ups:
FEA_simulations_with_optimal_coords*.pyto quantify induced field intensity at the targets using cluster-derived coordinates. - Example data + outputs:
representative head mesh inputs and sample SimNIBS optimization outputs, plus an example
.mshfile containing an e-field intensity map viewable in Gmsh/SimNIBS.
Why It Matters
- Deep TMS is non-invasive and more accessible than DBS, but depth targeting is technically challenging.
- This project uses simulation to systematically test whether deep coils can meaningfully reach subcortical targets.
- The analysis identifies robust scalp placement regions and supports follow-up validation and future studies.
Links
Disclaimer
This work is computational modeling only and is for research/educational purposes. It does not constitute medical advice and is not a clinical treatment recommendation.