OSCR

Optimization, implementation, and performance of TMS coils with maximum focality and various stimulation depths.

Code ↔ Paper

1 match between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 1 match
  1. [1] § Methods and materials › Coil shape and former design ↔ optimize/happened.m, lines 73–144 · score 0.52 · thick wire meshes, ribbed

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

MATLAB · 145 lines · 4.1 KB · no license · 1 match

  1. load('hhmeshingkit.mat')
  2. filename='renamesh';
  3. for i=1:20
  4. plot3(rs(wid1(i):wid2(i),1),rs(wid1(i):wid2(i),2),rs(wid1(i):wid2(i),3))
  5. hold on
  6. text(rs(wid1(i),1),rs(wid1(i),2),rs(wid1(i),3),num2str(i))
  7. end
  8. %find mesh dimensions
  9. wireth1=.00675+.008%+.0005;
  10. wireth2=.00675+.008%+.0005;
  11. nor1=.007%+.0005;
  12. nor2=.015%+.0005;
  13. wirethick=manualmodification3layers(wireth1,wireth2,wid1,wid2,rs);
  14. wirenorfig8=manualmodification3layers(nor2,nor2,wid1,wid2,rs);
  15. wirenorside=wirenorfig8;
  16. wirenorside(wid1(1):wid2(4))=nor1;
  17. wirenorside(wid1(6):wid2(7))=nor1;
  18. wirenorside(wid1(10):wid2(9))=nor1;
  19. wirenorside(wid1(20):wid2(20))=nor1;
  20. wireth1=.003%+.0005;
  21. wireth2=.00675%+.0005;
  22. wireth=manualmodification3layers(wireth1,wireth2,wid1,wid2,rs);
  23. %mirror the mesh
  24. rsp=rs;
  25. rs=rsp;
  26. np=numel(rs(:,1));
  27. rs(end+1:2*end,1)=rs(1:np,1);
  28. rs(np+1:2*np,3)=rs(1:np,3);
  29. rs(np+1:2*np,4)=rs(1:np,4);
  30. rs(np+1:2*np,2)=-rs(1:np,2);
  31. rs(np+1:2*np,5)=-rs(1:np,5);
  32. wirethick(end+1:2*end)=wirethick(1:np);
  33. wirenorfig8(end+1:2*end)=wirenorfig8(1:np);
  34. wirenorside(end+1:2*end)=wirenorside(1:np);
  35. wireth(end+1:2*end)=wireth(1:np);
  36. %% resample rs
  37. len=sqrt((rs(2:end,1)-rs(1:end-1,1)).^2+...
  38. (rs(2:end,2)-rs(1:end-1,2)).^2+...
  39. (rs(2:end,3)-rs(1:end-1,3)).^2);
  40. [B,I]=sort(len);
  41. I=I(B==0);
  42. rs(I,:)=[];
  43. wireth(I)=[];
  44. wirethick(I)=[];
  45. wirenorfig8(I)=[];
  46. wirenorside(I)=[];
  47. len=sqrt((rs(2:end,1)-rs(1:end-1,1)).^2+...
  48. (rs(2:end,2)-rs(1:end-1,2)).^2+...
  49. (rs(2:end,3)-rs(1:end-1,3)).^2);
  50. len=cumsum([0;len(:)]);
  51. N=ceil(len(end)/.002);
  52. locs=0:len(end)/N:len(end);
  53. xcoil2=interp1(len,rs(1:end,1),locs,'line');
  54. ycoil2=interp1(len,rs(1:end,2),locs,'line');
  55. zcoil2=interp1(len,rs(1:end,3),locs,'line');
  56. wireth=interp1(len,wireth,locs,'line');
  57. wirethick=interp1(len,wirethick,locs,'line');
  58. wirenorfig8=interp1(len,wirenorfig8,locs,'line');
  59. wirenorside=interp1(len,wirenorside,locs,'line');
  60. xh=interp1(len,rs(1:end,4),locs,'line');
  61. yh=interp1(len,rs(1:end,5),locs,'line');
  62. %% generate meshes
  63. clear rs
  64. rs(:,1)=xcoil2;
  65. rs(:,2)=ycoil2;
  66. rs(:,3)=zcoil2;
  67. wireth=(wireth(2:end)+wireth(1:end-1)).'/2;
  68. wirethick=(wirethick(2:end)+wirethick(1:end-1)).'/2;
  69. wirenorfig8=(wirenorfig8(2:end)+wirenorfig8(1:end-1)).'/2;
  70. wirenorside=(wirenorside(2:end)+wirenorside(1:end-1)).'/2;
  71. drs=rs(2:end,:)-rs(1:end-1,:);
  72. rs1=(rs(2:end,:)+rs(1:end-1,:))/2;
  73. rs=rs1;
  74. nh=1./sqrt(sum(drs.^2,2));
  75. drs(:,1)=drs(:,1).*nh;
  76. drs(:,2)=drs(:,2).*nh;
  77. drs(:,3)=drs(:,3).*nh;
  78. clear nhat
  79. nhat(:,1)=nx((xh(2:end)+xh(1:end-1))/2,(yh(2:end)+yh(1:end-1))/2);
  80. nhat(:,2)=ny((xh(2:end)+xh(1:end-1))/2,(yh(2:end)+yh(1:end-1))/2);
  81. nhat(:,3)=nz((xh(2:end)+xh(1:end-1))/2,(yh(2:end)+yh(1:end-1))/2);
  82. tan=cross(drs,nhat);
  83. nh=1./sqrt(sum(tan.^2,2));
  84. tan(:,1)=tan(:,1).*nh;
  85. tan(:,2)=tan(:,2).*nh;
  86. tan(:,3)=tan(:,3).*nh;
  87. %thick wire mesh
  88. [rs1,rs2,rs3,rs4]=givethickness(wirethick,wirenorfig8,tan,nhat,rs);
  89. [te2p,p,reg,port,portid,hexmesh]=maketetramesh(rs1,rs2,rs3,rs4);
  90. close all
  91. t2p=surftri(p,te2p);
  92. [p,t2p]=addcube(p,t2p,-0.04);
  93. trisurf(t2p,p(:,1),p(:,2),p(:,3));
  94. tr=triangulation(t2p,p);
  95. stlwrite(tr,strcat(filename,'thickwire.stl'))
  96. pause
  97. %ribbed wire mesh
  98. [rs1,rs2,rs3,rs4]=givethickness(wireth,wirenorfig8,tan,nhat,rs);
  99. [te2p,p,reg,port,portid,hexmesh]=maketetramesh(rs1,rs2,rs3,rs4);
  100. close all
  101. t2p=surftri(p,te2p);
  102. t2p=surftri(p,te2p);
  103. load C:\Users\ljg24\Desktop\shamcoil\generatecoilmesh\fourcorners.mat
  104. t2p=cat(1,t2p,tri+numel(p(:,1)));
  105. p=cat(1,p,pS);
  106. [p,t2p]=addcube(p,t2p,-0.04);
  107. trisurf(t2p,p(:,1),p(:,2),p(:,3));
  108. tr=triangulation(t2p,p);
  109. stlwrite(tr,strcat(filename,'ribbedwire.stl'))
  110. pause
  111. %stepped wire mesh
  112. [rs1,rs2,rs3,rs4]=givethickness(wirethick,wirenorside,tan,nhat,rs);
  113. [te2p,p,reg,port,portid,hexmesh]=maketetramesh(rs1,rs2,rs3,rs4);
  114. t2p=surftri(p,te2p);
  115. [p,t2p]=addcube(p,t2p,-0.04);
  116. trisurf(t2p,p(:,1),p(:,2),p(:,3));
  117. tr=triangulation(t2p,p);
  118. stlwrite(tr,strcat(filename,'steppedwire.stl'))
  119. axis equal

happened.m at commit 0b96455, no license · at the source

Overview

  1. Department of Electrical and Computer Engineering, Purdue University, West Lafayette, IN 47906, Unites States of America
  2. Department of Psychiatry and Behavioral Sciences, Duke University, Durham, NC 27710, Unites States of America
  3. Department of Neurology, Duke University, Durham, NC 27710, Unites States of America
  4. Department of Electrical and Computer Engineering, Duke University, Durham, NC 27708, Unites States of America
  5. Department of Neurosurgery, Duke University, Durham, NC 27710, Unites States of America
  6. Department of Biomedical Engineering, Duke University, Durham, NC 27708, Unites States of America
Institutions: Duke University (United States); Purdue University West Lafayette (United States)
Journal: Journal of neural engineering, volume 23, issue 2, article 026001
Dates: received 30 October 2023; accepted 9 February 2026; published online 2 March 2026; in print 1 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1088/1741-2552/ae4382 · PMID 41662768 · PMCID PMC12951185 · OpenAlex W7128478878
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: other (modality), human (organism), computational (subfield)
Methods: Spectral & time-frequency, Preprocessing, Evoked potentials, Statistics, Physiology & signal measures
Keywords: transcranial magnetic stimulation, TMS, coil, focal, depth, energy, integer linear programming optimization
MeSH: Brain*, Transcranial Magnetic Stimulation*, Computer Simulation, Electromagnetic Fields, Equipment Design, Humans (* major topic)
Topic: Transcranial Magnetic Stimulation Studies (Neurology, Neuroscience), according to OpenAlex
Funding: National Institute of Mental Health (R00MH120046); NINDS NIH HHS (R01 NS088674); National Institute of Neurological Disorders and Stroke of the National Institutes of Health (R01NS088674-S1); NIMH NIH HHS (RF1 MH114268, R00 MH120046)
Citations: cited by 2 papers (Europe PMC); 63 references in the paper

Abstract

Objective. Conventional transcranial magnetic stimulation (TMS) coils generate a diffuse and shallow electric field (E-field) in the brain, resulting in limited spatial targeting precision (focality). Previously, we developed a methodology for designing theoretical TMS coils to achieve maximal focality for a given E-field penetration depth and minimize the required energy. This paper presents the practical design, implementation, and characterization of such focal-deep TMS (fdTMS) coils. Approach. We considered how the coil’s shape affects energy requirements and designed a curved ‘hat’ former that enables a wide range of coil placements while improving energy efficiency compared to flat formers. To improve energy efficiency, we introduced optimized-coverage partial-multi-layer windings of the coil. Through simulations with a spherical head model, we benchmarked the focality of the fdTMS E-field in the brain and the scalp, as well as the required energy, against conventional TMS coils. We then implemented two fdTMS coil designs with copper wire wound inside a 3d-printed plastic former. Main results. The E-field of the prototype fdTMS coils and conventional figure-8 counterparts were simulated in spherical and realistic head models and measured with a robotic probe, confirming a more compact fdTMS E-field. The fdTMS coils were also compared to two commercial coils with motor mapping in nine human subjects, which confirmed improved focality of fdTMS at the cost of greater E-field spread in the scalp, increased energy loss and heating from the smaller wire diameter and additional windings, and positioning constraints of the curved coil surface. Significance. The study findings inform TMS coil implementation for precise mapping and targeting applications, and the design framework can be leveraged for future coil optimizations.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 1 match between paragraphs and lines of code.

luisgo/fdTMS

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 0b9645535f52a0be77989ed694dd5b852d325f3a, 3 September 2025
Languages: MATLAB (138), Shell (2)
Size: 176 files, 140 scripts
Software Heritage: not archived
Found in: the references
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
141 files

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 140 scripts, each with its path and the digest of its content;
  • 1 match between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability statement

The data that support the findings of this study are openly available at the following URL/DOI: https://github.com/luisgo/fdTMS [63].

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 10 authors, 7 keywords, 6 MeSH terms, 4 funders, 53 references.

Cite

This paper

Gomez, L. J., Murphy, D. L. K., Koponen, L. M., Hamdan, R., Li, Y., Wood, E., Golden, J., Bukhari-Parlakturk, N., Goetz, S. M., & Peterchev, A. V. (2026). Optimization, implementation, and performance of TMS coils with maximum focality and various stimulation depths. Journal of neural engineering, 23(2), 026001. https://doi.org/10.1088/1741-2552/ae4382

BibTeX

@article{gomez2026optimization,
author = {Gomez, Luis J and Murphy, David L K and Koponen, Lari M and Hamdan, Rena and Li, Yiru and Wood, Eleanor and Golden, Jacob and Bukhari-Parlakturk, Noreen and Goetz, Stefan M and Peterchev, Angel V},
title = {{Optimization, implementation, and performance of TMS coils with maximum focality and various stimulation depths}},
journal = {Journal of neural engineering},
year = {2026},
month = mar,
volume = {23},
number = {2},
pages = {026001},
publisher = {IOP Publishing},
issn = {1741-2560},
doi = {10.1088/1741-2552/ae4382},
url = {https://doi.org/10.1088/1741-2552/ae4382},
pmid = {41662768},
pmcid = {PMC12951185}
}

RIS

TY - JOUR
AU - Gomez, Luis J
AU - Murphy, David L K
AU - Koponen, Lari M
AU - Hamdan, Rena
AU - Li, Yiru
AU - Wood, Eleanor
AU - Golden, Jacob
AU - Bukhari-Parlakturk, Noreen
AU - Goetz, Stefan M
AU - Peterchev, Angel V
TI - Optimization, implementation, and performance of TMS coils with maximum focality and various stimulation depths
T2 - Journal of neural engineering
J2 - J Neural Eng
PY - 2026
DA - 2026/03/02
VL - 23
IS - 2
SP - 026001
SN - 1741-2560
PB - IOP Publishing
DO - 10.1088/1741-2552/ae4382
UR - https://doi.org/10.1088/1741-2552/ae4382
LA - en
ER -

CSL-JSON

{
"id": "10.1088/1741-2552/ae4382",
"type": "article-journal",
"title": "Optimization, implementation, and performance of TMS coils with maximum focality and various stimulation depths",
"container-title": "Journal of neural engineering",
"author": [
{
"family": "Gomez",
"given": "Luis J"
},
{
"family": "Murphy",
"given": "David L K"
},
{
"family": "Koponen",
"given": "Lari M"
},
{
"family": "Hamdan",
"given": "Rena"
},
{
"family": "Li",
"given": "Yiru"
},
{
"family": "Wood",
"given": "Eleanor"
},
{
"family": "Golden",
"given": "Jacob"
},
{
"family": "Bukhari-Parlakturk",
"given": "Noreen"
},
{
"family": "Goetz",
"given": "Stefan M"
},
{
"family": "Peterchev",
"given": "Angel V"
}
],
"container-title-short": "J Neural Eng",
"volume": "23",
"issue": "2",
"page": "026001",
"DOI": "10.1088/1741-2552/ae4382",
"PMID": "41662768",
"PMCID": "PMC12951185",
"ISSN": "1741-2560",
"publisher": "IOP Publishing",
"URL": "https://doi.org/10.1088/1741-2552/ae4382",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
2
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1113/jp290979 [code]
A method of compensating for the excitability of spinal motoneurones when estimating the magnitude of potentials evoked in skeletal muscles.
Journal: The Journal of physiology
In common: other, 4 references
[2] doi:10.1038/s41467-026-74215-5 [code]
Multi-metric evaluations of acute psychedelic effects on fMRI brain entropy.
Journal: Nature communications
In common: Optimization Toolbox, Image Processing Toolbox, computational
[3] doi:10.1002/mrm.70469 [code]
Laterally Oscillating Trajectory for Undersampling Slices: LOTUS.
Journal: Magnetic resonance in medicine
In common: Optimization Toolbox, Image Processing Toolbox, computational
[4] doi:10.1002/hbm.70602 [code]
Neuroimaging Correlates of Post-Stroke Pain After Ischemic Stroke: Secondary Analysis of the INSPiRE-TMS Trial.
Journal: Human brain mapping
In common: Optimization Toolbox, Image Processing Toolbox, other
[5] doi:10.1080/07853890.2026.2685416 [code]
Pulmonary and cerebral damage in COVID-19 survivors: is there any association?
Journal: Annals of medicine
In common: Optimization Toolbox, Image Processing Toolbox, other
[6] doi:10.1038/s41467-026-72917-4 [code]
OFC-induced network modularity improves positive symptoms and attentional alertness in schizophrenia: a combined rTMS-fMRI study.
Journal: Nature communications
In common: Optimization Toolbox, Image Processing Toolbox, other
[7] doi:10.1159/000552942 [code]
How Standardized Is Transcranial Magnetic Stimulation Treatment for Depression? Large-Cohort Modeling Reveals Systematic Dosimetric Variability.
Journal: Psychotherapy and psychosomatics
In common: other, 2 references
[8] doi:10.3390/bioengineering13070741
Mapping the Global Trajectory and Key Trends of Temporal Interference Stimulation.
Journal: Bioengineering (Basel, Switzerland)
In common: 2 references
[9] doi:10.1038/s41598-026-46419-8 [code]
Exploring the effect of different neural strategies on the knee joint contact forces during walking in adults.
Journal: Scientific reports
In common: Optimization Toolbox, computational, other
[10] doi:10.3390/brainsci16050530
Transcranial Magnetic Stimulation over the Left Inferior Parietal Lobule Facilitates Early-Stage Processing During Natural Chinese-English Bilingual Reading.
Journal: Brain sciences
In common: other, 2 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.