v1.0.0
Breaking Changes
weight_gradienttakes a fifth positional argument, the current trial's group label:weight_gradient(lr, sol, w, feedback, group). There is no fallback method, so a custom learning rule that defines only the 4-argument method now raises aMethodErroron the first trial. A rule that does not participate in gating can ignore the new argument; one that does should open withtrial_gate_active(lr.group, group) || return zero(w)and definerule_group.HebbianPlasticity,HebbianPresynapticPlasticityandHebbianModulationPlasticityeach gained a trailinggroupfield (6 → 7, 3 → 4 and 10 → 11 fields respectively). The keyword constructors are unchanged, but code calling the positional constructor, or reflecting overfieldnames/propertynames, must account for the extra field.Rewriting the shipped composites on top of the new
@compositemacro normalised their fields. Keyword-argument names and default values are unchanged for every composite, so constructor calls behave exactly as before — but field order is now alwaysname, namespace, graph, metadata, tags, <nodes...>, <extra fields...>, and a few incidental fields are gone:- Use
get_components(blox)instead ofblox.parts(CanonicalMicroCircuit,Striatum_MSN_Adam,Striatum_FSI_Adam,GPe_Adam,STN_Adam). - The
kwargsfield is no longer stored onLIFExciCircuit,LIFInhiCircuit,PINGNetwork,LateralAmygdalaCluster,LateralAmygdalaorCentralAmygdala. - The
connection_matrix/connection_matricesfield is no longer stored on the four*_Adamcomposites or onLateralAmygdalaCluster. The keyword arguments of those names are unchanged — only the stored field is dropped. - Sub-blox fields generated from a
@nodesblock are no longer declared with concrete types (e.g.WinnerTakeAll'sinhi,Striatum'smatrisome,Thalamus'sexcis, all seven ofBLA's populations). The values they hold are unchanged, but code readingfieldtypeor relying on type-stable property access should use an@extra_fieldsblock, which does keep annotations. Converselynameandnamespaceare now always declared::Symboland::Union{Symbol, Nothing}.
Positional
new-style construction andgetfieldby index are not part of the public API; access sub-blox by name (str.matrisome).- Use
(NeurobloxPharmaPrivate)
CeLis now the PKCδ+/PKCδ- split composite. The flat single-poolCeL(fieldinhibs::Vector{HHInhiNeuron}) is gone;CeLnow holdsdelta_plusanddelta_minuspopulations with reciprocalHypergeometricRuleGABA-A inhibition between them, plus the new keyword argumentsfrac_delta_plus,I_bg_delta_plus,I_bg_delta_minus,density_dp_dm,density_dm_dp,weight_dp_dm,weight_dm_dpandrng. Code readingcel.inhibsmust useget_inhi_neurons(cel)(orcel.delta_plus/cel.delta_minus) instead.(NeurobloxPharmaPrivate) A
learning_ruleon aCortical => BLA,Cortical/LateralAmygdalaCluster => LateralAmygdalaCluster, orCortical => LateralAmygdalaconnection now potentiates only the cortico-principal-cell synapses. Those wiring rules apply one connection to two destination populations, so previously the rule also reached the destination's feedforward-inhibitory neurons (vip/aacforBLA, the cluster'sneuron_ff_inhifor aLateralAmygdalaCluster) — which potentiates feedforward inhibition alongside the excitatory drive, pushing the circuit the opposite way from the conditioning being modelled.CorticalAmygdalaRuledelegates for every sub-rule, so this applies with aWeightMatrixRule,HypergeometricRuleorDensityRulesub-rule alike. Connections without a learning rule are wired exactly as before, byte for byte.A weight update that would drive a connection weight negative now raises an error naming the source and destination blox, instead of silently applying it. This affects any
run_experiment!/run_trial!whose learning rule produces-Δw > w.(NeurobloxPharmaPrivate)
CA1Cluster'spv_cellsfield is nowVector{<:AbstractNeuron}rather thanVector{HHFSINeuron}, since the PV slot is selected byfsi_neuron_type. Code annotating that field asVector{HHFSINeuron}must be widened.(GraphDynamics)
PartitionedGraphSystemhas been removed; aGraphSystemnow holds ag.flat_graphfield with aPartitioningGraphSystemobject which actively flattens and partitions the graph during solving.(GraphDynamics)
apply_discrete_event!andapply_continuous_event!now take a single combined subsystem view per affected subsystem (sys_view, covering both its states and its parameters, written through field-wise assys_view.x[] = ...) instead of separate state and parameter view arguments. Connection events correspondingly take onesys_view_srcand onesys_view_dst.
New Features
Added
ConditioningEnvironment, an environment for conditioning protocols where the circuit makes no classification and is never scored (unlikeClassificationEnvironment, it stores nocategory— thoughImageStimulusstill requires acategorycolumn in the input data). Itstrial_groupsfield labels each trial with the conditioning pathway it belongs to, and it throws anArgumentErrorif that label count does not matchN_trials. The type hierarchy is nowConditioningEnvironment <: AbstractImageEnvironment <: AbstractEnvironment, withClassificationEnvironmentalso re-parented ontoAbstractImageEnvironment, which carries their sharedImageStimulus-backed stimulus presentation.run_experiment!andrun_warmupare no longer typed toClassificationEnvironment: they accept anyAbstractEnvironmentthat suppliesN_trials,t_trial, a mutablecurrent_trial, and a method ofNeurobloxPharma.update_trial_stimulus!(which is provided forAbstractImageEnvironment).HebbianPlasticity,HebbianPresynapticPlasticityandHebbianModulationPlasticityall gained agroupkeyword argument, restricting the weight update to the trials the environment labelsgroupand leaving the weight unchanged on every other trial — the rule returns a zero gradient before it touches the solution, so a gated-off trial costs no interpolation. This lets onerun_experiment!call drive a multi-stage conditioning protocol, pairing each trial's stimulus with its own designated plastic pathway: agroup=:fearrule on one route and agroup=:rewardrule on another condition each on its own trials, at its own rate.Added the trial-gating extension points
trial_group_labels(env),current_trial_group(env),possible_trial_groups(env),rule_group(lr),trial_gate_active(group, current_group)andvalidate_rule_groups(learning_rules, env). An environment declares its groups by overridingtrial_group_labelsalone — one label per trial, in trial order — and bothcurrent_trial_group(which the gate reads) andpossible_trial_groups(which validation reads) derive from it, so the two cannot fall out of step. A rule gated to a group its environment can never produce is now a hard error atrun_trial!, and at the top ofrun_experiment!before any warmup solve, rather than a rule that silently never fires.Agentgained anaction_selectionkeyword argument. It defaults to inferring the policy from the graph (warning when there is none); passnothingto declare that the agent deliberately makes no scored choice, as in a conditioning protocol, which suppresses that warning. Such an agent reportsfeedback = 1andaction = 0on every trial, so therun_experiment!trace comes back withcorrectalltrueandactionall0; nothing is scored, but the trace'strial/timecolumns and anymonitoroutput are still meaningful.Agentalso gained atspankeyword argument (default(0.0, 1.0)) setting the timespan of a single trial.run_experiment!overrides it with the environment's trial length, so it only matters when driving trials directly withrun_trial!.Added
drop_learning_rule(conn), which returnsconnwith itslearning_rulekeyword replaced byNoLearningRule(), and returnsconnitself unchanged when it carries none. Composite wiring rules that apply one connection to two destination populations use it to keep plasticity on the population it was meant for. Stateful fields such as aHypergeometricRule'srngare shared by reference, so the sequence of random draws is unchanged. It requires the rule type to supportAccessors.@seton itskwargs, whichDefaultRuledoes not.Added
@composite, a macro for defining composite blox that combines@blox's constructor-signature header with@graph's@nodes/@connectionsbody. Every top-level assignment in@nodesbecomes a field of the struct, the five mandatory fields (name,namespace,graph,metadata,tags) and themetadata/tagskeyword arguments are emitted for you, nodes inherit the composite's namespace automatically, and an optional@extra_fieldsblock adds further fields initialised after the graph is built. The supertype defaults toAbstractCompositeand may be overridden withStructName(; ...) <: SuperType. Every composite shipped with Neuroblox is now defined this way; hand-written composite structs continue to work unchanged.Added the convenience macros
@nodes name expr/@connections name expr, which build a new graph namednamewhose body is an implicit@nodes/@connectionsblock, and their mutating counterparts@nodes! g expr/@connections! g expr, which add to an existing graphg.Composite blox are now generic over the neuron types filling their functional slots. Every composite that builds neurons takes
*_neuron_typekeyword arguments —exci_neuron_type,inhi_neuron_type,fsi_neuron_type,msn_neuron_type,da_neuron_type— each paired with a*_neuron_kwargsNamedTuple forwarded to that neuron's constructor. Slots are keyed by role, so e.g.BLA'scck/aac/sst/vippopulations all followinhi_neuron_type. Defaults for these slots are unchanged, so existing code that does not pass them builds the same neurons as before:using NeurobloxPharma, NeurobloxPharmaPrivate # the *Mod neuron types are private Cortical(; name=:ctx, density=0.1, exci_neuron_type = HHExciNeuronMod, inhi_neuron_type = HHInhiNeuronMod, inhi_neuron_kwargs = (; G_GIRK = 0.1))(NeurobloxPharmaPrivate) Added a generalized neuromodulator receptor system, in which receptors drive the postsynaptic neuron's
d*accumulator inputs to modulate ion channels, rather than modulating synaptic gain. It comprises theChannelModNeuron/FullChannelModNeuronneuron unions and receptor/rule families for dopamine (D1Receptor,D2Receptor,D4Receptor;D1Rule,D2Rule,D4Rule), acetylcholine (ACh_Neurotransmitter,M1Receptor,M2Receptor,M4Receptor;M1Rule,M2Rule,M4Rule), noradrenaline (NE_Neurotransmitter,Beta1Receptor,Beta2Receptor,Alpha1Receptor,Alpha2Receptor;Beta1Rule,Alpha1Rule,Alpha2Rule), serotonin (HT_Neurotransmitter,HT1AReceptor,HT2AReceptor,HT2CReceptor,HT4Receptor;HT1ARule,HT2ARule,HT2CRule,HT4Rule), opioids (MOR_Neurotransmitter,MuORReceptor,MuORRule) and endocannabinoids (eCB_Neurotransmitter,CB1Receptor), plusGABABReceptor.(NeurobloxPharmaPrivate) Added six generalized-channel neuron types —
HHExciNeuronMod,HHInhiNeuronMod,HHMSNeuronMod,HHFSINeuronMod,HHExciCaNeuronModandHHVTADANeuronMod— which extend their base neurons with KIR, GIRK, Cav1.3, SK, Kv7/M, NaP and HCN/Ih conductances (all zero-conductance by default) and expose thed*accumulator inputs the neuromodulator rules write into.(NeurobloxPharmaPrivate) Added the ascending-arousal source nuclei
LCMod,DRNMod,PAGMod,PPTMod,BFModandVLPAGMod— hybridNGNMM_thetaneural-mass plus single-HH-neuron composites whose output neuron is reached with the newget_output_neuron, and which project onto other composites through the neuromodulator rules.The neuromodulator rules that drive ion-channel modulation (
D1Rule,D2Rule,D4Rule,M1Rule,M2Rule,M4Rule,Beta1Rule,Alpha1Rule,Alpha2Rule,HT1ARule,HT2ARule,HT2CRule,HT4Rule,MuORRule) raise an informative error when wired onto a neuron that has nod*accumulator inputs, naming the neuron and pointing at the relevant*_neuron_typeargument, rather than building a graph that only fails atsolvetime.(NeurobloxPharmaPrivate) The
VTA/VTAAssemblydopaminergic projections now select their modulation pathway from the postsynaptic neuron type, via the newda_d1_rule/da_d2_rule: neurons exposing the generalized channel-modulation inputs take theD1Receptor/D2Receptorion-channel pathway, MSNs takeMsnD1Receptor/MsnD2Receptor, and other neurons takePyrD1Receptor/PyrD2Receptor. Defaults are unchanged for composites built from the default neuron types.(NeurobloxPharmaPrivate) Added
default_vta_G_h(da_neuron_type), giving the default Ih conductance for aVTAAssembly's DA neurons (and, scaled, forVTA'sG_h_a1).HHVTADANeuronMod's Ih activation is ~3-4x stronger near rest thanHHVTADANeuron's, so it defaults to a proportionally smaller conductance.(NeurobloxPharmaPrivate)
VTAAssemblyis now exported.(NeurobloxPharmaPrivate) Added
CeLDeltaPlusandCeLDeltaMinus, the standalone-graph-node split ofCeL's PKCδ+ / PKCδ- subpopulations, so a GUI rendering one block per graph node can read out each independently. LikeCeLthey are generic over the neuron type viainhi_neuron_type/inhi_neuron_kwargs. Two differences fromCeLto be aware of: the δ+/δ- mutual inhibition must be wired explicitly at circuit level (twoHypergeometricRules), and the split blocks carry no astrocyte and expose noastrocyte_*keyword — see the docstrings for both, and for the pooled-astrocyte migration path. Every genericCeLwiring dispatch has a mirrored method for the split blocks, plus a new block-to-block dispatch for the δ+/δ- inhibition; the threeCeL-composite-only helper rules below are deliberately not defined for them, since a plain rule wired onto the block itself replaces each. Parity withCeLis locked in byNeurobloxPharmaPrivate/test/cel_split_parity.jl.(NeurobloxPharmaPrivate) Added the
CeL-composite wiring rulesCeLSplitRule(wires a source ontodelta_plus/delta_minuswith independent densities and weights),CeLDeltaPlusRule(CeL => CeMrestricted to the PKCδ+ arm) andVLPAGDeltaPlusRule(PAG dopamine onto PKCδ+ only).(NeurobloxPharmaPrivate)
CeLnow contains one pooledFastGABAGlycineAstrocytespanning both subpopulations, withastrocyte_params,astrocyte_input_weight=1.0andastrocyte_output_weight=0.0keyword arguments. It is present by default but inert at the default output weight; inspect it through theastrocytesfield.(NeurobloxPharmaPrivate)
CoreleaseConnection,DARule,MsnGluRule,AstRuleand the astrocyte output connections accept the new*NeuronModneuron types as endpoints, and aFastGABAGlycineAstrocyte => AbstractHHInhiNeuronBasicConnectionwas added.Every blox and composite now carries a
tags::Set{Symbol}field, set with atagskeyword argument (aSymbolor any collection ofSymbols; default empty) and read withget_tags. Tags mark a subset of blox of one type — e.g. γ1-subunit-containing GABA-A synapses — without defining a new type. Connection rules forwardtagsto the synapse, receptor and transmitter blox they create, e.g.src => dst, HypergeometricRule(; density=0.06, tags=:gamma1); a tagged connection blox gets a tag-suffixed name (gaba_a_gamma1), so it is never shared with the same neuron's untagged synapses. A composite's tags are stored on the composite only and are not copied onto its components. Also added the helpersto_tags,tagged_nameandbuild_tagged.@experimentlines accept awhereclause restricting the selected blox by tag:(GABA_A_Synapse where :gamma1 ∈ tags), τ₂ -> τ₂ * dose. The predicate is anyBoolexpression oftags(so||,&&and∉work, as do variables from the caller's scope), and it composes with the composite and typed-connection selectors, e.g.((GABA_A_Synapse ∈ (itc => cel)) where :gamma1 ∈ tags). Awhereline that matches no blox is an error, so a misspelled tag cannot silently turn a drug intervention into a no-op.Added
HebbianPresynapticPlasticity, a learning rule whose weight update depends on presynaptic activity alone (w += feedback * K * x_pre), with no postsynaptic term and noW_limbound. By defaultstate_preis the presynapticSpikeMonitor'sspikes_cumulative, bound automatically per connection while wiring, andt_pre = nothingevaluates it at the end of the trial.synapse_wiring_rule!for conductance synapses has been consolidated into a single method on(::AbstractNeuron, ::AbstractReceptor, ::AbstractNeuron). The two wiring topologies are now selected by the traitneeds_postsynaptic_voltage(::AbstractReceptor):false(the default) wires only the presynaptic drive into the synapse, whiletruealso feeds in the postsynaptic neuron, for receptors that compute their voltage-dependent current internally. A new receptor that fits either topology now only needs the trait, not a bespokesynapse_wiring_rule!method; hand-written methods are more specific and continue to take precedence.ImageStimuluscan now accept any Tables.jl data-input source (or a CSV filepath), rather than just aDataFrameor a filepath.(GraphDynamics) A
PolyesterScheduler()scheduling object has been added which allows for parallelizing solves using Polyester.jl. This option helps performance during ODE solves where GC time dominates if multithreaded.(GraphDynamics) If any subsystem in a problem has a parameter named
dtmax, then the smallestdtmaxparameter in the system is forwarded as a keyword argument toODEProblemandSDEProblems to limit the maximum stepsizes allowed by the solver.(GraphDynamics) If a connection type overrides
GraphDynamics.connection_needs_ctxto give true, then connections of that type will be given a fourthctxargument which gives it access to the full list ofstates_partitioned,params_partitioned, andconnection_matriceswhen accumulating inputs.(GraphDynamics) GraphDynamics integrates with Latexify.jl to latexify the equations of a
GraphSystem.
Bug Fixes
- Structural
==/isequal/hashnow coverAbstractObserver(e.g.SpikeMonitor) as well asAbstractBlox. Without this,get_spike_monitor!'s memoization missed on a plainGraphSystem, so calling it twice for the same neuron — or mixing an explicitget_spike_monitor!loop with a learning rule that creates its own — threw a duplicate-node error. - Learning rules now bind their
SpikeMonitorendpoints on any neuron type, not onlyAbstractHHExciNeuron. A rule attached to a composite wiring rule that also creates edges onto feedforward inhibitory neurons previously leftstate_pre/state_postasnothingand failed at the end of the first trial withArgumentError: Incorrect specification of idxs. - The default
HHInhiNeuron => WinnerTakeAllwiring rule now dispatches onAbstractHHInhiNeuron, so aWinnerTakeAllbuilt with a different HH inhibitory neuron in itsinhi_neuron_typeslot still wires.HHFSINeuronandHHVTADANeuronare deliberately still excluded. - (NeurobloxPharmaPrivate) Fixed the
Cortical=>ITCdm,CeLandCeMwiring rules, and theITCdm/ITCvm=>Corticalwiring rules, which called the undefinedget_inh_neuronsand so threw anUndefVarError.
v0.9.0
API Changes
- Added a graph finalization step that runs after flattening, before problem construction. The finalization pass walks the nodes of the composite and flattened graphs and calls the (no-op-by-default) hook
GraphDynamics.finalize!(g, node, lookup); define methods on your node types to post-process structure that depends on the whole flattened graph (e.g. neuromodulatory wiring onto every synapse targeting a neuron).lookupis a(; incoming, outgoing)pair of identity-keyed maps from each node to the connections into and out of it. - Breaking: all blox subtypes of
AbstractStimulushave been renamed to follow a consistentXStimulusconvention:ConstantInput→ConstantStimulus,PoissonSpikeTrain→PoissonSpikeTrainStimulus,PulsesInput→PulsesStimulus,VoltageClampSource→VoltageClampStimulus,DBS→DBSStimulus,ProtocolDBS→ProtocolDBSStimulus - Blox are now classified as
AbstractSimpleandAbstractComposite(the definition of composites is unchanged; simples are blox that carry dynamics, and currently include everything that is not a composite). - Breaking: the connection system has been overhauled. Both
add_connection!andsystem_wiring_rule!now dispatch on a connection struct. Connections are now classified asDynamicalConnectionbetweenAbstractSimple, orWiringRule. The former have equations and exist at the flattened graph level, while the latter are used to determine the topology of the graph. Users should now create their own structs to define new kinds of wiring rules. - Added
extract_vars(prob, syms)which builds a nestedComponentVectorcarrying the current values of the requested parameters from anODEProblem. The nesting mirrors the₊-separated namespace hierarchy of Neuroblox blox names, enabling direct property access (e.g.v.blox1.ω) and use as a flat vector. - Added
apply_vars(prob, v)which takes a (possibly mutated)ComponentVectorproduced byextract_varsand returns a newODEProblemwith those parameter values applied. Inverse ofextract_vars. - Breaking: the
ProtocolDBSStimulusandBurstStimulusconstructors no longer accept astart_time; the start time is computed from the other parameters. HHFSINeuronconductance states (G,Gₛ) and their driving parameters (τ,τₛ,a,b) have been moved out of the neuron into a new companion receptor bloxGABA_A_FSI_Synapse. This matches the architecture ofHHExciNeuron/HHInhiNeuron. Breaking: any code that accessedfsi.Gorfsi.Gₛdirectly must be updated to use the synapse blox instead.NeurobloxOptimization.jlhas been added as a utility package for certain optimization tasks involving Neuroblox.jl. See the documentation for more details on using this.- Breaking: numerous neuron types were renamed for naming consistency (
Inhib/Inh→Inhi, and moving qualifiers ahead ofNeuron):HHNeuronExci→HHExciNeuron,HHNeuronInhib→HHInhiNeuron,HHNeuronFSI→HHFSINeuron,PINGNeuronExci→PINGExciNeuron,PINGNeuronInhib→PINGInhiNeuron,LIFInhNeuron→LIFInhiNeuron,LIFExciInhNeuron→LIFExciInhiNeuron,LIFInhCircuit→LIFInhiCircuit. - Blox generated by
@bloxnow carry ametadata::Dict{Symbol, Any}field, populated via ametadatakeyword argument, and atags::Set{Symbol}field (see New Features).GreedyPolicy,ImageStimulus, and the@nodes/@connectionsgraph DSL likewise acceptmetadata, andGraphSystems support graph-level metadata via a@graph_metadatablock. - Added a per-parameter metadata system: parameters declared in
@bloxcan carry metadata, queryable withparam_metadata, along with new symbol-introspection helpersparam_symbols,state_symbols,input_symbols, andoutput_symbols. - The
@experimentmacro now handles module-qualified blox names and composite blox with composite components, and can remap connection weights and parameters of intermediate blox. - Added an explicit transmitter/receptor synapse model, including the abstract type
AbstractNeurotransmitter, transmitter blox (Glu_Neurotransmitter,GABA_Neurotransmitter,DA_Neurotransmitter), two-state receptor blox (Glu_AMPA_Receptor_2state,GABA_A_Receptor_2state, subtypingAbstractGABA_A_Receptor_2state; receptor subunit variants are expressed withtags), and aKinetic2StateRuleconnection type. The conductance-based wiring rule is now namedConductanceRule. - Breaking: synapse/receptor parameters were migrated out of neuron blox onto dedicated synapse/receptor blox (accessed via the exported
get_synapse,get_transmitter, andget_receptor), and thegsynaptic-gain parameter was removed.==,isequal, andhashare now defined field-wise for allAbstractBlox. - Added VTA and nucleus accumbens blox to NeurobloxPharma —
NacShell,HHMSNeuron, and the receptorsPyrNMDAR,PyrAMPAR,PyrD1Receptor,PyrD2Receptor— along with theMsnGluRuleandPyrGluRuleconnection rules, andDARulein NeurobloxPharmaPrivate. - Added a
SpikeMonitorobserver (<: AbstractObserver) which factors spike-counting states out of neurons into a separate node. - Added a
PINGNetworkcomposite blox implementing a pyramidal-interneuron gamma network. - Added an abstract type
AbstractHHExciNeuron <: AbstractExciNeuronshared by the Hodgkin-Huxley excitatory neuron types. - Breaking:
params_with_substringsandstates_with_substringswere collapsed into a singlesyms_with_substringsfunction (with anexcluded_substrskeyword argument). - Breaking: the
get_connection_matrixfunction has been removed. - Breaking: the
I_bg_arbackground-current keyword argument ofCorticalwas renamed toI_bg. - STA synapses are now shared per destination neuron by default; pass
fully_unique_sta = trueto get a distinctGlu_AMPA_STA_Synapseper source-destination pair. - Composite wiring rules now raise an informative error when passed a pre-existing
synapse/transmitter/receptorblox, or when no connection rule applies to a pair of blox. - Fixed
WeightMatrixRuleconnecting the source and destination neurons in the wrong order. - Breaking:
subcortical_connection_matrixnow produces acyclic (DAG) connectivity, changing the default wiring of subcortical structures such asThalamus. Simulations of those structures will give different numerical results than under v0.8.
v0.8.0
API Changes
- ModelingToolkit is no longer used by Neuroblox. All interfaces have moved over to GraphDynamics.jl as the backend.
- A
@bloxmacro has been added for defining blox types compatible with GraphDynamics - A
@wiring_rulemacro has been added for defining what should happen when two blox are connected - A
@connectionmacro has been added for defining the action of connection types on subsystems, along with event connections - Instead of storing a system and connector object, composite blox (i.e.
<:AbstractComposite) now store agraphfield which holds aGraphSystemof the internal connections. - A
@graph!macro has been added for modifying already existingGraphSystems. AgentandClassificationEnvironmentno longer takenameandnamespacekeyword arguments.- An
@experimentmacro has been added to easily modify many parameters of anODEProblem - Blox now support continuous events
- Blox which used discrete events for spike detection, now set
dtmaxparameters which limit the maximum timestep a solver is allowed to take. GraphSystems andODEProblems can now be saved and loaded usingsave_graph,load_graph,save_problem, andload_problem- A
MultipointConnectiontype has been added which allows one to write connection rules between two blox that reference other extra blox. - A large library of receptor types has been added to NeurobloxPharma including
GABA_B_SynapseNMDA_SynapseMorandiFullNMDARMorandiNMDARMsnNMDARMsnAMPARMsnD1ReceptorMsnD2ReceptorHTR5CaTRPM4RAlpha7ERnAChRMuscarinicRBeta2nAChR
- Several new neuron types have been added for interacting with the receptor library
BaxterSensoryNeuronTRNNeuronMuscarinicNeuronVTADANeuronVTAGABANeuron
- The API pages in our documentation have been restructured and extended with a lot more docstrings. There are now new pages under API for :
- Neuron, Neural mass and Composite blox definitions
- Constructing, saving and loading graphs
- Receptor definitions
- Reinforcement learning
- Plotting recipes
- Utility functions
- Adding user-defined blox
- Adding user-defined connections
- Defining experiments by changing model parameters and initial conditions
- A tutorial on choosing receptors between neuronal connections was added in the documentation.
v0.7.0
API Changes
Neuroblox.jl has been re-organized into a collection of sub-packages which can be used individually. This shouldn't cause any changes for the end user if they simply do
using Neurobloxsince Neuroblox itself now just re-exports the sub-packages. Currently our public subpackages are:- NeurobloxBase.jl fundamental shared infrastructure for making Neuroblox work
- NeurobloxBasics.jl some common, generic neuroscience primitives
- NeurobloxDBS.jl infrastructure and models specific to our work on deep brain stimulation
- NeurobloxPharma.jl infrastructure and models specific to our pharmacological work and the corticostriatal circuit
The
run_experiment!function now no longer takes averbose::Boolkeyword argument, but instead can take amonitorkeyword argument, which is passed to theupdate_monitor!callback will be run after each experiment trial with information about that trial. We provideProgressMeterMonitoras a simple replacement for the functionality that the oldverbose=trueoption gave.The naming of many objects from Neuroblox.jl has been updated and made more consistent. Abstract types now all start with
Abstractin their type name, and we have removed the suffixBloxfrom the types that had them e.g.HHExciNeuronBloxwas renamed toHHExciNeuron, andNeuralMassBloxwas renamedAbstractNeuralMass.A
@graphmacro has been added to simplify the process of making Neuroblox.jl graphs to pass tosystem_from_graph.
v0.3
Initial Release!
GraphDynamics pre-1.0 history
GraphDynamics.jl used to be versioned and released separately from Neuroblox, with its own changelog. From v1.0 onwards it shares the version number and changelog of the rest of Neuroblox; its earlier release notes are preserved here.
GraphDynamics v0.7.0
Breaking changes
apply_discrete_event!,apply_continuous_event!, andForeachConnectedSubsystemhave had theirvstatesandvparamsarguments combined into asys_viewargument, which gives a view into the affected system for (and the connection form gets asys_view_srcandsys_view_dst). Thissys_viewcan have it's fields be updated in place like so:
function GraphDynamics.apply_discrete_event!(integrator, sys_view, sys::Subsystem{MyType}, _)
sys_view.x[] = sys.y
endThis will modify the x state or parameter of the system when the event triggers.
apply_subsystem_noise!'s first argument is now modified in the same way as the view arguments ofapply_discrete_event!. One would now write e.g.
function GraphDynamics.apply_subsystem_noise!(vstate, sys::Subsystem{BrownianParticle}, t)
# No noise in position, so we don't modify vstate[:x]
vstate.v[] = sys.σ # White noise in velocity with amplitude σ
endrather than vstate[:v] = sys.σ
GraphDynamics v0.6.0
Breaking changes
Switched computed_properties and computed_properties_with_inputs to take a type tag instead of subsystem argument. Now, instead of adding methods like
function GraphDynamics.computed_properties_with_inputs(::Subsystem{Particle})
a(sys, input) = input.F / sys.m
(; a)
endusers should do
function GraphDynamics.computed_properties_with_inputs(::Type{Particle})
a(sys, input) = input.F / sys.m
(; a)
endGraphDynamics v0.5.0
Breaking changes
- Removed the fallback
(cr::ConnectionRule)(src, dst, t) = cr(src, dst)which was added previously to avoid breakage when we made connection rules take a time argument in addition to thesrcanddstsubsystems. The presence of this method was a bit of a annoying crutch - Changed the arguments of
discrete_event_conditionfrom just(conn, t)to(conn, t, sys_src, sys_dst)so that events can trigger based off information in the source or destination subsystems as well - Changed the arguments of
has_discrete_eventsfrom just(typeof(conn),)for connection events to(typeof(conn), get_tag(src), get_tag(dst)), i.e. it now also can depend on the types of the source and dest subsystems - Changed the arguments of
event_timesfrom just(conn,)to(conn, sys_src, sys_dst)for connection events.