-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adams model on ketamine #358
Open
anandpathak31
wants to merge
22
commits into
master
Choose a base branch
from
Adam_ketamine
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0339718
Adams model on ketamine
anandpathak31 26df492
adding connection types between neuron and receptor
anandpathak31 19dc4c6
composite neuron
anandpathak31 fb6e0c7
comments
anandpathak31 ace5277
add `Abstract` prefix to abstract types
harisorgn 8660a31
add `namespaced_nameof` function and rename previous one to `inner_` …
harisorgn 6cb96fd
update the new composite neuron structs (mutable + parts)
harisorgn 8263767
glutamate source connection
anandpathak31 9f0faa5
add cb connections
anandpathak31 90b5977
Full model implementation
anandpathak31 721cd16
add packages in example env
anandpathak31 975746d
full working example
anandpathak31 70df53e
edit example
anandpathak31 7025ee4
change parameter in wta
anandpathak31 ba1a047
example
anandpathak31 55e98ea
Merge remote-tracking branch 'origin/master' into Adam_ketamine
anandpathak31 ee3a3ee
merge master
anandpathak31 486e120
rename abstract composite blox
anandpathak31 6962a9f
rename abstract composite blox in CMC
anandpathak31 cdfc0b9
rename composite blox
anandpathak31 93f18fc
rename composite blox
anandpathak31 62fc902
rename composite blox
anandpathak31 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Neuroblox | ||
using DifferentialEquations | ||
using Graphs | ||
using MetaGraphs | ||
using Plots | ||
|
||
@named n1=HHNeuronExci_pyr_Adam_Blox(σ=3;N_nmda=1,namespace=:g) | ||
@named n2=HHNeuronExci_pyr_Adam_Blox(σ=3;N_nmda=1,namespace=:g) | ||
|
||
assembly = [n1,n2] | ||
g = MetaDiGraph() | ||
add_blox!.(Ref(g), assembly) | ||
add_edge!(g,1,2,Dict(:weight=>0,:nmda=>true,:nmda_weight=>1)) | ||
|
||
@named neuron_net = system_from_graph(g) | ||
sys = structural_simplify(neuron_net) | ||
prob = SDEProblem(sys, [], (0.0, 2000), []) | ||
sol = solve(prob, ImplicitEM(),saveat = 0.01) | ||
ss=convert(Array,sol) | ||
st=unknowns(sys) | ||
vlist=Int64[] | ||
for ii = 1:length(st) | ||
if contains(string(st[ii]), "V(t)") | ||
push!(vlist,ii) | ||
end | ||
end | ||
V = ss[vlist,:] | ||
|
||
VV=zeros(length(vlist),length(sol.t)) | ||
for ii = 1:length(vlist) | ||
VV[ii,:] .= V[ii,:] .+ 200*(ii-1) | ||
|
||
end | ||
plot(sol.t,VV[:,:]',color= "blue",label=false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pluto and Plots shouldn't be in the Neuroblox project.
The way I'd recommend doing this would be to add a
Project.toml
in theexamples
folder that has things like Plots and Pluto in it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MasonProtter thanks for checking out. Once the code is straightened, I always remove those packages before merging. Its not an oversight I assure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but I think it'd actually be helpful to have those tools in a separate project so that users can use them in the examples.
The way this would be done is you'd do something like
and then from within julia you'd do
and then whenever you work on code that goes in the examples, you just need to activate the
Neuroblox/examples
folder instead of theNeuroblox
folder itself.