Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Neuromodulation code, using RxD #430

Merged
merged 231 commits into from
Sep 30, 2024
Merged
Changes from 1 commit
Commits
Show all changes
231 commits
Select commit Hold shift + click to select a range
fec6224
First approach
Hjorthmedh Apr 5, 2024
483b7e0
Update
Hjorthmedh Apr 8, 2024
23c7829
Merge remote-tracking branch 'origin/master' into neuromod_redux
Hjorthmedh Apr 16, 2024
f79ba2b
Update version number
Hjorthmedh Apr 16, 2024
473c555
Added population unit mesh
Hjorthmedh Apr 29, 2024
92d6f2b
Updated example
Hjorthmedh Apr 29, 2024
fe26d19
Updated readme
Hjorthmedh Apr 29, 2024
5592304
Updated
Hjorthmedh May 2, 2024
a7f65eb
Increased default
Hjorthmedh May 2, 2024
f34a1b1
Updated prob
Hjorthmedh May 2, 2024
8c1547a
Update place.py
wstho May 3, 2024
2637781
Fixed P
Hjorthmedh May 3, 2024
c025be9
Merge branch 'neuromod_redux' of github.com:Hjorthmedh/Snudda into ne…
Hjorthmedh May 3, 2024
ff57a98
Update
Hjorthmedh May 6, 2024
783e287
Removed circular dependency
Hjorthmedh May 6, 2024
1b0cc79
Fixed
Hjorthmedh May 6, 2024
65370a7
Update bend_morphologies.py
wstho May 9, 2024
28098dd
Working on neuromodulation
Hjorthmedh May 10, 2024
71e9a2f
Working on neuromodulation unit test, NOT DONE!
Hjorthmedh May 13, 2024
1bb32e5
missing self reference
wthun May 13, 2024
8e7e3ae
Merge pull request #417 from Hjorthmedh/wstho-patch-1
Hjorthmedh May 13, 2024
e4a1daf
Fixing unit test?
Hjorthmedh May 13, 2024
53d0295
New branch
Hjorthmedh May 13, 2024
c66a6b7
For Wilhelm
Hjorthmedh May 13, 2024
88d11b3
Update
Hjorthmedh May 13, 2024
e45d17b
placeholder for better synapse linking
wthun May 13, 2024
19f6109
Updated
Hjorthmedh May 14, 2024
9a179a0
Merge branch 'neuromod_redux2' of github.com:Hjorthmedh/Snudda into n…
Hjorthmedh May 14, 2024
d076ada
Debugging
Hjorthmedh May 14, 2024
f154a3e
In progress
Hjorthmedh May 14, 2024
b2fe590
Removing old neuromodulation, in progress
Hjorthmedh May 14, 2024
8db2239
OLD Neuromodulation removed
Hjorthmedh May 14, 2024
fb62ba6
Cleanup
Hjorthmedh May 14, 2024
5144349
Working on it
Hjorthmedh May 14, 2024
405b62a
Fixed unit test
Hjorthmedh May 14, 2024
bbe750c
Added open3d to setup.py
Hjorthmedh May 14, 2024
9ea9430
Fixed input_location bug
Hjorthmedh May 16, 2024
2a149b3
Adding SPN FS LTS job
Hjorthmedh May 21, 2024
8ea3b1e
Update readme
Hjorthmedh May 24, 2024
2932294
Update
Hjorthmedh May 28, 2024
7fcf63c
Restored test
Hjorthmedh May 28, 2024
49892c7
Cleanup after RxD mess
Hjorthmedh May 28, 2024
f9b1c9a
Update
Hjorthmedh May 28, 2024
965b376
Updated
Hjorthmedh May 29, 2024
fa6957c
Updated Dardel scripts
Hjorthmedh May 29, 2024
763fe3d
Updating notebooks
Hjorthmedh May 31, 2024
5aad6e3
Merge branch 'neuromod_redux2' of github.com:Hjorthmedh/Snudda into n…
Hjorthmedh May 31, 2024
3f9d2e8
Code cleanup
Hjorthmedh Jun 3, 2024
91ad389
Updated
Hjorthmedh Jun 3, 2024
2849a2f
Channel modulation works
Hjorthmedh Jun 3, 2024
66e0a87
Updated
Hjorthmedh Jun 3, 2024
cdce103
Update
Hjorthmedh Jun 3, 2024
74c328e
Adding DASyn.mod from Wilhelm
Hjorthmedh Jun 3, 2024
164e4c8
Updated
Hjorthmedh Jun 3, 2024
a40ff6a
Working
Hjorthmedh Jun 3, 2024
556b385
gbar_kir 10x
wthun Jun 3, 2024
6de6f68
Comments
Hjorthmedh Jun 4, 2024
154c6cf
Update notebook
Hjorthmedh Jun 4, 2024
0ff778b
Work in progress
Hjorthmedh Jun 4, 2024
34fd14d
SBML converter appears to be working?
Hjorthmedh Jun 4, 2024
1287ac9
Updated
Hjorthmedh Jun 5, 2024
e7bf4c3
Working on example using real dopamine cascades
Hjorthmedh Jun 5, 2024
2f61203
First iteration of neuromodulation notebook
Hjorthmedh Jun 5, 2024
457a874
Added
Hjorthmedh Jun 5, 2024
0633f22
Added RxD synapse integration
Hjorthmedh Jun 5, 2024
6d15ffb
Neuromod example
Hjorthmedh Jun 5, 2024
91e7c41
Updated neuromodulation
Hjorthmedh Jun 10, 2024
8acd7f2
Notebook runs
Hjorthmedh Jun 10, 2024
a364d69
Updated time estimate, and DA
Hjorthmedh Jun 11, 2024
c8c7192
Refs
Hjorthmedh Jun 11, 2024
622d634
Updated honor
Hjorthmedh Jun 11, 2024
b67fbbf
Fixing type
Hjorthmedh Jun 12, 2024
cda14f9
Added weight_scale as optional option for synapses
Hjorthmedh Jun 12, 2024
049ae1a
Removed legacy lists of synapses and netcon objects that Johannas old…
Hjorthmedh Jun 12, 2024
0bd9064
RxD example functional for synapses and external input
Hjorthmedh Jun 12, 2024
5941eb9
Update sten lateral 5
Hjorthmedh Jun 12, 2024
db9b028
Update input.py
wstho Jun 16, 2024
928a41f
Updated projection notebook
Hjorthmedh Jun 18, 2024
9ba6204
Updated unit tests
Hjorthmedh Jun 18, 2024
c847248
Fixed memory leak in virtual input data writing
Hjorthmedh Jun 19, 2024
597a09b
Renaming kir.mod to kirrxd.mod to try and fix conflict in unittest
Hjorthmedh Jun 19, 2024
41ab216
Moved mechanisms to one folder
Hjorthmedh Jun 19, 2024
e185aea
Merge pull request #420 from Hjorthmedh/wstho-patch-1
Hjorthmedh Jun 19, 2024
50e771c
Updated notebooks
Hjorthmedh Jun 24, 2024
8ce6f3c
Added Anu's 2015 D1, D2 models
Hjorthmedh Jun 25, 2024
ec1d9ff
Updated tuning
Hjorthmedh Jun 25, 2024
a82c0cf
Updated
Hjorthmedh Jun 25, 2024
92b93e1
Fixed numba requirement, since neuron python package does not support…
Hjorthmedh Jun 26, 2024
ba5b965
Merge remote-tracking branch 'origin/master' into neuromod_redux2
Hjorthmedh Jun 27, 2024
d17daca
Updated
Hjorthmedh Jun 27, 2024
02132fd
Attempt to circumvent rebuilding of RxD tree, runnable, but WIP
wthun Jun 27, 2024
25b059b
removed unused variables
wthun Jun 27, 2024
34e74b9
RxD build_node_cache called during setup of neurons
Hjorthmedh Jun 28, 2024
04d2e85
Pre modulation update
Hjorthmedh Jul 1, 2024
606f526
Updating reaction diffusion
Hjorthmedh Jul 1, 2024
4e64cde
Prepare dardel example
Hjorthmedh Jul 1, 2024
c9e49b0
Updating scripts
Hjorthmedh Jul 1, 2024
7cd199b
Updated
Hjorthmedh Jul 1, 2024
7da963e
Updated
Hjorthmedh Jul 1, 2024
7827afa
Updated
Hjorthmedh Jul 2, 2024
d11fe09
Merge branch 'neuromod_redux2' of github.com:Hjorthmedh/Snudda into n…
Hjorthmedh Jul 2, 2024
de80679
Adding unset display
Hjorthmedh Jul 2, 2024
99cb8a3
unset DISPLAY
Hjorthmedh Jul 2, 2024
aa997b8
Added rxd conc writer
Hjorthmedh Jul 2, 2024
331dbb2
Updated
Hjorthmedh Jul 2, 2024
88dc4d8
Updated
Hjorthmedh Jul 3, 2024
5a3ec37
data['config'] is now a dictionary in snudda_load
Hjorthmedh Jul 3, 2024
bd2a24d
Added reaction diffusion info to network-synapses.hdf5
Hjorthmedh Jul 3, 2024
799d216
Removed pdb
Hjorthmedh Jul 3, 2024
b7227d4
Updated
Hjorthmedh Jul 3, 2024
69583c6
Fixed unit tests
Hjorthmedh Jul 3, 2024
d737ff8
Unit test
Hjorthmedh Jul 3, 2024
d0ce07d
Unittest
Hjorthmedh Jul 3, 2024
f320628
Updated
Hjorthmedh Jul 4, 2024
59116d6
Renamed SnuddaLoadNetworkSimulation to SnuddaLoadSimulation
Hjorthmedh Jul 5, 2024
f306d7e
Working on DA example
Hjorthmedh Jul 5, 2024
c8c38d7
Updated
Hjorthmedh Jul 5, 2024
e976e9f
Updated scaling
Hjorthmedh Jul 9, 2024
cc5b99f
Updated scaling for RxD
Hjorthmedh Jul 9, 2024
a40469c
Increased scale factor
Hjorthmedh Jul 9, 2024
f593a97
Notebook estimating time constant of dopamine decay
wthun Jul 10, 2024
4de19f3
Added Robert
Hjorthmedh Jul 10, 2024
f0d405b
Added input
Hjorthmedh Jul 10, 2024
78f2da6
Adding dopamine decay
wthun Jul 10, 2024
3b19da0
Switched to DA decay json
Hjorthmedh Jul 10, 2024
8b79f0f
updated RxD weight scaling
wthun Jul 10, 2024
f76be4c
Updated input of DA
Hjorthmedh Jul 10, 2024
a75ab64
Updated conc scaling
Hjorthmedh Jul 11, 2024
2ea8bcc
Updated scaling
Hjorthmedh Jul 11, 2024
061eaf3
Added recording functionality to Snudda
Hjorthmedh Jul 12, 2024
3f32436
Updated exp config
Hjorthmedh Jul 17, 2024
5679e58
Updated
Hjorthmedh Jul 17, 2024
4482657
Updated config
Hjorthmedh Jul 17, 2024
e55ba9c
Updated code
Hjorthmedh Jul 17, 2024
9ea860b
Updated config
Hjorthmedh Jul 17, 2024
41c4855
Fixed
Hjorthmedh Jul 18, 2024
1beebbf
Updated config
Hjorthmedh Jul 18, 2024
ce3d9ed
Only add recording for neurons that are on the worker
Hjorthmedh Jul 18, 2024
20a872f
Updated code
Hjorthmedh Jul 18, 2024
fc7b47c
Fixing unit test
Hjorthmedh Jul 18, 2024
3ced4d6
Working on example
Hjorthmedh Jul 22, 2024
607e45f
fixed directory
wthun Jul 22, 2024
2d7e4ce
test parameters for modulation
wthun Jul 22, 2024
157384e
Work in progress
Hjorthmedh Jul 22, 2024
ebf7057
Updated define_parameters so sectionlist can be a list of string
Hjorthmedh Jul 23, 2024
d409305
Updated notebook
Hjorthmedh Jul 23, 2024
5d2bc28
Fix pushed
Hjorthmedh Jul 23, 2024
ffb102d
notebook for plotting modulation parameters
wthun Jul 25, 2024
d8b1712
Merge branch 'neuromod_redux2' of github.com:Hjorthmedh/Snudda into n…
wthun Jul 25, 2024
a944454
Updated SBML parser
Hjorthmedh Jul 25, 2024
4f849ba
Updated JSON for D1 reactions
Hjorthmedh Jul 25, 2024
9587a1d
Changed sign of D1 modulation
Hjorthmedh Jul 25, 2024
5ecfa93
Updated parser to handle boundary conditions
Hjorthmedh Jul 26, 2024
7326630
Working on trying to fix concentration if boundary_condition
Hjorthmedh Jul 26, 2024
b79533a
If there are virtual neurons in the network, then we should not try t…
Hjorthmedh Jul 28, 2024
264c7dc
Merge pull request #421 from Hjorthmedh/neuromod_redux2
Hjorthmedh Jul 28, 2024
3f28a2f
Merge remote-tracking branch 'origin/master' into neuromod_redux2
Hjorthmedh Jul 28, 2024
efd4667
Fixing ATP and AMP with boundaryCondition=True works
Hjorthmedh Jul 29, 2024
015a8ac
Updated synaptic modulation
Hjorthmedh Jul 29, 2024
eda45b2
Merge pull request #422 from Hjorthmedh/neuromod_redux2
Hjorthmedh Jul 29, 2024
84a4642
Added recording for cortical input
Hjorthmedh Jul 29, 2024
64b9894
Merge pull request #423 from Hjorthmedh/neuromod_redux2
Hjorthmedh Jul 29, 2024
08e607a
Updated DA simulation
Hjorthmedh Jul 30, 2024
ef6e54a
Updated notebook
Hjorthmedh Jul 30, 2024
59b98dd
Added gap junction current recording ability
Hjorthmedh Jul 31, 2024
2952285
Merge pull request #424 from Hjorthmedh/neuromod_redux2
Hjorthmedh Jul 31, 2024
9f44ce8
changed parameters
wthun Jul 31, 2024
9132c7d
Updated neuromodulation example for Virtual Brain
Hjorthmedh Jul 31, 2024
ad0e0f9
Merge pull request #425 from Hjorthmedh/neuromod_redux2
Hjorthmedh Jul 31, 2024
b7d2286
Added 'from mpi4py import MPI' into neuron_modulation.py before the R…
Hjorthmedh Aug 6, 2024
f7a638e
Merge pull request #426 from Hjorthmedh/neuromod_redux2
Hjorthmedh Aug 6, 2024
e3f51d6
Updated neuromodulation parallel simulation
Hjorthmedh Aug 9, 2024
c47eb54
Updated
Hjorthmedh Aug 9, 2024
0037b90
Updated json
Hjorthmedh Aug 9, 2024
c08ec78
Fixed call
Hjorthmedh Aug 9, 2024
76b7774
Updated axon_stump in meta.json
Hjorthmedh Aug 15, 2024
8780e13
Updated replace axon, turns out it is not called unless you use creat…
Hjorthmedh Aug 15, 2024
6b251f9
Updated replace_axon
Hjorthmedh Aug 16, 2024
ab08d59
Corrected error caught my unit test
Hjorthmedh Aug 16, 2024
ba59f21
Added comment
Hjorthmedh Aug 20, 2024
726fbd5
RxD bath application, to be tested
Hjorthmedh Aug 21, 2024
4889328
indentation fix
wthun Aug 21, 2024
0b24fce
Bath application of DA, test
Hjorthmedh Aug 21, 2024
36bf912
Update units for NEURON
Hjorthmedh Aug 21, 2024
2346bc8
Fixed bath
Hjorthmedh Aug 21, 2024
95a6391
Notebooks
Hjorthmedh Aug 21, 2024
bf3f4a2
Updated example, bath on off for neuromodulation
Hjorthmedh Aug 23, 2024
3deee42
Adding json for neuromod bath example
Hjorthmedh Aug 28, 2024
0756ba8
Axon stump length, nseg_frequency
Hjorthmedh Sep 2, 2024
43e2565
Cleanup comment
Hjorthmedh Sep 2, 2024
e4a49b8
Cleanup comment
Hjorthmedh Sep 2, 2024
2fa8dcd
Fixed unit test
Hjorthmedh Sep 2, 2024
c6b922a
Merge pull request #427 from Hjorthmedh/neuromod_redux2
Hjorthmedh Sep 2, 2024
408d9cc
Adding DA bath dardel simulation
Hjorthmedh Sep 4, 2024
f93f941
Updated
Hjorthmedh Sep 4, 2024
5e8b532
Updated bath application
Hjorthmedh Sep 4, 2024
6fcd59b
Updated notebook
Hjorthmedh Sep 4, 2024
a9a6144
Notebook
Hjorthmedh Sep 4, 2024
df10165
Updated D1 reaction json for bath
Hjorthmedh Sep 5, 2024
d1030ea
Fixed range
Hjorthmedh Sep 5, 2024
f3cb61d
Updated tests
Hjorthmedh Sep 5, 2024
f3abf06
Merge pull request #428 from Hjorthmedh/neuromod_redux2
Hjorthmedh Sep 10, 2024
5af6a2d
Updated version
Hjorthmedh Sep 10, 2024
7927f29
Config fil
Hjorthmedh Sep 10, 2024
47615aa
Updated simulate
Hjorthmedh Sep 10, 2024
c466598
Merge branch 'neuromod_redux2' of github.com:Hjorthmedh/Snudda into n…
Hjorthmedh Sep 10, 2024
fd87864
Updated
Hjorthmedh Sep 10, 2024
c48bb1f
Merge branch 'neuromod_redux2' of github.com:Hjorthmedh/Snudda into n…
Hjorthmedh Sep 10, 2024
9772dae
csv files from digitization
wthun Sep 17, 2024
7d6fa66
Added Planert 2013 figure 4, png
Hjorthmedh Sep 17, 2024
d9f37e4
extraction
wthun Sep 17, 2024
46c588c
extraction simplified
wthun Sep 17, 2024
b1527c9
plot all extracted sets
wthun Sep 17, 2024
28ebc71
redid digitization
wthun Sep 18, 2024
345ebdf
d2-80 renamed
wthun Sep 18, 2024
f048a98
digitization verification
wthun Sep 18, 2024
8d3250f
Interpolate
Hjorthmedh Sep 18, 2024
6ec352d
Updated
Hjorthmedh Sep 18, 2024
99c41c1
Work in progress
Hjorthmedh Sep 19, 2024
d48da96
Unit nightmare fixed
Hjorthmedh Sep 20, 2024
f3e426a
Fixed unit test
Hjorthmedh Sep 20, 2024
d248744
Added fallback filename if unable to write simulation
Hjorthmedh Sep 23, 2024
64a41ea
File bug fixes, and worker fix
Hjorthmedh Sep 23, 2024
3188a19
Updated
Hjorthmedh Sep 23, 2024
079d193
Missing parent dir is created, dont check if missing here
Hjorthmedh Sep 23, 2024
0c615a3
Working on reactions
Hjorthmedh Sep 26, 2024
fe56fcf
Added error message if unknown dist_type
Hjorthmedh Sep 27, 2024
f49590d
Added minimal current injection example
Hjorthmedh Sep 30, 2024
3b1c2ba
Merge pull request #429 from Hjorthmedh/neuromod_redux2
Hjorthmedh Sep 30, 2024
bdb3f33
Updated code for init_tiny to allow user to specify parameter_key and…
Hjorthmedh Sep 30, 2024
252e983
Merge pull request #431 from Hjorthmedh/neuromod_redux2
Hjorthmedh Sep 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixing type
  • Loading branch information
Hjorthmedh committed Jun 12, 2024
commit b67fbbf94cb4f5b7303866aa49a951d226cf7e1a
13 changes: 13 additions & 0 deletions snudda/place/bend_morphologies.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,19 @@ def write_swc(self, morphology: MorphologyData, output_file, comment=None):
swc_data[:, 6] = morphology.section_data[:, 3] + 1 # parent compartment
swc_data[0, 6] = -1

# There is a special case, when the first point after the soma is a branch point
# which could lead to a 1 point section, to handle those Snudda set section_type to 0 for that point
# https://github.com/neuronsimulator/nrn/blob/5038de0b79ddf7da9b536639989da4c10dbae7f7/share/lib/hoc/import3d/read_swc.hoc#L304
# We need to find those points and set the section_type to that of the child

bad_idx_list = np.where(morphology.section_data[:, 2] == 0)[0]
for bad_idx in bad_idx_list:
child_idx = np.where(morphology.section_data[:, 3] == bad_idx)[0]
s_type = morphology.section_data[child_idx, 2]
assert (s_type == s_type[0]).all(), f"Children of different type in {morphology.swc_file} {s_type}"
swc_data[bad_idx, 1] = s_type[0]
print(f"Setting {output_file} row {bad_idx} type to {s_type[0]}.")

with open(output_file, "wt") as f:
if comment:
f.write(f"#{comment}\n")
Expand Down