├── .github ├── dependabot.yml └── workflows │ ├── continuous_benchmarking_master_branch.yml │ ├── continuous_benchmarking_pull_requests.yml │ ├── ebrains-push.yml │ └── nestml-build.yml ├── .gitignore ├── .readthedocs.yml ├── LICENSE ├── README.md ├── codemeta.json ├── doc ├── citing.rst ├── extending.rst ├── extending │ ├── Dimitri_Plotnikov_Doctoral_Thesis.pdf │ ├── Konstantin_Perun_Master_thesis.pdf │ └── Tammo_Ippen_Master_Thesis.pdf ├── fig │ ├── Asymmetric-STDP-learning-window-Spike-timing-window-of-STDP-for-the-induction-of.png │ ├── code_gen_opts.png │ ├── code_gen_opts.svg │ ├── fncom-04-00141-g003.jpg │ ├── integration_order.pdf │ ├── integration_order.png │ ├── integration_order_example.png │ ├── internal_workflow.png │ ├── internal_workflow.svg │ ├── nest-desktop.svg │ ├── nest-simulator-logo.png │ ├── nestml-multisynapse-example.png │ ├── nestml_code_render_merged.png │ ├── nestml_code_render_thumbnail.png │ ├── neuron_illustration.svg │ ├── neuron_synapse_co_generation.png │ ├── neuron_synapse_co_generation.svg │ ├── performance_ratio_nonVec_vs_vec_compartmental.png │ ├── python-logo.png │ ├── spinnaker_logo.svg │ ├── stdp-nearest-neighbour.png │ ├── stdp_synapse_test.png │ ├── stdp_test_window.png │ ├── stdp_triplet_synapse_test.png │ └── synapse_illustration.svg ├── getting_help.rst ├── installation.rst ├── license.rst ├── models_library │ ├── aeif_cond_alpha_neuron.rst │ ├── aeif_cond_exp_neuron.rst │ ├── aeif_cond_exp_neuron_characterisation.rst │ ├── hh_cond_exp_destexhe_neuron.rst │ ├── hh_cond_exp_traub_neuron.rst │ ├── hh_cond_exp_traub_neuron_characterisation.rst │ ├── hh_moto_5ht_neuron.rst │ ├── hh_psc_alpha_neuron.rst │ ├── hh_psc_alpha_neuron_characterisation.rst │ ├── hill_tononi_neuron.rst │ ├── iaf_chxk_2008_neuron.rst │ ├── iaf_chxk_2008_neuron_characterisation.rst │ ├── iaf_cond_alpha_neuron.rst │ ├── iaf_cond_alpha_neuron_characterisation.rst │ ├── iaf_cond_beta_neuron.rst │ ├── iaf_cond_beta_neuron_characterisation.rst │ ├── iaf_cond_exp_neuron.rst │ ├── iaf_cond_exp_neuron_characterisation.rst │ ├── iaf_cond_exp_sfa_rr_neuron.rst │ ├── iaf_cond_exp_sfa_rr_neuron_characterisation.rst │ ├── iaf_psc_alpha_neuron.rst │ ├── iaf_psc_alpha_neuron_characterisation.rst │ ├── iaf_psc_delta_neuron.rst │ ├── iaf_psc_delta_neuron_characterisation.rst │ ├── iaf_psc_exp_htum_neuron.rst │ ├── iaf_psc_exp_neuron.rst │ ├── iaf_psc_exp_neuron_characterisation.rst │ ├── ignore_and_fire_neuron.rst │ ├── index.rst │ ├── izhikevich_neuron.rst │ ├── izhikevich_neuron_characterisation.rst │ ├── izhikevich_psc_alpha_neuron.rst │ ├── mat2_psc_exp_neuron.rst │ ├── mat2_psc_exp_neuron_characterisation.rst │ ├── nestml_current_pulse_response_[aeif_cond_exp_neuron_nestml].png │ ├── nestml_current_pulse_response_[aeif_cond_exp_neuron_nestml]_small.png │ ├── nestml_current_pulse_response_[hh_cond_exp_traub_neuron_nestml].png │ ├── nestml_current_pulse_response_[hh_cond_exp_traub_neuron_nestml]_small.png │ ├── nestml_current_pulse_response_[hh_psc_alpha_neuron_nestml].png │ ├── nestml_current_pulse_response_[hh_psc_alpha_neuron_nestml]_small.png │ ├── nestml_current_pulse_response_[iaf_chxk_2008_neuron_nestml].png │ ├── nestml_current_pulse_response_[iaf_chxk_2008_neuron_nestml]_small.png │ ├── nestml_current_pulse_response_[iaf_cond_alpha_neuron_nestml].png │ ├── nestml_current_pulse_response_[iaf_cond_alpha_neuron_nestml]_small.png │ ├── nestml_current_pulse_response_[iaf_cond_beta_neuron_nestml].png │ ├── nestml_current_pulse_response_[iaf_cond_beta_neuron_nestml]_small.png │ ├── nestml_current_pulse_response_[iaf_cond_exp_neuron_nestml].png │ ├── nestml_current_pulse_response_[iaf_cond_exp_neuron_nestml]_small.png │ ├── nestml_current_pulse_response_[iaf_cond_exp_sfa_rr_neuron_nestml].png │ ├── nestml_current_pulse_response_[iaf_cond_exp_sfa_rr_neuron_nestml]_small.png │ ├── nestml_current_pulse_response_[iaf_psc_alpha_neuron_nestml].png │ ├── nestml_current_pulse_response_[iaf_psc_alpha_neuron_nestml]_small.png │ ├── nestml_current_pulse_response_[iaf_psc_delta_neuron_nestml].png │ ├── nestml_current_pulse_response_[iaf_psc_delta_neuron_nestml]_small.png │ ├── nestml_current_pulse_response_[iaf_psc_exp_neuron_nestml].png │ ├── nestml_current_pulse_response_[iaf_psc_exp_neuron_nestml]_small.png │ ├── nestml_current_pulse_response_[izhikevich_neuron_nestml].png │ ├── nestml_current_pulse_response_[izhikevich_neuron_nestml]_small.png │ ├── nestml_current_pulse_response_[mat2_psc_exp_neuron_nestml].png │ ├── nestml_current_pulse_response_[mat2_psc_exp_neuron_nestml]_small.png │ ├── nestml_fI_curve_[aeif_cond_exp_neuron_nestml].png │ ├── nestml_fI_curve_[aeif_cond_exp_neuron_nestml]_small.png │ ├── nestml_fI_curve_[hh_cond_exp_traub_neuron_nestml].png │ ├── nestml_fI_curve_[hh_cond_exp_traub_neuron_nestml]_small.png │ ├── nestml_fI_curve_[hh_psc_alpha_neuron_nestml].png │ ├── nestml_fI_curve_[hh_psc_alpha_neuron_nestml]_small.png │ ├── nestml_fI_curve_[iaf_chxk_2008_neuron_nestml].png │ ├── nestml_fI_curve_[iaf_chxk_2008_neuron_nestml]_small.png │ ├── nestml_fI_curve_[iaf_cond_alpha_neuron_nestml].png │ ├── nestml_fI_curve_[iaf_cond_alpha_neuron_nestml]_small.png │ ├── nestml_fI_curve_[iaf_cond_beta_neuron_nestml].png │ ├── nestml_fI_curve_[iaf_cond_beta_neuron_nestml]_small.png │ ├── nestml_fI_curve_[iaf_cond_exp_neuron_nestml].png │ ├── nestml_fI_curve_[iaf_cond_exp_neuron_nestml]_small.png │ ├── nestml_fI_curve_[iaf_cond_exp_sfa_rr_neuron_nestml].png │ ├── nestml_fI_curve_[iaf_cond_exp_sfa_rr_neuron_nestml]_small.png │ ├── nestml_fI_curve_[iaf_psc_alpha_neuron_nestml].png │ ├── nestml_fI_curve_[iaf_psc_alpha_neuron_nestml]_small.png │ ├── nestml_fI_curve_[iaf_psc_delta_neuron_nestml].png │ ├── nestml_fI_curve_[iaf_psc_delta_neuron_nestml]_small.png │ ├── nestml_fI_curve_[iaf_psc_exp_neuron_nestml].png │ ├── nestml_fI_curve_[iaf_psc_exp_neuron_nestml]_small.png │ ├── nestml_fI_curve_[izhikevich_neuron_nestml].png │ ├── nestml_fI_curve_[izhikevich_neuron_nestml]_small.png │ ├── nestml_fI_curve_[mat2_psc_exp_neuron_nestml].png │ ├── nestml_fI_curve_[mat2_psc_exp_neuron_nestml]_small.png │ ├── nestml_psp_[aeif_cond_exp_neuron_nestml].png │ ├── nestml_psp_[aeif_cond_exp_neuron_nestml]_small.png │ ├── nestml_psp_[hh_cond_exp_traub_neuron_nestml].png │ ├── nestml_psp_[hh_cond_exp_traub_neuron_nestml]_small.png │ ├── nestml_psp_[hh_psc_alpha_neuron_nestml].png │ ├── nestml_psp_[hh_psc_alpha_neuron_nestml]_small.png │ ├── nestml_psp_[iaf_chxk_2008_neuron_nestml].png │ ├── nestml_psp_[iaf_chxk_2008_neuron_nestml]_small.png │ ├── nestml_psp_[iaf_cond_alpha_neuron_nestml].png │ ├── nestml_psp_[iaf_cond_alpha_neuron_nestml]_small.png │ ├── nestml_psp_[iaf_cond_beta_neuron_nestml].png │ ├── nestml_psp_[iaf_cond_beta_neuron_nestml]_small.png │ ├── nestml_psp_[iaf_cond_exp_neuron_nestml].png │ ├── nestml_psp_[iaf_cond_exp_neuron_nestml]_small.png │ ├── nestml_psp_[iaf_cond_exp_sfa_rr_neuron_nestml].png │ ├── nestml_psp_[iaf_cond_exp_sfa_rr_neuron_nestml]_small.png │ ├── nestml_psp_[iaf_psc_alpha_neuron_nestml].png │ ├── nestml_psp_[iaf_psc_alpha_neuron_nestml]_small.png │ ├── nestml_psp_[iaf_psc_delta_neuron_nestml].png │ ├── nestml_psp_[iaf_psc_delta_neuron_nestml]_small.png │ ├── nestml_psp_[iaf_psc_exp_neuron_nestml].png │ ├── nestml_psp_[iaf_psc_exp_neuron_nestml]_small.png │ ├── nestml_psp_[izhikevich_neuron_nestml].png │ ├── nestml_psp_[izhikevich_neuron_nestml]_small.png │ ├── nestml_psp_[mat2_psc_exp_neuron_nestml].png │ ├── nestml_psp_[mat2_psc_exp_neuron_nestml]_small.png │ ├── neuromodulated_stdp_synapse.rst │ ├── noisy_synapse.rst │ ├── output.html │ ├── static_synapse.rst │ ├── stdp_nn_pre_centered_synapse.rst │ ├── stdp_nn_restr_symm_synapse.rst │ ├── stdp_nn_symm_synapse.rst │ ├── stdp_synapse.rst │ ├── stdp_triplet_synapse.rst │ ├── terub_gpe_neuron.rst │ ├── terub_stn_neuron.rst │ ├── traub_cond_multisyn_neuron.rst │ ├── traub_psc_alpha_neuron.rst │ ├── wb_cond_exp_neuron.rst │ └── wb_cond_multisyn_neuron.rst ├── nestml-logo │ ├── nestml-logo.pdf │ ├── nestml-logo.png │ └── nestml-logo.svg ├── nestml_language │ ├── index.rst │ ├── nestml_language_concepts.rst │ ├── neurons_in_nestml.rst │ └── synapses_in_nestml.rst ├── pynestml_toolchain │ ├── back.rst │ ├── extensions.rst │ ├── front.rst │ ├── index.rst │ ├── middle.rst │ └── pic │ │ ├── back_AnGen_cropped.png │ │ ├── back_different_cropped.png │ │ ├── back_genFiles_cropped.png │ │ ├── back_overview_cropped.png │ │ ├── back_phy_cropped.png │ │ ├── back_primTypes_cropped.png │ │ ├── back_proc_cropped.png │ │ ├── back_processor_cropped.png │ │ ├── back_solver_cropped.png │ │ ├── back_template_cropped.png │ │ ├── back_toCpp_cropped.png │ │ ├── back_toJson_cropped.png │ │ ├── back_toNest_cropped.png │ │ ├── back_toScalar_cropped.png │ │ ├── back_trans_cropped.png │ │ ├── back_used_cropped.png │ │ ├── dsl_archi_cropped.png │ │ ├── ext_back_temp_cropped.jpg │ │ ├── ext_front_astB_cropped.jpg │ │ ├── ext_front_astVisitor_cropped.jpg │ │ ├── ext_front_cocos_cropped.jpg │ │ ├── ext_front_context_cropped.jpg │ │ ├── ext_front_gram_cropped.jpg │ │ ├── ext_front_symbolVisitor_cropped.jpg │ │ ├── front_astclasses_cropped.jpg │ │ ├── front_builder_code_cropped.jpg │ │ ├── front_cocos_cropped.jpg │ │ ├── front_cocos_example_cropped.jpg │ │ ├── front_combunits_cropped.jpg │ │ ├── front_commentCD_cropped.jpg │ │ ├── front_comment_cropped.jpg │ │ ├── front_gram2ast_cropped.jpg │ │ ├── front_grammar_cropped.jpg │ │ ├── front_overview_cropped.jpg │ │ ├── front_parser_overview_cropped.jpg │ │ ├── front_predefined_cropped.jpg │ │ ├── front_processing_cropped.jpg │ │ ├── front_resolve_cropped.jpg │ │ ├── front_semantics_cropped.jpg │ │ ├── front_simple_cropped.jpg │ │ ├── front_symbols_cropped.jpg │ │ ├── front_symbolsetup_cropped.jpg │ │ ├── front_transdata_cropped.jpg │ │ ├── front_transexpr_cropped.jpg │ │ ├── front_typevisitoroverview_cropped.jpg │ │ ├── mid_higher.png │ │ ├── mid_higher_cropped.png │ │ ├── mid_logger.png │ │ ├── mid_logger_cropped.png │ │ ├── mid_oldvis.png │ │ ├── mid_oldvis_cropped.png │ │ ├── mid_overview.png │ │ ├── mid_overview_cropped.png │ │ ├── mid_processing.png │ │ ├── mid_processing_cropped.png │ │ ├── mid_trans.png │ │ └── mid_trans_cropped.png ├── requirements.txt ├── running │ ├── Schmidt_SpiNNaker_NESTML_Masters_thesis_2023.pdf │ ├── index.rst │ ├── running_nest.rst │ ├── running_nest_compartmental.rst │ ├── running_nest_desktop.rst │ ├── running_pretty_render.rst │ ├── running_python_standalone.rst │ └── running_spinnaker.rst ├── sphinx-apidoc │ ├── _static │ │ └── css │ │ │ ├── custom.css │ │ │ └── pygments.css │ ├── conf.py │ └── index.rst └── tutorials │ ├── active_dendrite │ └── nestml_active_dendrite_tutorial.ipynb │ ├── index.rst │ ├── inhomogeneous_poisson │ ├── inhomogeneous_poisson.ipynb │ └── inhomogeneous_poisson.nestml │ ├── izhikevich │ ├── izhikevich_solution.nestml │ ├── izhikevich_task.nestml │ └── nestml_izhikevich_tutorial.ipynb │ ├── ornstein_uhlenbeck_noise │ └── nestml_ou_noise_tutorial.ipynb │ ├── sequence_learning │ ├── iaf_psc_exp_nonlineardendrite_neuron.nestml │ └── sequence_learning.ipynb │ ├── spike_frequency_adaptation │ ├── models │ │ ├── iaf_psc_alpha.nestml │ │ ├── iaf_psc_alpha_adapt_curr.nestml │ │ ├── iaf_psc_alpha_adapt_thresh.nestml │ │ └── iaf_psc_alpha_adapt_thresh_OU.nestml │ └── nestml_spike_frequency_adaptation_tutorial.ipynb │ ├── stdp_dopa_synapse │ └── stdp_dopa_synapse.ipynb │ ├── stdp_third_factor_active_dendrite │ └── stdp_third_factor_active_dendrite.ipynb │ ├── stdp_windows │ └── stdp_windows.ipynb │ ├── triplet_stdp_synapse │ └── triplet_stdp_synapse.ipynb │ └── tutorials_list.rst ├── extras ├── codeanalysis │ ├── check_copyright_headers.py │ └── copyright_header_template.py ├── convert_cm_default_to_template.py ├── nestml-release-checklist.md ├── spinnaker-apptainer.def └── syntax-highlighting │ ├── KatePart │ ├── README.md │ ├── language.xsd │ └── nestml-highlight.xml │ ├── geany │ ├── Readme.md │ └── filetypes.NestML.conf │ ├── pygments │ └── pygments_nestml.py │ └── visual-code │ ├── Readme.md │ └── nestml │ ├── .vscode │ └── launch.json │ ├── language-configuration.json │ ├── package.json │ └── syntaxes │ └── nestml.tmLanguage.json ├── models ├── neurons │ ├── aeif_cond_alpha_neuron.nestml │ ├── aeif_cond_exp_neuron.nestml │ ├── hh_cond_exp_destexhe_neuron.nestml │ ├── hh_cond_exp_traub_neuron.nestml │ ├── hh_moto_5ht_neuron.nestml │ ├── hh_psc_alpha_neuron.nestml │ ├── hill_tononi_neuron.nestml │ ├── iaf_chxk_2008_neuron.nestml │ ├── iaf_cond_alpha_neuron.nestml │ ├── iaf_cond_beta_neuron.nestml │ ├── iaf_cond_exp_neuron.nestml │ ├── iaf_cond_exp_sfa_rr_neuron.nestml │ ├── iaf_psc_alpha_neuron.nestml │ ├── iaf_psc_delta_fixed_timestep_neuron.nestml │ ├── iaf_psc_delta_neuron.nestml │ ├── iaf_psc_exp_htum_neuron.nestml │ ├── iaf_psc_exp_neuron.nestml │ ├── ignore_and_fire_neuron.nestml │ ├── izhikevich_neuron.nestml │ ├── izhikevich_psc_alpha_neuron.nestml │ ├── mat2_psc_exp_neuron.nestml │ ├── terub_gpe_neuron.nestml │ ├── terub_stn_neuron.nestml │ ├── traub_cond_multisyn_neuron.nestml │ ├── traub_psc_alpha_neuron.nestml │ ├── wb_cond_exp_neuron.nestml │ └── wb_cond_multisyn_neuron.nestml └── synapses │ ├── neuromodulated_stdp_synapse.nestml │ ├── noisy_synapse.nestml │ ├── static_synapse.nestml │ ├── stdp_nn_pre_centered_synapse.nestml │ ├── stdp_nn_restr_symm_synapse.nestml │ ├── stdp_nn_symm_synapse.nestml │ ├── stdp_synapse.nestml │ ├── stdp_triplet_synapse.nestml │ └── stdsp_synapse.nestml ├── pynestml ├── __init__.py ├── cocos │ ├── __init__.py │ ├── co_co.py │ ├── co_co_all_variables_defined.py │ ├── co_co_cm_channel_model.py │ ├── co_co_cm_concentration_model.py │ ├── co_co_cm_continuous_input_model.py │ ├── co_co_cm_synapse_model.py │ ├── co_co_convolve_cond_correctly_built.py │ ├── co_co_convolve_has_correct_parameter.py │ ├── co_co_correct_numerator_of_unit.py │ ├── co_co_correct_order_in_equation.py │ ├── co_co_each_block_defined_at_most_once.py │ ├── co_co_equations_only_for_init_values.py │ ├── co_co_function_argument_template_types_consistent.py │ ├── co_co_function_calls_consistent.py │ ├── co_co_function_unique.py │ ├── co_co_illegal_expression.py │ ├── co_co_inline_expression_not_assigned_to.py │ ├── co_co_inline_expressions_have_rhs.py │ ├── co_co_inline_max_one_lhs.py │ ├── co_co_input_port_not_assigned_to.py │ ├── co_co_input_port_qualifier_unique.py │ ├── co_co_integrate_odes_called_if_equations_defined.py │ ├── co_co_integrate_odes_params_correct.py │ ├── co_co_internals_assigned_only_in_internals_block.py │ ├── co_co_invariant_is_boolean.py │ ├── co_co_kernel_type.py │ ├── co_co_model_name_unique.py │ ├── co_co_nest_random_functions_legally_used.py │ ├── co_co_nest_synapse_delay_not_assigned_to.py │ ├── co_co_no_duplicate_compilation_unit_names.py │ ├── co_co_no_kernels_except_in_convolve.py │ ├── co_co_no_nest_name_space_collision.py │ ├── co_co_ode_functions_have_consistent_units.py │ ├── co_co_odes_have_consistent_units.py │ ├── co_co_output_port_defined_if_emit_call.py │ ├── co_co_parameters_assigned_only_in_parameter_block.py │ ├── co_co_priorities_correctly_specified.py │ ├── co_co_resolution_func_legally_used.py │ ├── co_co_resolution_func_used.py │ ├── co_co_simple_delta_function.py │ ├── co_co_state_variables_initialized.py │ ├── co_co_timestep_function_legally_used.py │ ├── co_co_user_defined_function_correctly_defined.py │ ├── co_co_v_comp_exists.py │ ├── co_co_variable_once_per_scope.py │ ├── co_co_vector_declaration_right_size.py │ ├── co_co_vector_input_port_correct_size_type.py │ ├── co_co_vector_parameter_declared_in_right_block.py │ ├── co_co_vector_variable_in_non_vector_declaration.py │ └── co_cos_manager.py ├── codegeneration │ ├── __init__.py │ ├── autodoc_builder.py │ ├── autodoc_code_generator.py │ ├── builder.py │ ├── code_generator.py │ ├── code_generator_utils.py │ ├── nest_assignments_helper.py │ ├── nest_builder.py │ ├── nest_code_generator.py │ ├── nest_code_generator_utils.py │ ├── nest_compartmental_code_generator.py │ ├── nest_declarations_helper.py │ ├── nest_desktop_code_generator.py │ ├── nest_tools.py │ ├── nest_unit_converter.py │ ├── pretty_render_code_generator.py │ ├── printers │ │ ├── __init__.py │ │ ├── ast_printer.py │ │ ├── c_simple_expression_printer.py │ │ ├── constant_printer.py │ │ ├── cpp_expression_printer.py │ │ ├── cpp_function_call_printer.py │ │ ├── cpp_printer.py │ │ ├── cpp_simple_expression_printer.py │ │ ├── cpp_type_symbol_printer.py │ │ ├── cpp_variable_printer.py │ │ ├── expression_printer.py │ │ ├── function_call_printer.py │ │ ├── gsl_variable_printer.py │ │ ├── latex_expression_printer.py │ │ ├── latex_function_call_printer.py │ │ ├── latex_simple_expression_printer.py │ │ ├── latex_variable_printer.py │ │ ├── model_printer.py │ │ ├── nest2_cpp_function_call_printer.py │ │ ├── nest2_gsl_function_call_printer.py │ │ ├── nest_cpp_function_call_printer.py │ │ ├── nest_cpp_type_symbol_printer.py │ │ ├── nest_gsl_function_call_printer.py │ │ ├── nest_variable_printer.py │ │ ├── nestml_expression_printer.py │ │ ├── nestml_function_call_printer.py │ │ ├── nestml_printer.py │ │ ├── nestml_simple_expression_printer.py │ │ ├── nestml_variable_printer.py │ │ ├── ode_toolbox_expression_printer.py │ │ ├── ode_toolbox_function_call_printer.py │ │ ├── ode_toolbox_variable_printer.py │ │ ├── python_expression_printer.py │ │ ├── python_function_call_printer.py │ │ ├── python_simple_expression_printer.py │ │ ├── python_standalone_printer.py │ │ ├── python_stepping_function_function_call_printer.py │ │ ├── python_stepping_function_variable_printer.py │ │ ├── python_type_symbol_printer.py │ │ ├── python_variable_printer.py │ │ ├── simple_expression_printer.py │ │ ├── spinnaker_c_function_call_printer.py │ │ ├── spinnaker_c_type_symbol_printer.py │ │ ├── spinnaker_c_variable_printer.py │ │ ├── spinnaker_gsl_function_call_printer.py │ │ ├── spinnaker_python_function_call_printer.py │ │ ├── spinnaker_python_simple_expression_printer.py │ │ ├── spinnaker_python_type_symbol_printer.py │ │ ├── symbol_printer.py │ │ ├── sympy_simple_expression_printer.py │ │ ├── type_symbol_printer.py │ │ └── variable_printer.py │ ├── python_code_generator_utils.py │ ├── python_standalone_code_generator.py │ ├── python_standalone_target_tools.py │ ├── resources_autodoc │ │ ├── autodoc.css │ │ ├── block_decl_table.jinja2 │ │ ├── docutils.conf │ │ ├── nestml_models_index.jinja2 │ │ ├── nestml_neuron_model.jinja2 │ │ └── nestml_synapse_model.jinja2 │ ├── resources_nest │ │ └── point_neuron │ │ │ ├── @NEURON_NAME@.cpp.jinja2 │ │ │ ├── @NEURON_NAME@.h.jinja2 │ │ │ ├── @SYNAPSE_NAME@.h.jinja2 │ │ │ ├── __init__.py │ │ │ ├── common │ │ │ ├── NeuronClass.jinja2 │ │ │ ├── NeuronHeader.jinja2 │ │ │ └── SynapseHeader.h.jinja2 │ │ │ ├── directives_cpp │ │ │ ├── AnalyticIntegrationStep_begin.jinja2 │ │ │ ├── AnalyticIntegrationStep_end.jinja2 │ │ │ ├── ApplySpikesFromBuffers.jinja2 │ │ │ ├── AssignTmpDictionaryValue.jinja2 │ │ │ ├── Assignment.jinja2 │ │ │ ├── BufferDeclaration.jinja2 │ │ │ ├── BufferDeclarationValue.jinja2 │ │ │ ├── BufferInitialization.jinja2 │ │ │ ├── CommonPropertiesDictionaryMemberInitialization.jinja2 │ │ │ ├── CommonPropertiesDictionaryReader.jinja2 │ │ │ ├── CommonPropertiesDictionaryWriter.jinja2 │ │ │ ├── CompoundStatement.jinja2 │ │ │ ├── ContinuousInputBufferGetter.jinja2 │ │ │ ├── Declaration.jinja2 │ │ │ ├── DelayVariablesDeclaration.jinja2 │ │ │ ├── DelayVariablesInitialization.jinja2 │ │ │ ├── DynamicStateElement.jinja2 │ │ │ ├── ForStatement.jinja2 │ │ │ ├── FunctionCall.jinja2 │ │ │ ├── FunctionDeclaration.jinja2 │ │ │ ├── GSLDifferentiationFunction.jinja2 │ │ │ ├── GSLIntegrationStep.jinja2 │ │ │ ├── IfStatement.jinja2 │ │ │ ├── MemberDeclaration.jinja2 │ │ │ ├── MemberInitialization.jinja2 │ │ │ ├── MemberVariableGetterSetter.jinja2 │ │ │ ├── OutputEvent.jinja2 │ │ │ ├── PredefinedFunction_emit_spike.jinja2 │ │ │ ├── PredefinedFunction_integrate_odes.jinja2 │ │ │ ├── ReadFromDictionaryToTmp.jinja2 │ │ │ ├── ReturnStatement.jinja2 │ │ │ ├── RportToBufferIndexEntry.jinja2 │ │ │ ├── SmallStatement.jinja2 │ │ │ ├── SpikeBufferGetter.jinja2 │ │ │ ├── StateVariablesEnum.jinja2 │ │ │ ├── Statement.jinja2 │ │ │ ├── StmtsBody.jinja2 │ │ │ ├── UpdateDelayVariables.jinja2 │ │ │ ├── VectorDeclaration.jinja2 │ │ │ ├── VectorSizeParameter.jinja2 │ │ │ ├── WhileStatement.jinja2 │ │ │ ├── WriteInDictionary.jinja2 │ │ │ └── __init__.py │ │ │ └── setup │ │ │ ├── @MODULE_NAME@.cpp.jinja2 │ │ │ ├── @MODULE_NAME@.h.jinja2 │ │ │ ├── CMakeLists.txt.jinja2 │ │ │ ├── __init__.py │ │ │ └── common │ │ │ ├── ModuleClass.jinja2 │ │ │ ├── ModuleClassMaster.jinja2 │ │ │ └── ModuleHeader.jinja2 │ ├── resources_nest_compartmental │ │ └── cm_neuron │ │ │ ├── @NEURON_NAME@.cpp.jinja2 │ │ │ ├── @NEURON_NAME@.h.jinja2 │ │ │ ├── __init__.py │ │ │ ├── cm_neuroncurrents_@NEURON_NAME@.cpp.jinja2 │ │ │ ├── cm_neuroncurrents_@NEURON_NAME@.h.jinja2 │ │ │ ├── cm_tree_@NEURON_NAME@.cpp.jinja2 │ │ │ ├── cm_tree_@NEURON_NAME@.h.jinja2 │ │ │ ├── directives_cpp │ │ │ └── setup │ │ │ ├── @MODULE_NAME@.cpp.jinja2 │ │ │ ├── @MODULE_NAME@.h.jinja2 │ │ │ ├── CMakeLists.txt.jinja2 │ │ │ ├── __init__.py │ │ │ └── common │ │ │ ├── ModuleClass.jinja2 │ │ │ ├── ModuleClassMaster.jinja2 │ │ │ └── ModuleHeader.jinja2 │ ├── resources_nest_desktop │ │ ├── @NEURON_NAME@.json.jinja2 │ │ └── VariableDeclaration.jinja2 │ ├── resources_pretty_render │ │ ├── @MODEL_NAME@.html.jinja2 │ │ ├── nestml_code_render_neuron.nestml │ │ └── nestml_code_render_synapse.nestml │ ├── resources_python_standalone │ │ ├── directives │ │ │ └── AnalyticIntegrationStep_end.jinja2 │ │ └── point_neuron │ │ │ ├── @NEURON_NAME@.py.jinja2 │ │ │ ├── @SYNAPSE_NAME@.py.jinja2 │ │ │ ├── directives_py │ │ │ ├── AnalyticIntegrationStep_begin.jinja2 │ │ │ ├── AnalyticIntegrationStep_end.jinja2 │ │ │ ├── ApplySpikesFromBuffers.jinja2 │ │ │ ├── Assignment.jinja2 │ │ │ ├── CompoundStatement.jinja2 │ │ │ ├── ConstructorParameterWithDefault.jinja2 │ │ │ ├── Declaration.jinja2 │ │ │ ├── DynamicStateElement.jinja2 │ │ │ ├── ForStatement.jinja2 │ │ │ ├── FunctionCall.jinja2 │ │ │ ├── FunctionDeclaration.jinja2 │ │ │ ├── GSLDifferentiationFunction.jinja2 │ │ │ ├── GSLIntegrationStep.jinja2 │ │ │ ├── IfStatement.jinja2 │ │ │ ├── MemberDeclaration.jinja2 │ │ │ ├── MemberInitialization.jinja2 │ │ │ ├── MemberVariableGetterSetter.jinja2 │ │ │ ├── ReturnStatement.jinja2 │ │ │ ├── SmallStatement.jinja2 │ │ │ ├── Statement.jinja2 │ │ │ ├── StmtsBody.jinja2 │ │ │ ├── WhileStatement.jinja2 │ │ │ └── __init__.py │ │ │ ├── neuron.py.jinja2 │ │ │ ├── simulator.py.jinja2 │ │ │ ├── spike_generator.py.jinja2 │ │ │ ├── synapse.py.jinja2 │ │ │ ├── test_python_standalone_module.py.jinja2 │ │ │ └── utils.py.jinja2 │ ├── resources_spinnaker │ │ ├── @NEURON_NAME@.py.jinja2 │ │ ├── @NEURON_NAME@_chain_example.py.jinja2 │ │ ├── @NEURON_NAME@_impl.h.jinja2 │ │ ├── @NEURON_NAME@_impl.py.jinja2 │ │ ├── @SYNAPSE_NAME@.py.jinja2 │ │ ├── @SYNAPSE_NAME@_impl.c.jinja2 │ │ ├── @SYNAPSE_NAME@_impl.h.jinja2 │ │ ├── @SYNAPSE_NAME@_impl.py.jinja2 │ │ ├── @SYNAPSE_NAME@_timing.py.jinja2 │ │ ├── @SYNAPSE_NAME@_timing_impl.c.jinja2 │ │ ├── @SYNAPSE_NAME@_timing_impl.h.jinja2 │ │ ├── @SYNAPSE_NAME@_weight.py.jinja2 │ │ ├── @SYNAPSE_NAME@_weight_impl.c.jinja2 │ │ ├── @SYNAPSE_NAME@_weight_impl.h.jinja2 │ │ ├── Makefile_@NEURON_NAME@_impl.jinja2 │ │ ├── Makefile_@SYNAPSE_NAME@_impl.jinja2 │ │ ├── Makefile_models.jinja2 │ │ ├── Makefile_root.jinja2 │ │ ├── NewSynapseApi.h │ │ ├── __init__.py.jinja2 │ │ ├── directives_cpp │ │ │ ├── AnalyticIntegrationStep_begin.jinja2 │ │ │ ├── AnalyticIntegrationStep_end.jinja2 │ │ │ ├── ApplySpikesFromBuffers.jinja2 │ │ │ ├── AssignTmpDictionaryValue.jinja2 │ │ │ ├── Assignment.jinja2 │ │ │ ├── BufferDeclaration.jinja2 │ │ │ ├── BufferDeclarationValue.jinja2 │ │ │ ├── BufferInitialization.jinja2 │ │ │ ├── CommonPropertiesDictionaryMemberInitialization.jinja2 │ │ │ ├── CommonPropertiesDictionaryReader.jinja2 │ │ │ ├── CommonPropertiesDictionaryWriter.jinja2 │ │ │ ├── CompoundStatement.jinja2 │ │ │ ├── ContinuousInputBufferGetter.jinja2 │ │ │ ├── Declaration.jinja2 │ │ │ ├── DelayVariablesDeclaration.jinja2 │ │ │ ├── DelayVariablesInitialization.jinja2 │ │ │ ├── DynamicStateElement.jinja2 │ │ │ ├── ForStatement.jinja2 │ │ │ ├── FunctionCall.jinja2 │ │ │ ├── FunctionDeclaration.jinja2 │ │ │ ├── GSLDifferentiationFunction.jinja2 │ │ │ ├── GSLIntegrationStep.jinja2 │ │ │ ├── IfStatement.jinja2 │ │ │ ├── MemberDeclaration.jinja2 │ │ │ ├── MemberInitialization.jinja2 │ │ │ ├── MemberVariableGetterSetter.jinja2 │ │ │ ├── OutputEvent.jinja2 │ │ │ ├── PredefinedFunction_emit_spike.jinja2 │ │ │ ├── PredefinedFunction_integrate_odes.jinja2 │ │ │ ├── ReadFromDictionaryToTmp.jinja2 │ │ │ ├── ReturnStatement.jinja2 │ │ │ ├── RportToBufferIndexEntry.jinja2 │ │ │ ├── SmallStatement.jinja2 │ │ │ ├── SpikeBufferGetter.jinja2 │ │ │ ├── StateVariablesEnum.jinja2 │ │ │ ├── Statement.jinja2 │ │ │ ├── StmtsBody.jinja2 │ │ │ ├── UpdateDelayVariables.jinja2 │ │ │ ├── VectorDeclaration.jinja2 │ │ │ ├── VectorSizeParameter.jinja2 │ │ │ ├── WhileStatement.jinja2 │ │ │ └── WriteInDictionary.jinja2 │ │ ├── directives_py │ │ ├── extra.mk.jinja2 │ │ ├── extra_neuron.mk.jinja2 │ │ ├── extra_synapse.mk.jinja2 │ │ └── synapse_build.mk │ ├── spinnaker_builder.py │ ├── spinnaker_code_generator.py │ ├── spinnaker_code_generator_utils.py │ └── spinnaker_unit_converter.py ├── exceptions │ ├── __init__.py │ ├── code_generator_options_exception.py │ ├── generated_code_build_exception.py │ ├── implicit_cast_exception.py │ ├── implicit_magnitude_cast_exception.py │ ├── invalid_path_exception.py │ └── invalid_target_exception.py ├── frontend │ ├── __init__.py │ ├── frontend_configuration.py │ └── pynestml_frontend.py ├── generated │ ├── PyNestMLLexer.py │ ├── PyNestMLLexerBase.py │ ├── PyNestMLParser.py │ ├── PyNestMLParserVisitor.py │ └── __init__.py ├── grammars │ ├── PyNestMLLexer.g4 │ ├── PyNestMLParser.g4 │ └── generate_lexer_parser ├── meta_model │ ├── __init__.py │ ├── ast_arithmetic_operator.py │ ├── ast_assignment.py │ ├── ast_bit_operator.py │ ├── ast_block_with_variables.py │ ├── ast_comparison_operator.py │ ├── ast_compound_stmt.py │ ├── ast_data_type.py │ ├── ast_declaration.py │ ├── ast_elif_clause.py │ ├── ast_else_clause.py │ ├── ast_equations_block.py │ ├── ast_expression.py │ ├── ast_expression_node.py │ ├── ast_external_variable.py │ ├── ast_for_stmt.py │ ├── ast_function.py │ ├── ast_function_call.py │ ├── ast_if_clause.py │ ├── ast_if_stmt.py │ ├── ast_inline_expression.py │ ├── ast_input_block.py │ ├── ast_input_port.py │ ├── ast_input_qualifier.py │ ├── ast_kernel.py │ ├── ast_logical_operator.py │ ├── ast_model.py │ ├── ast_model_body.py │ ├── ast_namespace_decorator.py │ ├── ast_nestml_compilation_unit.py │ ├── ast_node.py │ ├── ast_node_factory.py │ ├── ast_ode_equation.py │ ├── ast_on_condition_block.py │ ├── ast_on_receive_block.py │ ├── ast_output_block.py │ ├── ast_parameter.py │ ├── ast_return_stmt.py │ ├── ast_simple_expression.py │ ├── ast_small_stmt.py │ ├── ast_stmt.py │ ├── ast_stmts_body.py │ ├── ast_unary_operator.py │ ├── ast_unit_type.py │ ├── ast_update_block.py │ ├── ast_variable.py │ └── ast_while_stmt.py ├── symbol_table │ ├── __init__.py │ ├── scope.py │ └── symbol_table.py ├── symbols │ ├── __init__.py │ ├── boolean_type_symbol.py │ ├── error_type_symbol.py │ ├── function_symbol.py │ ├── integer_type_symbol.py │ ├── predefined_functions.py │ ├── predefined_types.py │ ├── predefined_units.py │ ├── predefined_variables.py │ ├── real_type_symbol.py │ ├── string_type_symbol.py │ ├── symbol.py │ ├── template_type_symbol.py │ ├── type_symbol.py │ ├── unit_type_symbol.py │ ├── variable_symbol.py │ ├── variadic_type_symbol.py │ └── void_type_symbol.py ├── transformers │ ├── __init__.py │ ├── add_timestep_to_internals_transformer.py │ ├── illegal_variable_name_transformer.py │ ├── inline_expression_expansion_transformer.py │ ├── synapse_post_neuron_transformer.py │ ├── synapse_remove_post_port.py │ └── transformer.py ├── utils │ ├── __init__.py │ ├── ast_mechanism_information_collector.py │ ├── ast_source_location.py │ ├── ast_synapse_information_collector.py │ ├── ast_utils.py │ ├── ast_vector_parameter_setter_and_printer.py │ ├── ast_vector_parameter_setter_and_printer_factory.py │ ├── chan_info_enricher.py │ ├── channel_processing.py │ ├── cloning_helpers.py │ ├── con_in_info_enricher.py │ ├── conc_info_enricher.py │ ├── concentration_processing.py │ ├── continuous_input_processing.py │ ├── error_listener.py │ ├── logger.py │ ├── logging_helper.py │ ├── mechanism_processing.py │ ├── mechs_info_enricher.py │ ├── messages.py │ ├── model_parser.py │ ├── ode_toolbox_utils.py │ ├── port_signal_type.py │ ├── stack.py │ ├── string_utils.py │ ├── synapse_processing.py │ ├── syns_info_enricher.py │ ├── type_caster.py │ ├── type_dictionary.py │ ├── unit_type.py │ └── with_options.py └── visitors │ ├── __init__.py │ ├── assign_implicit_conversion_factors_visitor.py │ ├── ast_binary_logic_visitor.py │ ├── ast_bit_operator_visitor.py │ ├── ast_boolean_literal_visitor.py │ ├── ast_builder_visitor.py │ ├── ast_comparison_operator_visitor.py │ ├── ast_condition_visitor.py │ ├── ast_data_type_visitor.py │ ├── ast_dot_operator_visitor.py │ ├── ast_equations_with_delay_vars_visitor.py │ ├── ast_equations_with_vector_variables.py │ ├── ast_expression_type_visitor.py │ ├── ast_function_call_visitor.py │ ├── ast_higher_order_visitor.py │ ├── ast_inf_visitor.py │ ├── ast_line_operation_visitor.py │ ├── ast_logical_not_visitor.py │ ├── ast_mark_delay_vars_visitor.py │ ├── ast_numeric_literal_visitor.py │ ├── ast_parent_aware_visitor.py │ ├── ast_parent_visitor.py │ ├── ast_parentheses_visitor.py │ ├── ast_power_visitor.py │ ├── ast_random_number_generator_visitor.py │ ├── ast_set_vector_parameter_in_update_expressions.py │ ├── ast_string_literal_visitor.py │ ├── ast_symbol_table_visitor.py │ ├── ast_unary_visitor.py │ ├── ast_variable_visitor.py │ ├── ast_visitor.py │ └── comment_collector_visitor.py ├── requirements.txt ├── setup.py └── tests ├── __init__.py ├── ast_builder_test.py ├── ast_clone_test.py ├── codegen_opts_detects_non_existing.py ├── comment_test.py ├── docstring_comment_test.py ├── expression_parser_test.py ├── expression_type_calculation_test.py ├── invalid ├── CoCoAssignmentToInlineExpression.nestml ├── CoCoConvolveNotCorrectlyParametrized.nestml ├── CoCoConvolveNotCorrectlyProvided.nestml ├── CoCoEachBlockUnique.nestml ├── CoCoElementInSameLine.nestml ├── CoCoElementNotDefined.nestml ├── CoCoFunctionCallNotConsistentWrongArgNumber.nestml ├── CoCoFunctionNotUnique.nestml ├── CoCoFunctionRedeclared.nestml ├── CoCoIllegalExpression.nestml ├── CoCoIncorrectReturnStatement.nestml ├── CoCoInitValuesWithoutOde.nestml ├── CoCoInlineExpressionHasNoRhs.nestml ├── CoCoInlineExpressionWithSeveralLhs.nestml ├── CoCoInputPortWithRedundantTypes.nestml ├── CoCoIntegrateOdesCalledIfEquationsDefined.nestml ├── CoCoInternalAssignedOutsideBlock.nestml ├── CoCoInvariantNotBool.nestml ├── CoCoKernelType.nestml ├── CoCoKernelTypeInitialValues.nestml ├── CoCoMultipleNeuronsWithEqualName.nestml ├── CoCoNestNamespaceCollision.nestml ├── CoCoNoOrderOfEquations.nestml ├── CoCoOdeIncorrectlyTyped.nestml ├── CoCoOdeVarNotInInitialValues.nestml ├── CoCoOutputPortDefinedIfEmitCall-2.nestml ├── CoCoOutputPortDefinedIfEmitCall.nestml ├── CoCoOutputPortTypeContinuous.nestml ├── CoCoOutputPortTypeIfEmitCall-2.nestml ├── CoCoOutputPortTypeIfEmitCall-3.nestml ├── CoCoOutputPortTypeIfEmitCall.nestml ├── CoCoParameterAssignedOutsideBlock.nestml ├── CoCoPrioritiesCorrectlySpecified.nestml ├── CoCoResolutionLegallyUsed.nestml ├── CoCoSpikeInputPortWithoutType.nestml ├── CoCoStateVariablesInitialized.nestml ├── CoCoUnitNumeratorNotOne.nestml ├── CoCoValueAssignedToInputPort.nestml ├── CoCoVariableDefinedAfterUsage.nestml ├── CoCoVariableNotDefined.nestml ├── CoCoVariableRedeclared.nestml ├── CoCoVariableRedeclaredInSameScope.nestml ├── CoCoVectorDeclarationSize.nestml ├── CoCoVectorInNonVectorDeclaration.nestml ├── CoCoVectorInputPortSizeAndType.nestml ├── CoCoVectorParameterDeclaration.nestml ├── CoCoVectorParameterType.nestml ├── CompoundOperatorWithDifferentButCompatibleUnits.nestml ├── DocstringCommentTest.nestml └── stdp_synapse_missing_delay_decorator.nestml ├── lexer_parser_test.py ├── magnitude_compatibility_test.py ├── nest_compartmental_tests ├── resources │ ├── cm_default.nestml │ ├── concmech.nestml │ ├── continuous_test.nestml │ ├── invalid │ │ ├── CoCoCmVariableHasRhs.nestml │ │ ├── CoCoCmVariableMultiUse.nestml │ │ ├── CoCoCmVariablesDeclared.nestml │ │ └── CoCoCmVcompExists.nestml │ └── valid │ │ ├── CoCoCmVariableHasRhs.nestml │ │ ├── CoCoCmVariableMultiUse.nestml │ │ ├── CoCoCmVariablesDeclared.nestml │ │ └── CoCoCmVcompExists.nestml ├── test__cocos.py ├── test__compartmental_model.py ├── test__concmech_model.py ├── test__continuous_input.py ├── test__interaction_with_disabled_mechanism.py └── test__model_variable_initialization.py ├── nest_continuous_benchmarking └── test_nest_continuous_benchmarking.py ├── nest_desktop_tests └── nest_desktop_code_generator_test.py ├── nest_tests ├── expressions_code_generator_test.py ├── fir_filter_test.py ├── input_ports_test.py ├── nest_code_generator_test.py ├── nest_custom_templates_test.py ├── nest_delay_based_variables_test.py ├── nest_forbidden_variable_names_test.py ├── nest_install_module_in_different_location_test.py ├── nest_instantiability_test.py ├── nest_integration_test.py ├── nest_loops_integration_test.py ├── nest_multithreading_test.py ├── nest_random_functions_test.py ├── nest_resolution_builtin_test.py ├── nest_set_with_distribution_test.py ├── nest_split_simulation_test.py ├── nest_vectors_test.py ├── neuron_ou_conductance_noise_test.py ├── noisy_synapse_test.py ├── non_linear_dendrite_test.py ├── print_function_code_generator_test.py ├── print_statement_test.py ├── recordable_variables_test.py ├── resources │ ├── BiexponentialPostSynapticResponse.nestml │ ├── CppVariableNames.nestml │ ├── DelayDifferentialEquationsWithAnalyticSolver.nestml │ ├── DelayDifferentialEquationsWithMixedSolver.nestml │ ├── DelayDifferentialEquationsWithNumericSolver.nestml │ ├── FIR_filter.nestml │ ├── ForLoop.nestml │ ├── MathFunctionTest.nestml │ ├── PrintStatementInFunction.nestml │ ├── PrintStatementWithVariables.nestml │ ├── PrintVariables.nestml │ ├── PrintVariablesWithDifferentButCompatibleUnits.nestml │ ├── RecordableVariables.nestml │ ├── SimplePrintStatement.nestml │ ├── SimpleVectorsModel.nestml │ ├── StringHandlingTest.nestml │ ├── TimeVariableNeuron.nestml │ ├── TimeVariablePrePostSynapse.nestml │ ├── TimeVariableSynapse.nestml │ ├── Vectors.nestml │ ├── VectorsDeclarationAndAssignment.nestml │ ├── VectorsResize.nestml │ ├── WhileLoop.nestml │ ├── add_spikes_to_ode.nestml │ ├── aeif_cond_alpha_alt_neuron.nestml │ ├── alpha_function_2nd_order_ode_neuron.nestml │ ├── beta_function_with_inline_expression_neuron.nestml │ ├── code_options.json │ ├── delay_test_assigned_delay2_synapse.nestml │ ├── delay_test_assigned_delay_synapse.nestml │ ├── delay_test_assigned_synapse.nestml │ ├── delay_test_plastic_synapse.nestml │ ├── delay_test_synapse.nestml │ ├── dopa_second_order_synapse.nestml │ ├── homogeneous_parameters_synapse.nestml │ ├── iaf_cond_exp_Istep_neuron.nestml │ ├── iaf_psc_exp_multisynapse.nestml │ ├── iaf_psc_exp_multisynapse_vectors.nestml │ ├── iaf_psc_exp_nonlineardendrite.nestml │ ├── iaf_psc_exp_resolution_test.nestml │ ├── input_ports.nestml │ ├── input_ports_in_loop.nestml │ ├── integrate_odes_nonlinear_test.nestml │ ├── integrate_odes_test.nestml │ ├── integrate_odes_test_params.nestml │ ├── integrate_odes_test_params2.nestml │ ├── minimal_neuron.nestml │ ├── nest_codegen_opts.json │ ├── parrot_neuron.nestml │ ├── print_variable_script.py │ ├── random_functions_illegal_neuron.nestml │ ├── random_functions_illegal_synapse.nestml │ ├── stdp_saturating_synapse.nestml │ ├── test_delta_kernel_neuron.nestml │ ├── test_plasticity_dynamics_neuron.nestml │ ├── test_plasticity_dynamics_synapse.nestml │ ├── weight_test_assigned_synapse.nestml │ └── weight_test_plastic_synapse.nestml ├── stdp_neuromod_test.py ├── stdp_nn_pre_centered_test.py ├── stdp_nn_restr_symm_test.py ├── stdp_nn_synapse_test.py ├── stdp_synapse_test.py ├── stdp_triplet_synapse_test.py ├── stdp_window_test.py ├── terub_stn_test.py ├── test_add_spikes_to_ode.py ├── test_aeif_integrator.py ├── test_biexponential_synapse_kernel.py ├── test_co_generation_static_synapse.py ├── test_delay_variable_specified.py ├── test_delta_kernel.p_ ├── test_dopa_second_order_synapse.py ├── test_forward_euler_integrator.py ├── test_gap_junction.py ├── test_gap_junction_get_set_weight.py ├── test_homogeneous_parameters_synapse.py ├── test_iaf_exp_istep.py ├── test_ignore_and_fire.py ├── test_integrate_odes.py ├── test_make_inline_expressions_self_contained.py ├── test_minimal_stdp_neuron.py ├── test_multisynapse.py ├── test_nest_math_function.py ├── test_parrot_neuron.py ├── test_plasticity_dynamics.py ├── test_priority_neuron.py ├── test_priority_synapse.py ├── test_saturating_stdp.py ├── test_static_synapse.py ├── test_string_handling.py ├── test_time_variable.py ├── test_wb_cond_multisyn.py ├── test_weight_variable_specified.py ├── traub_cond_multisyn_test.py ├── traub_psc_alpha_test.py ├── vector_code_generator_test.py └── wb_cond_exp_test.py ├── pynestml_frontend_test.py ├── python_standalone_tests ├── test_izhikevich.py ├── test_neuron_build_and_sim_analytic.py └── test_neuron_build_and_sim_numeric.py ├── random_number_generators_test.py ├── resources ├── BlockTest.nestml ├── CommentTest.nestml ├── CompoundAssignmentWithDifferentButCompatibleUnits.nestml ├── DeclarationWithDifferentButCompatibleUnitMagnitude.nestml ├── DeclarationWithDifferentButCompatibleUnits.nestml ├── DeclarationWithSameVariableNameAsUnit.nestml ├── DirectAssignmentWithDifferentButCompatibleNestedUnits.nestml ├── DirectAssignmentWithDifferentButCompatibleUnits.nestml ├── ExpressionCollection.nestml ├── ExpressionTypeTest.nestml ├── FunctionBodyReturnStatementWithDifferentButCompatibleUnits.nestml ├── FunctionCallWithDifferentButCompatibleUnits.nestml ├── FunctionParameterTemplatingTest.nestml ├── MagnitudeCompatibilityTest.nestml ├── NestMLPrinterTest.nestml ├── ResolutionTest.nestml ├── RhsFunctionCallWithDifferentButCompatibleUnits.nestml ├── neuron_event_inv_priority_test.nestml ├── neuron_event_priority_test.nestml ├── random_number_generators_test.nestml ├── synapse_event_inv_priority_test.nestml └── synapse_event_priority_test.nestml ├── special_block_parser_builder_test.py ├── spinnaker_tests └── test_spinnaker_iaf_psc_exp.py ├── test_cocos.py ├── test_function_parameter_templating.py ├── test_nestml_printer.py ├── test_symbol_table_builder.py ├── test_unit_system.py └── valid ├── CoCoConvolveNotCorrectlyParametrized.nestml ├── CoCoConvolveNotCorrectlyProvided.nestml ├── CoCoEachBlockUnique.nestml ├── CoCoElementInSameLine.nestml ├── CoCoElementNotDefined.nestml ├── CoCoFunctionCallNotConsistentWrongArgNumber.nestml ├── CoCoFunctionNotUnique.nestml ├── CoCoFunctionRedeclared.nestml ├── CoCoIllegalExpression.nestml ├── CoCoIncorrectReturnStatement.nestml ├── CoCoInitValuesWithoutOde.nestml ├── CoCoInlineExpressionHasNoRhs.nestml ├── CoCoInlineExpressionWithSeveralLhs.nestml ├── CoCoInputPortWithRedundantTypes.nestml ├── CoCoIntegrateOdesCalledIfEquationsDefined.nestml ├── CoCoInternalAssignedOutsideBlock.nestml ├── CoCoInvariantNotBool.nestml ├── CoCoKernelType.nestml ├── CoCoMultipleNeuronsWithEqualName.nestml ├── CoCoNestNamespaceCollision.nestml ├── CoCoNoOrderOfEquations.nestml ├── CoCoOdeCorrectlyTyped.nestml ├── CoCoOdeVarNotInInitialValues.nestml ├── CoCoOutputPortDefinedIfEmitCall.nestml ├── CoCoParameterAssignedOutsideBlock.nestml ├── CoCoPrioritiesCorrectlySpecified.nestml ├── CoCoResolutionLegallyUsed.nestml ├── CoCoSpikeInputPortWithoutType.nestml ├── CoCoStateVariablesInitialized.nestml ├── CoCoUnitNumeratorNotOne.nestml ├── CoCoValueAssignedToInputPort.nestml ├── CoCoVariableDefinedAfterUsage.nestml ├── CoCoVariableNotDefined.nestml ├── CoCoVariableRedeclared.nestml ├── CoCoVariableRedeclaredInSameScope.nestml ├── CoCoVariableWithSameNameAsUnit.nestml ├── CoCoVectorDeclarationSize.nestml ├── CoCoVectorInNonVectorDeclaration.nestml ├── CoCoVectorInputPortSizeAndType.nestml ├── CoCoVectorParameterDeclaration.nestml ├── CoCoVectorParameterType.nestml ├── CompoundOperatorWithDifferentButCompatibleUnits.nestml └── DocstringCommentTest.nestml /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: / 5 | schedule: 6 | interval: daily 7 | 8 | - package-ecosystem: pip 9 | directory: / 10 | schedule: 11 | interval: daily 12 | 13 | -------------------------------------------------------------------------------- /.github/workflows/ebrains-push.yml: -------------------------------------------------------------------------------- 1 | name: Mirror to EBRAINS 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | 7 | jobs: 8 | sync_to_ebrains: 9 | runs-on: ubuntu-latest 10 | if: ${{ github.repository_owner == 'nest' }} 11 | steps: 12 | - name: sycnmaster 13 | uses: wei/git-sync@v3 14 | with: 15 | source_repo: "nest/nestml" 16 | source_branch: "master" 17 | destination_repo: "https://ghpusher:${{ secrets.EBRAINS_NESTML_GITLAB }}@gitlab.ebrains.eu/nest/nestml.git" 18 | destination_branch: "main" 19 | - name: synctags 20 | uses: wei/git-sync@v3 21 | with: 22 | source_repo: "nest/nestml" 23 | source_branch: "refs/tags/*" 24 | destination_repo: "https://ghpusher:${{ secrets.EBRAINS_NESTML_GITLAB }}@gitlab.ebrains.eu/nest/nestml.git" 25 | destination_branch: "refs/tags/*" 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .settings/ 2 | target/ 3 | .idea/ 4 | .vscode 5 | .mypy_cache/ 6 | .pytest_cache/ 7 | build/ 8 | buildNest/ 9 | venv/ 10 | spinnaker-install/ 11 | spinnaker-target/ 12 | report/ 13 | reports/ 14 | nestml-*/ 15 | *.egg-info 16 | stash/ 17 | 18 | 19 | __* 20 | 21 | dist/ 22 | 23 | PyNESTML.egg-info/ 24 | 25 | *.pyc 26 | 27 | !__init__.py 28 | !*.jinja2 29 | *.jar 30 | venv 31 | 32 | .DS_Store 33 | .project 34 | .classpath 35 | *.gdf 36 | *~ 37 | *.iml 38 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | build: 4 | os: ubuntu-20.04 5 | tools: 6 | python: "3.9" 7 | 8 | sphinx: 9 | configuration: doc/sphinx-apidoc/conf.py 10 | 11 | python: 12 | install: 13 | - requirements: doc/requirements.txt 14 | -------------------------------------------------------------------------------- /doc/extending/Dimitri_Plotnikov_Doctoral_Thesis.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/extending/Dimitri_Plotnikov_Doctoral_Thesis.pdf -------------------------------------------------------------------------------- /doc/extending/Konstantin_Perun_Master_thesis.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/extending/Konstantin_Perun_Master_thesis.pdf -------------------------------------------------------------------------------- /doc/extending/Tammo_Ippen_Master_Thesis.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/extending/Tammo_Ippen_Master_Thesis.pdf -------------------------------------------------------------------------------- /doc/fig/Asymmetric-STDP-learning-window-Spike-timing-window-of-STDP-for-the-induction-of.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/Asymmetric-STDP-learning-window-Spike-timing-window-of-STDP-for-the-induction-of.png -------------------------------------------------------------------------------- /doc/fig/code_gen_opts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/code_gen_opts.png -------------------------------------------------------------------------------- /doc/fig/fncom-04-00141-g003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/fncom-04-00141-g003.jpg -------------------------------------------------------------------------------- /doc/fig/integration_order.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/integration_order.pdf -------------------------------------------------------------------------------- /doc/fig/integration_order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/integration_order.png -------------------------------------------------------------------------------- /doc/fig/integration_order_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/integration_order_example.png -------------------------------------------------------------------------------- /doc/fig/internal_workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/internal_workflow.png -------------------------------------------------------------------------------- /doc/fig/nest-simulator-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/nest-simulator-logo.png -------------------------------------------------------------------------------- /doc/fig/nestml-multisynapse-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/nestml-multisynapse-example.png -------------------------------------------------------------------------------- /doc/fig/nestml_code_render_merged.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/nestml_code_render_merged.png -------------------------------------------------------------------------------- /doc/fig/nestml_code_render_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/nestml_code_render_thumbnail.png -------------------------------------------------------------------------------- /doc/fig/neuron_synapse_co_generation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/neuron_synapse_co_generation.png -------------------------------------------------------------------------------- /doc/fig/performance_ratio_nonVec_vs_vec_compartmental.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/performance_ratio_nonVec_vs_vec_compartmental.png -------------------------------------------------------------------------------- /doc/fig/python-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/python-logo.png -------------------------------------------------------------------------------- /doc/fig/stdp-nearest-neighbour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/stdp-nearest-neighbour.png -------------------------------------------------------------------------------- /doc/fig/stdp_synapse_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/stdp_synapse_test.png -------------------------------------------------------------------------------- /doc/fig/stdp_test_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/stdp_test_window.png -------------------------------------------------------------------------------- /doc/fig/stdp_triplet_synapse_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/fig/stdp_triplet_synapse_test.png -------------------------------------------------------------------------------- /doc/models_library/aeif_cond_exp_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[aeif_cond_exp_neuron_nestml].png 5 | :alt: aeif_cond_exp_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[aeif_cond_exp_neuron_nestml].png 11 | :alt: aeif_cond_exp_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[aeif_cond_exp_neuron_nestml].png 17 | :alt: aeif_cond_exp_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/hh_cond_exp_traub_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[hh_cond_exp_traub_neuron_nestml].png 5 | :alt: hh_cond_exp_traub_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[hh_cond_exp_traub_neuron_nestml].png 11 | :alt: hh_cond_exp_traub_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[hh_cond_exp_traub_neuron_nestml].png 17 | :alt: hh_cond_exp_traub_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/hh_psc_alpha_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[hh_psc_alpha_neuron_nestml].png 5 | :alt: hh_psc_alpha_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[hh_psc_alpha_neuron_nestml].png 11 | :alt: hh_psc_alpha_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[hh_psc_alpha_neuron_nestml].png 17 | :alt: hh_psc_alpha_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/iaf_chxk_2008_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[iaf_chxk_2008_neuron_nestml].png 5 | :alt: iaf_chxk_2008_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[iaf_chxk_2008_neuron_nestml].png 11 | :alt: iaf_chxk_2008_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[iaf_chxk_2008_neuron_nestml].png 17 | :alt: iaf_chxk_2008_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/iaf_cond_alpha_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[iaf_cond_alpha_neuron_nestml].png 5 | :alt: iaf_cond_alpha_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[iaf_cond_alpha_neuron_nestml].png 11 | :alt: iaf_cond_alpha_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[iaf_cond_alpha_neuron_nestml].png 17 | :alt: iaf_cond_alpha_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/iaf_cond_beta_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[iaf_cond_beta_neuron_nestml].png 5 | :alt: iaf_cond_beta_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[iaf_cond_beta_neuron_nestml].png 11 | :alt: iaf_cond_beta_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[iaf_cond_beta_neuron_nestml].png 17 | :alt: iaf_cond_beta_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/iaf_cond_exp_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[iaf_cond_exp_neuron_nestml].png 5 | :alt: iaf_cond_exp_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[iaf_cond_exp_neuron_nestml].png 11 | :alt: iaf_cond_exp_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[iaf_cond_exp_neuron_nestml].png 17 | :alt: iaf_cond_exp_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/iaf_cond_exp_sfa_rr_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[iaf_cond_exp_sfa_rr_neuron_nestml].png 5 | :alt: iaf_cond_exp_sfa_rr_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[iaf_cond_exp_sfa_rr_neuron_nestml].png 11 | :alt: iaf_cond_exp_sfa_rr_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[iaf_cond_exp_sfa_rr_neuron_nestml].png 17 | :alt: iaf_cond_exp_sfa_rr_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/iaf_psc_alpha_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[iaf_psc_alpha_neuron_nestml].png 5 | :alt: iaf_psc_alpha_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[iaf_psc_alpha_neuron_nestml].png 11 | :alt: iaf_psc_alpha_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[iaf_psc_alpha_neuron_nestml].png 17 | :alt: iaf_psc_alpha_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/iaf_psc_delta_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[iaf_psc_delta_neuron_nestml].png 5 | :alt: iaf_psc_delta_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[iaf_psc_delta_neuron_nestml].png 11 | :alt: iaf_psc_delta_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[iaf_psc_delta_neuron_nestml].png 17 | :alt: iaf_psc_delta_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/iaf_psc_exp_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[iaf_psc_exp_neuron_nestml].png 5 | :alt: iaf_psc_exp_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[iaf_psc_exp_neuron_nestml].png 11 | :alt: iaf_psc_exp_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[iaf_psc_exp_neuron_nestml].png 17 | :alt: iaf_psc_exp_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/izhikevich_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[izhikevich_neuron_nestml].png 5 | :alt: izhikevich_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[izhikevich_neuron_nestml].png 11 | :alt: izhikevich_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[izhikevich_neuron_nestml].png 17 | :alt: izhikevich_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/mat2_psc_exp_neuron_characterisation.rst: -------------------------------------------------------------------------------- 1 | Synaptic response 2 | +++++++++++++++++ 3 | 4 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_psp_[mat2_psc_exp_neuron_nestml].png 5 | :alt: mat2_psc_exp_neuron postsynaptic response 6 | 7 | Response to pulse current injection 8 | +++++++++++++++++ 9 | 10 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_current_pulse_response_[mat2_psc_exp_neuron_nestml].png 11 | :alt: mat2_psc_exp_neuron current pulse response 12 | 13 | f-I curve 14 | +++++++++++++++++ 15 | 16 | .. figure:: https://raw.githubusercontent.com/nest/nestml/master/doc/models_library/nestml_fI_curve_[mat2_psc_exp_neuron_nestml].png 17 | :alt: mat2_psc_exp_neuron f-I curve 18 | 19 | -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[aeif_cond_exp_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[aeif_cond_exp_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[aeif_cond_exp_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[aeif_cond_exp_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[hh_cond_exp_traub_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[hh_cond_exp_traub_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[hh_cond_exp_traub_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[hh_cond_exp_traub_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[hh_psc_alpha_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[hh_psc_alpha_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[hh_psc_alpha_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[hh_psc_alpha_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_chxk_2008_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_chxk_2008_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_chxk_2008_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_chxk_2008_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_cond_alpha_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_cond_alpha_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_cond_alpha_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_cond_alpha_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_cond_beta_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_cond_beta_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_cond_beta_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_cond_beta_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_cond_exp_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_cond_exp_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_cond_exp_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_cond_exp_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_cond_exp_sfa_rr_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_cond_exp_sfa_rr_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_cond_exp_sfa_rr_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_cond_exp_sfa_rr_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_psc_alpha_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_psc_alpha_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_psc_alpha_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_psc_alpha_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_psc_delta_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_psc_delta_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_psc_delta_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_psc_delta_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_psc_exp_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_psc_exp_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[iaf_psc_exp_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[iaf_psc_exp_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[izhikevich_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[izhikevich_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[izhikevich_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[izhikevich_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[mat2_psc_exp_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[mat2_psc_exp_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_current_pulse_response_[mat2_psc_exp_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_current_pulse_response_[mat2_psc_exp_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[aeif_cond_exp_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[aeif_cond_exp_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[aeif_cond_exp_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[aeif_cond_exp_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[hh_cond_exp_traub_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[hh_cond_exp_traub_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[hh_cond_exp_traub_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[hh_cond_exp_traub_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[hh_psc_alpha_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[hh_psc_alpha_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[hh_psc_alpha_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[hh_psc_alpha_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_chxk_2008_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_chxk_2008_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_chxk_2008_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_chxk_2008_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_cond_alpha_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_cond_alpha_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_cond_alpha_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_cond_alpha_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_cond_beta_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_cond_beta_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_cond_beta_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_cond_beta_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_cond_exp_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_cond_exp_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_cond_exp_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_cond_exp_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_cond_exp_sfa_rr_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_cond_exp_sfa_rr_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_cond_exp_sfa_rr_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_cond_exp_sfa_rr_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_psc_alpha_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_psc_alpha_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_psc_alpha_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_psc_alpha_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_psc_delta_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_psc_delta_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_psc_delta_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_psc_delta_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_psc_exp_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_psc_exp_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[iaf_psc_exp_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[iaf_psc_exp_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[izhikevich_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[izhikevich_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[izhikevich_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[izhikevich_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[mat2_psc_exp_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[mat2_psc_exp_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_fI_curve_[mat2_psc_exp_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_fI_curve_[mat2_psc_exp_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[aeif_cond_exp_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[aeif_cond_exp_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[aeif_cond_exp_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[aeif_cond_exp_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[hh_cond_exp_traub_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[hh_cond_exp_traub_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[hh_cond_exp_traub_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[hh_cond_exp_traub_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[hh_psc_alpha_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[hh_psc_alpha_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[hh_psc_alpha_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[hh_psc_alpha_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_chxk_2008_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_chxk_2008_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_chxk_2008_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_chxk_2008_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_cond_alpha_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_cond_alpha_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_cond_alpha_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_cond_alpha_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_cond_beta_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_cond_beta_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_cond_beta_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_cond_beta_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_cond_exp_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_cond_exp_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_cond_exp_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_cond_exp_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_cond_exp_sfa_rr_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_cond_exp_sfa_rr_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_cond_exp_sfa_rr_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_cond_exp_sfa_rr_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_psc_alpha_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_psc_alpha_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_psc_alpha_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_psc_alpha_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_psc_delta_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_psc_delta_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_psc_delta_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_psc_delta_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_psc_exp_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_psc_exp_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[iaf_psc_exp_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[iaf_psc_exp_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[izhikevich_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[izhikevich_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[izhikevich_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[izhikevich_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[mat2_psc_exp_neuron_nestml].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[mat2_psc_exp_neuron_nestml].png -------------------------------------------------------------------------------- /doc/models_library/nestml_psp_[mat2_psc_exp_neuron_nestml]_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/models_library/nestml_psp_[mat2_psc_exp_neuron_nestml]_small.png -------------------------------------------------------------------------------- /doc/models_library/noisy_synapse.rst: -------------------------------------------------------------------------------- 1 | noisy_synapse 2 | ############# 3 | 4 | 5 | noisy_synapse - Static synapse with Gaussian noise 6 | 7 | Description 8 | +++++++++++ 9 | 10 | Each presynaptic spike is passed to the postsynaptic partner with a weight sampled as :math:`w + A_\text{noise} \mathcal{N}(0, 1)`. 11 | 12 | 13 | 14 | Parameters 15 | ++++++++++ 16 | 17 | 18 | .. csv-table:: 19 | :header: "Name", "Physical unit", "Default value", "Description" 20 | :widths: auto 21 | 22 | 23 | "w", "real", "1", "Synaptic weight" 24 | "d", "ms", "1ms", "Synaptic transmission delay" 25 | "A_noise", "real", "0.4", "" 26 | Source code 27 | +++++++++++ 28 | 29 | The model source code can be found in the NESTML models repository here: `noisy_synapse `_. 30 | 31 | 32 | .. include:: noisy_synapse_characterisation.rst 33 | 34 | 35 | .. footer:: 36 | 37 | Generated at 2024-05-22 14:51:14.673953 -------------------------------------------------------------------------------- /doc/models_library/static_synapse.rst: -------------------------------------------------------------------------------- 1 | static_synapse 2 | ############## 3 | 4 | 5 | Static synapse 6 | 7 | Description 8 | +++++++++++ 9 | A synapse where the synaptic strength (weight) does not evolve with simulated time, but is defined as a (constant) parameter. 10 | 11 | 12 | 13 | Parameters 14 | ++++++++++ 15 | 16 | 17 | .. csv-table:: 18 | :header: "Name", "Physical unit", "Default value", "Description" 19 | :widths: auto 20 | 21 | 22 | "w", "real", "1", "Synaptic weight" 23 | "d", "ms", "1ms", "Synaptic transmission delay" 24 | Source code 25 | +++++++++++ 26 | 27 | The model source code can be found in the NESTML models repository here: `static_synapse `_. 28 | 29 | 30 | .. include:: static_synapse_characterisation.rst 31 | 32 | 33 | .. footer:: 34 | 35 | Generated at 2024-05-22 14:51:14.678237 -------------------------------------------------------------------------------- /doc/nestml-logo/nestml-logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/nestml-logo/nestml-logo.pdf -------------------------------------------------------------------------------- /doc/nestml-logo/nestml-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/nestml-logo/nestml-logo.png -------------------------------------------------------------------------------- /doc/nestml_language/index.rst: -------------------------------------------------------------------------------- 1 | NESTML language documentation 2 | ============================= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | nestml_language_concepts 8 | neurons_in_nestml 9 | synapses_in_nestml 10 | 11 | NESTML is a domain specific language for the specification of models; typically, the individual neurons and synapses that make up a neural network. NESTML is a completely generic language for hybrid dynamical systems, that is, those that exhibit continuous-time dynamics (such as described by ordinary differential equations) as well as instantaneous events. It is agnostic of the numerical methods used for simulating the model, such as which numerical (ODE) solver is used; this is determined during code generation and will typically depend on which simulation platform is used (for instance, NEST Simulator). 12 | 13 | NESTML has a concise syntax based on that of Python, which avoids clutter in the form of semicolons, curly braces or tags as known from other programming and description languages. NESTML model files are expected to have the filename extension ``.nestml``. Each file may contain one or more models. This means that there is not necessarily a direct correspondence between model and file name; however, this is often done by convention. 14 | -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_AnGen_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_AnGen_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_different_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_different_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_genFiles_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_genFiles_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_overview_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_overview_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_phy_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_phy_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_primTypes_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_primTypes_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_proc_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_proc_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_processor_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_processor_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_solver_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_solver_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_template_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_template_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_toCpp_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_toCpp_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_toJson_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_toJson_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_toNest_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_toNest_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_toScalar_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_toScalar_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_trans_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_trans_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/back_used_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/back_used_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/dsl_archi_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/dsl_archi_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/ext_back_temp_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/ext_back_temp_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/ext_front_astB_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/ext_front_astB_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/ext_front_astVisitor_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/ext_front_astVisitor_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/ext_front_cocos_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/ext_front_cocos_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/ext_front_context_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/ext_front_context_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/ext_front_gram_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/ext_front_gram_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/ext_front_symbolVisitor_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/ext_front_symbolVisitor_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_astclasses_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_astclasses_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_builder_code_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_builder_code_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_cocos_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_cocos_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_cocos_example_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_cocos_example_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_combunits_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_combunits_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_commentCD_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_commentCD_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_comment_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_comment_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_gram2ast_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_gram2ast_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_grammar_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_grammar_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_overview_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_overview_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_parser_overview_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_parser_overview_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_predefined_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_predefined_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_processing_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_processing_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_resolve_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_resolve_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_semantics_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_semantics_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_simple_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_simple_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_symbols_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_symbols_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_symbolsetup_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_symbolsetup_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_transdata_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_transdata_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_transexpr_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_transexpr_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/front_typevisitoroverview_cropped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/front_typevisitoroverview_cropped.jpg -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/mid_higher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/mid_higher.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/mid_higher_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/mid_higher_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/mid_logger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/mid_logger.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/mid_logger_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/mid_logger_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/mid_oldvis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/mid_oldvis.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/mid_oldvis_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/mid_oldvis_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/mid_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/mid_overview.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/mid_overview_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/mid_overview_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/mid_processing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/mid_processing.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/mid_processing_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/mid_processing_cropped.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/mid_trans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/mid_trans.png -------------------------------------------------------------------------------- /doc/pynestml_toolchain/pic/mid_trans_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/pynestml_toolchain/pic/mid_trans_cropped.png -------------------------------------------------------------------------------- /doc/requirements.txt: -------------------------------------------------------------------------------- 1 | ipykernel 2 | nbsphinx 3 | docutils 4 | sphinx>=6 5 | MarkupSafe==3.0.2 6 | readthedocs-sphinx-ext==2.2.0 7 | nbformat==5.10.4 8 | nbsphinx==0.9.1 9 | typing_extensions==4.5.0 10 | sphinx_rtd_theme==2.0.0 11 | nbclient==0.10.0 12 | sphinx-design 13 | 14 | # the following list is a direct copy from requirements.txt in the root directory (requirements for NESTML itself rather than for doc building) 15 | numpy >= 1.8.2 16 | scipy 17 | sympy 18 | antlr4-python3-runtime == 4.13.2 19 | setuptools 20 | Jinja2 >= 2.10 21 | typing;python_version<"3.5" 22 | astropy 23 | odetoolbox >= 2.4 24 | -------------------------------------------------------------------------------- /doc/running/Schmidt_SpiNNaker_NESTML_Masters_thesis_2023.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/doc/running/Schmidt_SpiNNaker_NESTML_Masters_thesis_2023.pdf -------------------------------------------------------------------------------- /doc/running/running_nest_desktop.rst: -------------------------------------------------------------------------------- 1 | NEST Desktop target 2 | ------------------- 3 | 4 | *NESTML features supported:* :doc:`neurons ` 5 | 6 | The aim of the NEST Desktop target is to generate ``json`` files with parameters for models. This data will be used for rendering the parameter values in the NEST Desktop UI when a NESTML model is loaded. 7 | 8 | 9 | Code generation options 10 | ~~~~~~~~~~~~~~~~~~~~~~~ 11 | 12 | Several code generator options are available; for an overview see :class:`pynestml.codegeneration.nest_desktop_code_generator.NESTDesktopCodeGenerator`. 13 | -------------------------------------------------------------------------------- /doc/running/running_pretty_render.rst: -------------------------------------------------------------------------------- 1 | Pretty code rendering 2 | ===================== 3 | 4 | *NESTML features supported:* :doc:`neurons `, :doc:`synapses ` 5 | 6 | Generates "pretty" rendered code for PR purposes. Output format is in HTML + CSS; use any browser to view the generated HTML file(s) and take a screenshot. 7 | 8 | Example renders 9 | --------------- 10 | 11 | Two example files are available: a `neuron model `_ and a `synapse model `_. The rendered output for these models is shown below (merged side-by-side). 12 | 13 | .. figure:: ../fig/nestml_code_render_merged.png 14 | :alt: Rendered image for "pretty" code render 15 | -------------------------------------------------------------------------------- /doc/tutorials/index.rst: -------------------------------------------------------------------------------- 1 | Tutorials 2 | ========= 3 | 4 | .. include:: tutorials_list.rst 5 | 6 | -------------------------------------------------------------------------------- /extras/codeanalysis/copyright_header_template.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # {{file_name}} 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | -------------------------------------------------------------------------------- /extras/syntax-highlighting/KatePart/README.md: -------------------------------------------------------------------------------- 1 | This syntax file is for [KatePart][katepart], which is used in many KDE applications, such as Kate and KDevelop. It can also be used by Pandoc. 2 | 3 | If you modify `nestml-highlight.xml`, you can verify it by running 4 | 5 | ```bash 6 | xmllint --noout --schema language.xsd nestml-highlight.xml 7 | ``` 8 | 9 | For using it with Pandoc you need to give the extra `--syntax-definition` option: 10 | 11 | ```bash 12 | pandoc --standalone --syntax-definition nestml-highlight.xml \ 13 | -f markdown -t revealjs --slide-level=2 \ 14 | Presentation.md -o Presentation.html 15 | ``` 16 | 17 | You can then embed NESTML code with the usual Markdown syntax, e.g.: 18 | 19 | ```markdown 20 | # Section 21 | 22 | ## Slide 23 | 24 | ```nestml 25 | neuron foo: 26 | state: 27 | V_m mV = 0 mV 28 | end 29 | 30 | # ... 31 | end 32 | ``` 33 | 34 | ## Next Slide 35 | 36 | ... 37 | ``` 38 | 39 | [pandoc]: https://pandoc.org 40 | [katepart]: https://docs.kde.org/stable5/en/applications/katepart/highlight.html#kate-highlight-default-styles 41 | -------------------------------------------------------------------------------- /extras/syntax-highlighting/geany/Readme.md: -------------------------------------------------------------------------------- 1 | Syntax highlighting for Geany 2 | ============================= 3 | 4 | The file ``filetypes.NestML.conf`` provides definitions for syntax highlighting with the lightweight IDE [Geany](https://www.geany.org/). 5 | 6 | Use 7 | --- 8 | 9 | Simply copy-paste the file to you local Geany configuration folder. On most Unix platforms, this is in ``~/.config/geany/filedefs/``. 10 | 11 | Limitations 12 | ----------- 13 | 14 | This is just a syntax highlighting scheme which uses the Python lexer, and not a NESTML-specific lexer. As such, it will probably not always work. 15 | However, this should still be a significant improvement over no syntax highlighting ;) 16 | -------------------------------------------------------------------------------- /extras/syntax-highlighting/visual-code/Readme.md: -------------------------------------------------------------------------------- 1 | Syntax highlighting for Visual Studio Code 2 | ========================================== 3 | 4 | The files ``language-configuration.json`` and ``syntaxes/nestml.tmLanguage.json`` provides definitions for syntax highlighting and autoclosure/indentation with [Visual Studio Code](https://code.visualstudio.com/). 5 | 6 | 7 | Installing 8 | ---------- 9 | 10 | Just copy the `nestml` folder into `~/.vscode/extensions` (can be `~/.vscode-oss/extensions` on certain platforms). 11 | 12 | 13 | Testing 14 | ------- 15 | 16 | Open the `nestml` folder in vscode (CTRL + k o), then go to the Debug panel and start `Launch Extension`. 17 | -------------------------------------------------------------------------------- /extras/syntax-highlighting/visual-code/nestml/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Launch Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "runtimeExecutable": "${execPath}", 13 | "args": [ 14 | "--extensionDevelopmentPath=${workspaceFolder}" 15 | ] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /extras/syntax-highlighting/visual-code/nestml/language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | "lineComment": "#" 4 | }, 5 | "brackets": [ 6 | ["{", "}"], 7 | ["[", "]"], 8 | ["(", ")"] 9 | ], 10 | "autoClosingPairs": [ 11 | { "open": "{", "close": "}" }, 12 | { "open": "[", "close": "]" }, 13 | { "open": "(", "close": ")" }, 14 | { "open": "\"", "close": "\"", "notIn": ["string"] } 15 | ], 16 | "surroundingPairs": [ 17 | ["{", "}"], 18 | ["[", "]"], 19 | ["(", ")"], 20 | ["\"", "\""] 21 | ], 22 | "folding": { 23 | "offSide": true, 24 | "markers": { 25 | "start": "^\\s*#\\s*region\\b", 26 | "end": "^\\s*#\\s*endregion\\b" 27 | } 28 | }, 29 | "indentationRules": { 30 | "increaseIndentPattern": "(:)$", 31 | "decreaseIndentPattern": "^\\s*(end)$" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /extras/syntax-highlighting/visual-code/nestml/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nestml", 3 | "displayName": "NESTML", 4 | "description": "A concise modeling language and flexible code generator for spiking neuron and synapse models", 5 | "version": "0.0.1", 6 | "engines": { 7 | "vscode": "^1.35.0" 8 | }, 9 | "categories": [ 10 | "Programming Languages" 11 | ], 12 | "contributes": { 13 | "languages": [{ 14 | "id": "nestml", 15 | "aliases": ["NESTML", "nestml"], 16 | "extensions": [".nestml"], 17 | "configuration": "./language-configuration.json" 18 | }], 19 | "grammars": [{ 20 | "language": "nestml", 21 | "scopeName": "source.nestml", 22 | "path": "./syntaxes/nestml.tmLanguage.json" 23 | }] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /pynestml/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | __version__ = "8.0.1-post-dev" 23 | 24 | __all__ = ['cocos', 25 | 'codegeneration', 26 | 'exceptions', 27 | 'frontend', 28 | 'generated', 29 | 'meta_model', 30 | 'symbols', 31 | 'symbol_table', 32 | 'transformers', 33 | 'utils', 34 | 'visitors'] 35 | -------------------------------------------------------------------------------- /pynestml/codegeneration/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | __all__ = ["autodoc_code_generator", 23 | "builder", 24 | "code_generator", 25 | "nest_assignments_helper", 26 | "nest_builder", 27 | "nest_code_generator", 28 | "nest_declarations_helper", 29 | "nest_tools", 30 | "nest_unit_converter"] 31 | -------------------------------------------------------------------------------- /pynestml/codegeneration/printers/symbol_printer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # symbol_printer.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | import abc 23 | 24 | from pynestml.symbols.symbol import Symbol 25 | 26 | 27 | class SymbolPrinter(metaclass=abc.ABCMeta): 28 | r""" 29 | Returns a string format of ``Symbol``s. 30 | """ 31 | 32 | @classmethod 33 | @abc.abstractmethod 34 | def print(cls, element: Symbol) -> str: 35 | raise Exception("Cannot call abstract method") 36 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_autodoc/autodoc.css: -------------------------------------------------------------------------------- 1 | body { max-width: 40em } 2 | 3 | td { padding: 3px } 4 | th { padding: 3px 3em 3px 3px; font-weight: bold } 5 | .header td { background-color:#ddeeff; padding: 5px !important } 6 | .check_yes {background-color: #00ff33 } 7 | .check_no {background-color: #dd3300 } 8 | tr { margin-bottom: 5px; margin-top: 5px } 9 | tr:nth-child(even) { background: #eee } 10 | tr:nth-child(odd) { background: #fff } 11 | blockquote {padding: 0 !important; margin: 0 !important } 12 | 13 | /* some custom styles for maths formulas to bring them more in line with code snippets */ 14 | 15 | div.formula { padding-left: 4em !important } 16 | .formula { text-align: left !important } 17 | .literal-block { margin-left: 4em !important } 18 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_autodoc/block_decl_table.jinja2: -------------------------------------------------------------------------------- 1 | .. csv-table:: 2 | :header: "Name", "Physical unit", "Default value", "Description" 3 | :widths: auto 4 | 5 | {% macro comments(decl) %} 6 | {%- for pre_comment in decl.pre_comments %} 7 | {%- if pre_comment -%} 8 | {{ pre_comment | trim }} 9 | {%- endif %} 10 | {%- endfor %} 11 | {%- if decl.in_comment -%} 12 | {{ decl.in_comment | trim }} 13 | {%- endif %} 14 | {%- endmacro %} 15 | 16 | {%- for decl in block.get_declarations() %} 17 | {%- for v in decl.get_variables() %} 18 | 19 | {%- set _name = v.get_name() %} 20 | {%- set _type_symbol = v.get_type_symbol().print_symbol() %} {# XXX: can also use decl.get_data_type() #} 21 | {%- set _default = decl.get_expression() %} 22 | "{{ _name }}", "{{ _type_symbol }}", "{{ _default }}", "{{ comments(decl) | replace('\\', '\\\\') | replace('"', '""') | replace('|', '\\|') | indent }}" 23 | {%- endfor %} 24 | {%- endfor %} 25 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_autodoc/docutils.conf: -------------------------------------------------------------------------------- 1 | [parsers] 2 | [restructuredtext parser] 3 | syntax_highlight=short 4 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_autodoc/nestml_models_index.jinja2: -------------------------------------------------------------------------------- 1 | Models library 2 | ============== 3 | 4 | .. 5 | Generated at {{ now }} 6 | 7 | Neurons 8 | ~~~~~~~ 9 | 10 | {%- for neuron in neurons %} 11 | - {{ neuron.get_name() }}`_ 12 | {%- endfor %} 13 | 14 | Synapses 15 | ~~~~~~~~ 16 | 17 | {%- for synapse in synapses %} 18 | - `{{ synapse.get_name() }}`_ 19 | {%- endfor %} 20 | 21 | 22 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_autodoc/nestml_synapse_model.jinja2: -------------------------------------------------------------------------------- 1 | {{ synapseName }} 2 | {% for i in range(synapseName | length) %}#{%- endfor %} 3 | 4 | {{ synapse.print_comment() | trim | replace('"""', '') | replace('#', '') }} 5 | 6 | 7 | Parameters 8 | ++++++++++ 9 | 10 | {% for block in synapse.get_parameters_blocks() %} 11 | {{ block.print_comment() }} 12 | {%- include "block_decl_table.jinja2" %} 13 | {%- endfor %} 14 | 15 | {%- if synapse.get_state_blocks() %} 16 | 17 | 18 | State variables 19 | +++++++++++++++ 20 | 21 | {% for block in synapse.get_state_blocks() %} 22 | {%- include "block_decl_table.jinja2" %} 23 | {%- endfor %} 24 | {%- endif %} 25 | Source code 26 | +++++++++++ 27 | 28 | The model source code can be found in the NESTML models repository here: `{{synapseName}} `_. 29 | 30 | 31 | .. include:: {{synapseName}}_characterisation.rst 32 | 33 | 34 | .. footer:: 35 | 36 | Generated at {{ now }} 37 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/@NEURON_NAME@.cpp.jinja2: -------------------------------------------------------------------------------- 1 | {#- 2 | @NEURON_NAME@.cpp.jinja2 3 | 4 | This file is part of NEST. 5 | 6 | Copyright (C) 2004 The NEST Initiative 7 | 8 | NEST is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | NEST is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with NEST. If not, see . 20 | #} 21 | {%- include "common/NeuronClass.jinja2" %} 22 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/@NEURON_NAME@.h.jinja2: -------------------------------------------------------------------------------- 1 | {#- 2 | @NEURON_NAME@.h.jinja2 3 | 4 | This file is part of NEST. 5 | 6 | Copyright (C) 2004 The NEST Initiative 7 | 8 | NEST is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | NEST is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with NEST. If not, see . 20 | #} 21 | {%- include "common/NeuronHeader.jinja2" %} 22 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/@SYNAPSE_NAME@.h.jinja2: -------------------------------------------------------------------------------- 1 | {#- 2 | @SYNAPSE_NAME@.h.jinja2 3 | 4 | This file is part of NEST. 5 | 6 | Copyright (C) 2004 The NEST Initiative 7 | 8 | NEST is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | NEST is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with NEST. If not, see . 20 | #} 21 | {%- include "common/SynapseHeader.h.jinja2" %} 22 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | # --------------------------------------------------------------- 23 | # Caution: This file is required to enable Python to also include the templates 24 | # --------------------------------------------------------------- 25 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/AnalyticIntegrationStep_begin.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates a series of C++ statements which perform one integration step of all ODEs that are solved by the analytic integrator. 3 | #} 4 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 5 | {%- if uses_analytic_solver %} 6 | {%- for variable_name in analytic_state_variables_ %} 7 | {%- set update_expr = update_expressions[variable_name] %} 8 | {%- set var_ast = utils.get_variable_by_name(astnode, variable_name)%} 9 | {%- set var_symbol = var_ast.get_scope().resolve_to_symbol(variable_name, SymbolKind.VARIABLE)%} 10 | {%- if use_gap_junctions %} 11 | const {{ type_symbol_printer.print(var_symbol.type_symbol) }} {{variable_name}}__tmp = {{ printer.print(update_expr) | replace("B_." + gap_junction_port + "_grid_sum_", "(B_." + gap_junction_port + "_grid_sum_ + __I_gap)") }}; 12 | {%- else %} 13 | const {{ type_symbol_printer.print(var_symbol.type_symbol) }} {{variable_name}}__tmp = {{ printer.print(update_expr) }}; 14 | {%- endif %} 15 | {%- endfor %} 16 | {%- endif %} 17 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/AnalyticIntegrationStep_end.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates a series of C++ statements which perform one integration step of all ODEs that are solved by the analytic integrator. 3 | #} 4 | /* replace analytically solvable variables with precisely integrated values */ 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | {%- if uses_analytic_solver %} 7 | {%- for variable_name in analytic_state_variables_: %} 8 | {%- set variable_symbol = variable_symbols[variable_name] %} 9 | {{ printer.print(utils.get_state_variable_by_name(astnode, variable_symbol.get_symbol_name())) }} = {{ variable_name }}__tmp; 10 | {%- endfor %} 11 | {%- endif %} 12 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/ApplySpikesFromBuffers.jinja2: -------------------------------------------------------------------------------- 1 | {% if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 2 | {%- for spike_updates_for_port in spike_updates.values() %} 3 | {%- for ast in spike_updates_for_port -%} 4 | {%- include "directives_cpp/Assignment.jinja2" %} 5 | {%- endfor %} 6 | {%- endfor %} 7 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/AssignTmpDictionaryValue.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Assigns a tmp value which was read from the dictionary to the corresponding block variable. 3 | 4 | @param variable VariableSymbol 5 | @result C++ Block 6 | #} 7 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 8 | {%- if not variable_symbol.is_inline_expression %} 9 | set_{{ printer_no_origin.print(variable) }}(tmp_{{ printer_no_origin.print(variable) }}); 10 | {%- endif %} 11 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/Assignment.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates C++ declaration 3 | @grammar: Assignment = variableName:QualifiedName "=" Expr; 4 | @param ast ASTAssignment 5 | #} 6 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 7 | {{ printer.print(ast.get_variable()) }} {{ assignments.print_assignments_operation(ast) }} {{ printer.print(ast.get_expression()) }}; 8 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/BufferDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | {%- macro BufferDeclaration(node) -%} 2 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 3 | {%- if node.has_vector_parameter() %} 4 | std::vector< {{ type_symbol_printer.print(node.get_type_symbol()) }} > 5 | {%- else %} 6 | {{ type_symbol_printer.print(node.get_type_symbol()) }} 7 | {%- endif %} 8 | {{ node.get_symbol_name() }}; //!< Buffer for input (type: {{ node.get_type_symbol().get_symbol_name() }}) 9 | {%- endmacro -%} 10 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/BufferDeclarationValue.jinja2: -------------------------------------------------------------------------------- 1 | {%- macro BufferDeclarationValue(node) -%} 2 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 3 | {%- if node.has_vector_parameter() %} 4 | std::vector {{ node.name }}_grid_sum_; 5 | std::vector {{ node.name }}_spike_input_received_grid_sum_; 6 | {%- else %} 7 | double {{ node.name }}_grid_sum_; 8 | {%- endif %} 9 | {%- endmacro -%} 10 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/BufferInitialization.jinja2: -------------------------------------------------------------------------------- 1 | {%- macro BufferInitialization(node) -%} 2 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 3 | get_{{ node.get_symbol_name() }}().clear(); 4 | B_.{{ node.get_symbol_name() }}_grid_sum_ = 0; 5 | {%- endmacro -%} 6 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/CommonPropertiesDictionaryReader.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | In general case creates an 3 | @param variable VariableSymbol Variable for which the initialization should be done 4 | #} 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | {%- if variable_symbol.has_vector_parameter() %} 7 | {{ raise('Vector parameters not supported in common properties dictionary.') }} 8 | {%- endif %} 9 | updateValue< {{ declarations.print_variable_type(variable_symbol) }} >(d, nest::{{ synapseName }}_names::_{{ printer_no_origin.print(variable) }}, this->{{ printer_no_origin.print(variable) }} ); 10 | 11 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/CommonPropertiesDictionaryWriter.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | In general case creates an 3 | @param variable VariableSymbol Variable for which the initialization should be done 4 | #} 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | {%- if variable_symbol.has_vector_parameter() %} 7 | {{ raise('Vector parameters not supported in common properties dictionary.') }} 8 | {%- endif %} 9 | def< {{ declarations.print_variable_type(variable_symbol) }} >(d, nest::{{ synapseName }}_names::_{{ printer_no_origin.print(variable) }}, this->{{ printer_no_origin.print(variable) }} ); 10 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/CompoundStatement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Handles the compound statement. 3 | @grammar: Compound_Stmt = IF_Stmt | FOR_Stmt | WHILE_Stmt; 4 | #} 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | {%- if stmt.is_if_stmt() %} 7 | {%- with ast = stmt.get_if_stmt() %} 8 | {%- include "directives_cpp/IfStatement.jinja2" %} 9 | {%- endwith %} 10 | {%- elif stmt.is_for_stmt() %} 11 | {%- with ast = stmt.get_for_stmt() %} 12 | {%- include "directives_cpp/ForStatement.jinja2" %} 13 | {%- endwith %} 14 | {%- elif stmt.is_while_stmt() %} 15 | {%- with ast = stmt.get_while_stmt() %} 16 | {%- include "directives_cpp/WhileStatement.jinja2" %} 17 | {%- endwith %} 18 | {%- endif %} 19 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/ContinuousInputBufferGetter.jinja2: -------------------------------------------------------------------------------- 1 | {%- macro ContinuousInputBufferGetter(node, is_in_struct) -%} 2 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 3 | inline {% if node.has_vector_parameter() %}std::vector< {{ type_symbol_printer.print(node.get_type_symbol()) }} >&{%- else %}{{ type_symbol_printer.print(node.get_type_symbol()) }}&{%- endif %} get_{{ node.get_symbol_name() }}() { 4 | {%- if is_in_struct %} 5 | return {{ node.get_symbol_name() }}; 6 | {%- else %} 7 | return B_.get_{{ node.get_symbol_name() }}(); 8 | {%- endif %} 9 | } 10 | {%- endmacro -%} 11 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/Declaration.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates C++ declaration 3 | @param ast ASTDeclaration 4 | #} 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | {%- for variable in declarations.get_variables(ast) %} 7 | {%- if ast.has_size_parameter() %} 8 | {{declarations.print_variable_type(variable)}} {{variable.get_symbol_name()}}(P_.{{declarations.print_size_parameter(ast)}}); 9 | {%- if ast.has_expression() %} 10 | for (long i=0; i < get_{{declarations.print_size_parameter(ast)}}(); i++) { 11 | {{variable.get_symbol_name()}}[i] = {{printer.print(ast.getExpr())}}; 12 | } 13 | {%- endif %} 14 | {%- else %} 15 | {%- if ast.has_expression() %} 16 | {{declarations.print_variable_type(variable)}} {{variable.get_symbol_name()}} = {{printer.print(ast.get_expression())}}; 17 | {%- else %} 18 | {{declarations.print_variable_type(variable)}} {{variable.get_symbol_name()}}; 19 | {%- endif %} 20 | {%- endif %} 21 | {%- endfor -%} 22 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/DelayVariablesDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates C++ declaration of vector for variables with delay 3 | @param variable VariableSymbol 4 | @result C++ declaration 5 | #} 6 | size_t delay_{{variable.get_symbol_name()}}_steps; 7 | std::vector< double > delayed_{{variable.get_symbol_name()}}; 8 | size_t delayed_{{variable.get_symbol_name()}}_idx; 9 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/DelayVariablesInitialization.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates C++ initialization of variables related to delay variables 3 | @param variable VariableSymbol 4 | @result C++ declaration 5 | #} 6 | DV_.delayed_{{ variable.get_symbol_name() }}_idx = 0; 7 | DV_.delay_{{ variable.get_symbol_name() }}_steps = nest::Time::delay_ms_to_steps( {{ declarations.print_delay_parameter(variable) }} ) + 1; 8 | DV_.delayed_{{ variable.get_symbol_name() }}.resize( DV_.delay_{{ variable.get_symbol_name() }}_steps ); 9 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/ForStatement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates C++ statements that implement for loop 3 | @param ast ASTForStmt 4 | #} 5 | {%- if tracing %}/* generated by {{ self._TemplateReference__context.name }} */ {% endif %} 6 | for ( {{ ast.get_variable() }} = {{ printer.print(ast.get_start_from()) }}; 7 | {{ ast.get_variable() }} 8 | {%- if ast.get_step() < 0 -%} 9 | > 10 | {%- elif ast.get_step() > 0 -%} 11 | < 12 | {%- else -%} 13 | != 14 | {%- endif -%} {{ printer.print(ast.get_end_at()) }}; 15 | {{ ast.get_variable() }} += {{ ast.get_step() }} ) 16 | { 17 | {%- filter indent(2) %} 18 | {%- with ast = ast.get_stmts_body() %} 19 | {%- include "directives_cpp/StmtsBody.jinja2" %} 20 | {%- endwith %} 21 | {%- endfilter %} 22 | } 23 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/FunctionCall.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates C++ function call 3 | @param ast ASTFunctionCall 4 | #} 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | {%- if ast.get_name() == PredefinedFunctions.INTEGRATE_ODES %} 7 | {%- include "directives_cpp/PredefinedFunction_integrate_odes.jinja2" %} 8 | {%- elif ast.get_name() == PredefinedFunctions.EMIT_SPIKE %} 9 | {%- include "directives_cpp/PredefinedFunction_emit_spike.jinja2" %} 10 | {%- else %} 11 | {# call to a non-predefined function #} 12 | {{ printer.print(ast) }}; 13 | {%- endif %} 14 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/FunctionDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | {%- macro FunctionDeclaration(ast_function, namespace_prefix) -%} 2 | {%- with function_symbol = ast_function.get_scope().resolve_to_symbol(ast_function.get_name(), SymbolKind.FUNCTION) -%} 3 | {%- if function_symbol is none -%} 4 | {{ raise('Cannot resolve the method ' + ast_function.get_name()) }} 5 | {%- endif %} 6 | {{ ast_function.print_comment('//') }} 7 | {{ type_symbol_printer.print(function_symbol.get_return_type()) | replace('.', '::') }} {{ namespace_prefix }}{{ ast_function.get_name() }} ( 8 | {%- for param in ast_function.get_parameters() %} 9 | {%- with typeSym = param.get_data_type().get_type_symbol() -%} 10 | {%- filter indent(1, True) -%} 11 | {{ type_symbol_printer.print(typeSym) }} {{ param.get_name() }} 12 | {%- if not loop.last -%} 13 | , 14 | {%- endif -%} 15 | {%- endfilter -%} 16 | {%- endwith -%} 17 | {%- endfor -%} 18 | ) const 19 | {%- endwith -%} 20 | {%- endmacro -%} -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/IfStatement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates C++ if..then..else statement 3 | @param ast ASTIfStmt 4 | #} 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | if ({{ printer.print(ast.get_if_clause().get_condition()) }}) 7 | { 8 | {%- filter indent(2, True) %} 9 | {%- with ast = ast.get_if_clause().get_stmts_body() %} 10 | {%- include "directives_cpp/StmtsBody.jinja2" %} 11 | {%- endwith %} 12 | {%- endfilter %} 13 | {%- for elif in ast.get_elif_clauses() %} 14 | } 15 | else if ({{ printer.print(elif.get_condition()) }}) 16 | { 17 | {%- filter indent(2, True) %} 18 | {%- with ast = elif.get_stmts_body() %} 19 | {%- include "directives_cpp/StmtsBody.jinja2" %} 20 | {%- endwith %} 21 | {%- endfilter %} 22 | {%- endfor %} 23 | {%- if ast.has_else_clause() %} 24 | } 25 | else 26 | { 27 | {%- filter indent(2, True) %} 28 | {%- with ast = ast.get_else_clause().get_stmts_body() %} 29 | {%- include "directives_cpp/StmtsBody.jinja2" %} 30 | {%- endwith %} 31 | {%- endfilter %} 32 | {%- endif %} 33 | } 34 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/MemberDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates C++ declaration for a variable 3 | @param variable VariableSymbol 4 | @result C++ declaration 5 | #} 6 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 7 | {%- if variable_symbol.has_comment() %} 8 | {{ variable_symbol.print_comment("//! ") }} 9 | {%- endif %} 10 | {{ declarations.print_variable_type(variable_symbol) }} {{ printer_no_origin.print(variable) }}; 11 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/MemberInitialization.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | In general case creates an 3 | @param variable ASTVariable Variable for which the initialization should be done 4 | #} 5 | {%- import 'directives_cpp/VectorDeclaration.jinja2' as vector_declaration with context %} 6 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif -%} 7 | {%- set sym = variable.get_scope().resolve_to_symbol(variable.get_complete_name(), SymbolKind.VARIABLE) %} 8 | {%- if sym.has_declaring_expression() and not sym.is_kernel() %} 9 | {%- if sym.has_vector_parameter() %} 10 | {{ vector_declaration.VectorDeclaration(variable) }} 11 | {%- else %} 12 | {{printer.print(variable)}} = {{printer.print(sym.get_declaring_expression())}}; // as {{sym.get_type_symbol().print_symbol()}} 13 | {%- endif %} 14 | {%- else %} 15 | {%- if sym.has_vector_parameter() %} 16 | {{printer.print(variable)}}.resize(0); // as {{sym.get_type_symbol().print_symbol()}} 17 | {%- else %} 18 | {{printer.print(variable)}} = 0; // as {{sym.get_type_symbol().print_symbol()}} 19 | {%- endif %} 20 | {%- endif %} 21 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/MemberVariableGetterSetter.jinja2: -------------------------------------------------------------------------------- 1 | {% if variable_symbol.is_inline_expression and not utils.contains_convolve_call(variable_symbol) -%} 2 | inline {{ declarations.print_variable_type(variable_symbol) }} {{ printer_no_origin.print(variable) }} const 3 | { 4 | return {{ printer.print(variable_symbol.get_declaring_expression()) }}; 5 | } 6 | {%- else -%} 7 | inline {{ declarations.print_variable_type(variable_symbol) }} get_{{ printer_no_origin.print(variable) }}() const 8 | { 9 | return {{ nest_codegen_utils.print_symbol_origin(variable_symbol, variable) % printer_no_origin.print(variable) }}; 10 | } 11 | 12 | inline void set_{{ printer_no_origin.print(variable) }}(const {{ declarations.print_variable_type(variable_symbol) }} __v) 13 | { 14 | {{ nest_codegen_utils.print_symbol_origin(variable_symbol, variable) % printer_no_origin.print(variable) }} = __v; 15 | } 16 | {%- endif %} 17 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/OutputEvent.jinja2: -------------------------------------------------------------------------------- 1 | {%- macro OutputEvent(node) -%} 2 | {%- with outputs = neuron.get_body().get_output_blocks() -%} 3 | {%- if outputs|length == 0 -%} 4 | {#- no output port defined in the model: pretend dummy spike output port to obtain usable model -#} 5 | nest::SpikeEvent 6 | {%- elif outputs|length == 1 -%} 7 | {%- with output = outputs[0] -%} 8 | {%- if output.is_spike() -%} 9 | nest::SpikeEvent 10 | {%- elif output.is_continuous() -%} 11 | nest::CurrentEvent 12 | {%- else -%} 13 | {{ raise('Unexpected output type. Must be continuous or spike, is %s.' % output) }} 14 | {%- endif -%} 15 | {%- endwith -%} 16 | {%- endif -%} 17 | {%- endwith -%} 18 | {%- endmacro -%} -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/ReturnStatement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates a single return statement in C++ syntax. 3 | @param: ast A single ast-return stmt object. ASTReturnStmt 4 | #} 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | {%- if ast.has_expression() %} 7 | return {{ printer.print(ast.get_expression()) }}; 8 | {%- else %} 9 | return; 10 | {%- endif %} 11 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/RportToBufferIndexEntry.jinja2: -------------------------------------------------------------------------------- 1 | {%- macro RportToBufferIndexEntry(ports, rport, index=-1) -%} 2 | {%- if index >= 0 -%} 3 | {%- set name = "{}_" ~ index|string %} 4 | {%- else -%} 5 | {%- set name = "{}" %} 6 | {%- endif -%} 7 | 8 | {%- if ports|length > 1 -%} 9 | {%- if ports[0].is_excitatory() %} 10 | {%- set exc_port = ports[0] %} 11 | {%- set inh_port = ports[1] %} 12 | {%- else %} 13 | {%- set exc_port = ports[1] %} 14 | {%- set inh_port = ports[0] %} 15 | {%- endif %} 16 | { {{neuronName}}::{{ name.format(exc_port.get_symbol_name().upper()) }}, {{neuronName}}::{{ name.format(inh_port.get_symbol_name().upper()) }} }, 17 | {%- else -%} 18 | { {{neuronName}}::{{ name.format(ports[0].get_symbol_name().upper()) }}, {{neuronName}}::PORT_NOT_AVAILABLE }, 19 | {%- endif -%} 20 | {%- endmacro -%} 21 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/SmallStatement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates a single small statement into equivalent C++ syntax. 3 | @param stmt ASTSmallStmt 4 | #} 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | {%- if stmt.is_assignment() %} 7 | {%- with ast = stmt.get_assignment() %} 8 | {%- include "directives_cpp/Assignment.jinja2" %} 9 | {%- endwith %} 10 | {%- elif stmt.is_function_call() %} 11 | {%- with ast = stmt.get_function_call() %} 12 | {%- include "directives_cpp/FunctionCall.jinja2" %} 13 | {%- endwith %} 14 | {%- elif stmt.is_declaration() %} 15 | {%- with ast = stmt.get_declaration() %} 16 | {%- include "directives_cpp/Declaration.jinja2" %} 17 | {%- endwith %} 18 | {%- elif stmt.is_return_stmt() %} 19 | {%- with ast = stmt.get_return_stmt() %} 20 | {%- include "directives_cpp/ReturnStatement.jinja2" %} 21 | {%- endwith %} 22 | {%- endif %} 23 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/SpikeBufferGetter.jinja2: -------------------------------------------------------------------------------- 1 | {%- macro SpikeBufferGetter(is_in_struct) -%} 2 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 3 | 4 | {% set _tuples = [ 5 | ("nest::RingBuffer", "spike_inputs_", "Buffer containing the incoming spikes"), 6 | ("double", "spike_inputs_grid_sum_", "Buffer containing the sum of all the incoming spikes"), 7 | ("nest::RingBuffer", "spike_input_received_", "Buffer containing a flag whether incoming spikes have been received on a given port"), 8 | ("double", "spike_input_received_grid_sum_", "Buffer containing a flag whether incoming spikes have been received on a given port") 9 | ] %} 10 | 11 | {%- for data_type, variable_name, comment_string in _tuples %} 12 | 13 | /** 14 | * {{ comment_string }} 15 | **/ 16 | inline std::vector< {{data_type}} >& get_{{variable_name}}() 17 | { 18 | {%- if is_in_struct %} 19 | return {{variable_name}}; 20 | {%- else %} 21 | return B_.get_{{variable_name}}(); 22 | {%- endif %} 23 | } 24 | {%- if is_in_struct %} 25 | std::vector< {{data_type}} > {{variable_name}}; 26 | {%- endif %} 27 | {%- endfor %} 28 | 29 | {%- endmacro -%} 30 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/StateVariablesEnum.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates an Enum with state variables that are recordable when the neuron model uses vectors 3 | @param neuron ASTModel: the neuron model 4 | -#} 5 | 6 | enum StateVecVars { 7 | {%- set ns = namespace(count=0) %} 8 | {%- for variable in neuron.get_state_symbols() %} 9 | {%- set varDomain = declarations.get_domain_from_type(variable.get_type_symbol()) %} 10 | {%- if varDomain == "double" and variable.is_recordable %} 11 | {{ printer_no_origin.print(utils.get_state_variable_by_name(astnode, variable.get_symbol_name())).upper() }} = {{ ns.count }}, 12 | {%- if variable.has_vector_parameter() %} 13 | {%- set size = utils.get_numeric_vector_size(variable) %} 14 | {%- set ns.count = ns.count + size %} 15 | {%- else %} 16 | {%- set ns.count = ns.count + 1 %} 17 | {%- endif %} 18 | {%- endif %} 19 | {%- endfor %} 20 | }; 21 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/Statement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates a single statement, either a simple or compound, to equivalent C++ syntax. 3 | @param ast ASTSmallStmt or ASTCompoundStmt 4 | #} 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | {%- if stmt.has_comment() %} 7 | {{stmt.print_comment('//')}}{%- endif %} 8 | {%- if stmt.is_small_stmt() %} 9 | {%- with stmt = stmt.small_stmt %} 10 | {%- include "directives_cpp/SmallStatement.jinja2" %} 11 | {%- endwith %} 12 | {%- elif stmt.is_compound_stmt() %} 13 | {%- with stmt = stmt.compound_stmt %} 14 | {%- include "directives_cpp/CompoundStatement.jinja2" %} 15 | {%- endwith %} 16 | {%- endif %} 17 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/StmtsBody.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Handles an ASTStmtsBody 3 | #} 4 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 5 | {%- for statement in ast.get_stmts() %} 6 | {%- with stmt = statement %} 7 | {%- include "directives_cpp/Statement.jinja2" %} 8 | {%- endwith %} 9 | {%- endfor %} 10 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/UpdateDelayVariables.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates C++ statements that update the delay variables 3 | @param variable VariableSymbol 4 | #} 5 | DV_.delayed_{{ variable_symbol.get_symbol_name() }} [DV_.delayed_{{ variable_symbol.get_symbol_name() }}_idx] = {{ nest_codegen_utils.print_symbol_origin(variable_symbol, variable) % printer_no_origin.print(variable) }}; 6 | DV_.delayed_{{ variable_symbol.get_symbol_name() }}_idx = (DV_.delayed_{{ variable_symbol.get_symbol_name() }}_idx + 1) % DV_.delay_{{ variable_symbol.get_symbol_name() }}_steps; 7 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/VectorDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | {%- import "directives_cpp/VectorSizeParameter.jinja2" as vector_size_parameter with context %} 2 | {%- macro VectorDeclaration(node) -%} 3 | 4 | {{ nest_codegen_utils.print_symbol_origin(variable_symbol, variable) % variable_symbol.get_symbol_name() }}.resize({{ vector_size_parameter.VectorSizeParameter(variable, true) }}, {{ printer.print(variable_symbol.get_declaring_expression()) }}); 5 | {%- endmacro -%} 6 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/VectorSizeParameter.jinja2: -------------------------------------------------------------------------------- 1 | {%- macro VectorSizeParameter(node, with_origin) -%} 2 | {%- set vector_parameter = node.get_vector_parameter() -%} 3 | {%- if vector_parameter.is_variable() -%} 4 | {%- set symbol = vector_parameter.get_scope().resolve_to_symbol(vector_parameter.get_variable().get_complete_name(), SymbolKind.VARIABLE) -%} 5 | {%- if with_origin %} 6 | {{ nest_codegen_utils.print_symbol_origin(symbol, vector_parameter.get_variable()) % vector_parameter.get_variable().get_complete_name() }} 7 | {%- else -%} 8 | {{ vector_parameter.get_variable().get_complete_name() }} 9 | {%- endif -%} 10 | {%- elif vector_parameter.is_numeric_literal() -%} 11 | {{ vector_parameter.get_numeric_literal() }} 12 | {%- endif -%} 13 | {%- endmacro -%} 14 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/WhileStatement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates C++ declaration 3 | @param ast ASTWhileStmt 4 | #} 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | while ( {{ printer.print(ast.get_condition()) }}) 7 | { 8 | {%- filter indent(2) %} 9 | {%- with ast = ast.get_stmts_body() %} 10 | {%- include "directives_cpp/StmtsBody.jinja2" %} 11 | {%- endwith %} 12 | {%- endfilter %} 13 | } 14 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/WriteInDictionary.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates an instruction to write a value into the dictionary of registered variables. 3 | @param variable VariableSymbol 4 | #} 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | {%- if not variable_symbol.is_internals() %} 7 | def< {{declarations.print_variable_type(variable_symbol)}} >(__d, nest::{{names_namespace}}::_{{variable_symbol.get_symbol_name()}}, get_{{printer_no_origin.print(variable)}}()); 8 | {%- endif %} 9 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/directives_cpp/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | # --------------------------------------------------------------- 23 | # Caution: This file is required to enable Python to also include the templates 24 | # --------------------------------------------------------------- 25 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/setup/@MODULE_NAME@.h.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | * @MODULE_NAME@.h.jinja2 3 | * 4 | * This file is part of NEST. 5 | * 6 | * Copyright (C) 2004 The NEST Initiative 7 | * 8 | * NEST is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * NEST is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with NEST. If not, see . 20 | * 21 | #} 22 | {%- if nest_version.startswith("v2") or nest_version.startswith("v3.0") or nest_version.startswith("v3.1") or nest_version.startswith("v3.2") 23 | or nest_version.startswith("v3.3") or nest_version.startswith("v3.4") or nest_version.startswith("v3.5") or nest_version.startswith("v3.6") %} 24 | {%- include "common/ModuleHeader.jinja2" %} 25 | {%- endif %} 26 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest/point_neuron/setup/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | # --------------------------------------------------------------- 23 | # Caution: This file is required to enable Python to also include the templates 24 | # --------------------------------------------------------------- 25 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest_compartmental/cm_neuron/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | # --------------------------------------------------------------- 23 | # Caution: This file is required to enable Python to also include the templates 24 | # --------------------------------------------------------------- 25 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest_compartmental/cm_neuron/directives_cpp: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest_compartmental/cm_neuron/setup/@MODULE_NAME@.h.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | * @MODULE_NAME@.h.jinja2 3 | * 4 | * This file is part of NEST. 5 | * 6 | * Copyright (C) 2004 The NEST Initiative 7 | * 8 | * NEST is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * NEST is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with NEST. If not, see . 20 | * 21 | #} 22 | {%- if nest_version.startswith("v2") or nest_version.startswith("v3.0") or nest_version.startswith("v3.1") or nest_version.startswith("v3.2") 23 | or nest_version.startswith("v3.3") or nest_version.startswith("v3.4") or nest_version.startswith("v3.5") or nest_version.startswith("v3.6") %} 24 | {%- include "common/ModuleHeader.jinja2" %} 25 | {%- endif %} 26 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest_compartmental/cm_neuron/setup/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | # --------------------------------------------------------------- 23 | # Caution: This file is required to enable Python to also include the templates 24 | # --------------------------------------------------------------- 25 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest_desktop/@NEURON_NAME@.json.jinja2: -------------------------------------------------------------------------------- 1 | { 2 | "id": "{{neuronName}}", 3 | "elementType": "neuron", 4 | "label": "{{neuronName}}", 5 | "recordables": [ 6 | {%- set vars = state %} 7 | {%- set symbols = neuron.get_state_symbols() %} 8 | {%- include "VariableDeclaration.jinja2" %} 9 | ], 10 | "params": [ 11 | {%- set vars = parameters %} 12 | {%- set symbols = neuron.get_parameter_symbols() %} 13 | {%- include "VariableDeclaration.jinja2" %} 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_nest_desktop/VariableDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | {%- for variable in symbols %} 2 | {%- set name = variable.get_symbol_name() %} 3 | {%- set type_symbol = variable.get_type_symbol().print_symbol() %} 4 | {%- set default_value = vars[variable.get_symbol_name()] %} 5 | {%- set last = loop.last %} 6 | { 7 | "id": "{{name}}", 8 | "label": "{{variable.print_comment().strip()}}", 9 | "unit": "{{type_symbol}}", 10 | "value": "{{default_value}}" 11 | }{%- if not last %},{%- endif %} 12 | {%- endfor %} 13 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/directives/AnalyticIntegrationStep_end.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates a series of C++ statements which perform one integration step of all ODEs that are solved by the analytic integrator. 3 | #} 4 | # replace analytically solvable variables with precisely integrated values 5 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}} {% endif %} 6 | {%- if uses_analytic_solver %} 7 | {%- for variable_name in analytic_state_variables_: %} 8 | {%- set variable_symbol = variable_symbols[variable_name] %} 9 | {%- set variable = utils.get_variable_by_name(astnode, variable_name) %} 10 | {{ python_codegen_utils.print_symbol_origin(variable_symbol, variable) }}{{ printer.print(variable) }} = {{ variable_name }}__tmp 11 | {%- endfor %} 12 | {%- endif %} 13 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/AnalyticIntegrationStep_begin.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates a series of statements which perform one integration step of all ODEs that are solved by the analytic integrator. 3 | #} 4 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 5 | {%- if uses_analytic_solver %} 6 | {%- for variable_name in analytic_state_variables_: %} 7 | {%- set update_expr = update_expressions[variable_name] %} 8 | {{variable_name}}__tmp: float = {{ printer.print(update_expr) }} 9 | {%- endfor %} 10 | {%- endif %} 11 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/AnalyticIntegrationStep_end.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates a series of C++ statements which perform one integration step of all ODEs that are solved by the analytic integrator. 3 | #} 4 | # replace analytically solvable variables with precisely integrated values 5 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}} {% endif %} 6 | {%- if uses_analytic_solver %} 7 | {%- for variable_name in analytic_state_variables_: %} 8 | {%- set variable_symbol = variable_symbols[variable_name] %} 9 | {%- set variable = utils.get_variable_by_name(astnode, variable_symbol.get_symbol_name()) %} 10 | {{ printer.print(variable) }} = {{ variable_name }}__tmp 11 | {%- endfor %} 12 | {%- endif %} 13 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/ApplySpikesFromBuffers.jinja2: -------------------------------------------------------------------------------- 1 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 2 | {%- for spike_updates_for_port in spike_updates.values() %} 3 | {%- for ast in spike_updates_for_port -%} 4 | {%- include "directives_py/Assignment.jinja2" %} 5 | {%- endfor %} 6 | {%- endfor %} 7 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/CompoundStatement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Handles the compound statement. 3 | @grammar: Compound_Stmt = IF_Stmt | FOR_Stmt | WHILE_Stmt; 4 | #} 5 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 6 | {%- if stmt.is_if_stmt() %} 7 | {%- with ast = stmt.get_if_stmt() %} 8 | {%- include "directives_py/IfStatement.jinja2" %} 9 | {%- endwith %} 10 | {%- elif stmt.is_for_stmt() %} 11 | {%- with ast = stmt.get_for_stmt() %} 12 | {%- include "directives_py/ForStatement.jinja2" %} 13 | {%- endwith %} 14 | {%- elif stmt.is_while_stmt() %} 15 | {%- with ast = stmt.get_while_stmt() %} 16 | {%- include "directives_py/WhileStatement.jinja2" %} 17 | {%- endwith %} 18 | {%- endif %} 19 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/Declaration.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates Python declaration 3 | @param ast ASTDeclaration 4 | #} 5 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 6 | {%- for variable in declarations.get_variables(ast) %} 7 | {%- if ast.has_size_parameter() %} 8 | {{variable.get_symbol_name()}}: Sequence[{{declarations.print_variable_type(variable)}}] = P_.{{declarations.print_size_parameter(ast)}} * [None] 9 | {%- if ast.has_expression() %} 10 | for i in range(0, get_{{declarations.print_size_parameter(ast)}}()): 11 | {{variable.get_symbol_name()}}[i] = {{printer.print(ast.getExpr())}} 12 | {%- endif %} 13 | {%- else %} 14 | {%- if ast.has_expression() %} 15 | {{variable.get_symbol_name()}}: {{declarations.print_variable_type(variable)}} = {{printer.print(ast.get_expression())}} 16 | {%- else %} 17 | {{variable.get_symbol_name()}}: {{declarations.print_variable_type(variable)}} 18 | {%- endif %} 19 | {%- endif %} 20 | {%- endfor -%} 21 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/ForStatement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates C++ statements that implement for loop 3 | @param ast ASTForStmt 4 | #} 5 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 6 | for {{ ast.get_variable() }} in range({{ printer.print(ast.get_start_from()) }}, 7 | {{ printer.print(ast.get_end_at()) }}): 8 | {%- filter indent(2) %} 9 | {%- with ast = ast.get_stmts_body() %} 10 | {%- include "directives_py/StmtsBody.jinja2" %} 11 | {%- endwith %} 12 | {%- endfilter %} 13 | {{ ast.get_variable() }} += {{ ast.get_step() }} 14 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/FunctionCall.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates Python function call 3 | @param ast ASTFunctionCall 4 | #} 5 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 6 | {%- if ast.get_name() == PredefinedFunctions.INTEGRATE_ODES %} 7 | self._integrate_odes{% if ast.get_args() | length > 0 %}_{{ utils.integrate_odes_args_str_from_function_call(ast) }}{% endif %}(origin, timestep) 8 | {%- elif ast.get_name() == PredefinedFunctions.EMIT_SPIKE %} 9 | self.emit_spike(origin) 10 | {%- else %} 11 | {{ printer.print(ast) }} 12 | {%- endif %} 13 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/FunctionDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | {%- macro FunctionDeclaration(ast_function, namespace_prefix) -%} 2 | {%- with function_symbol = ast_function.get_scope().resolve_to_symbol(ast_function.get_name(), SymbolKind.FUNCTION) -%} 3 | {%- if function_symbol is none -%} 4 | {{ raise('Cannot resolve the method ' + ast_function.get_name()) }} 5 | {%- endif %} 6 | {{ ast_function.print_comment('#') }} 7 | def {{ namespace_prefix }}{{ ast_function.get_name() }} ( 8 | {%- filter indent(6) %} 9 | {%- for param in ast_function.get_parameters() %} 10 | {%- set typeSym = param.get_data_type().get_type_symbol() -%} 11 | {{ types_printer.convert(typeSym) }} {{ param.get_name() }} 12 | {%- if not loop.last -%} 13 | , 14 | {%- endif -%} 15 | {%- endfor -%} 16 | {%- endfilter -%} 17 | ) -> {{ types_printer.print(function_symbol.get_return_type()) }}: 18 | {%- endwith -%} 19 | {%- endmacro -%} 20 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/GSLIntegrationStep.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates a series of statements which perform one integration step of all ODEs defined in the model. 3 | #} 4 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 5 | {%- if numeric_solver == "rk45" %} 6 | res = scipy.integrate.solve_ivp(Neuron_{{neuronName}}.dynamics{% if ast.get_args() | length > 0 %}_{{ utils.integrate_odes_args_str_from_function_call(ast) }}{% endif %}, t_span=(origin, origin + timestep), y0=self.S_.ode_state, method="RK45", args=(self, )) 7 | np.testing.assert_almost_equal(res.t[-1], origin + timestep) # sanity check on the final timestep reached by the solver 8 | self.S_.ode_state = res.y[:, -1] 9 | {%- else %} 10 | {{ raise('Unsupported numerical solver') }} 11 | {%- endif %} 12 | 13 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/IfStatement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates Python if-then-else statement 3 | @param ast ASTIfStmt 4 | #} 5 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}} {% endif %} 6 | if {{ printer.print(ast.get_if_clause().get_condition()) }}: 7 | {%- filter indent(2) %} 8 | {%- set ast = ast.get_if_clause().get_stmts_body() %} 9 | {%- include "directives_py/StmtsBody.jinja2" %} 10 | {%- endfilter %} 11 | {%- for elif in ast.get_elif_clauses() %} 12 | elif {{ printer.print(elif.get_condition()) }}: 13 | {%- filter indent(2) %} 14 | {%- set ast = elif.get_stmts_body() %} 15 | {%- include "directives_py/StmtsBody.jinja2" %} 16 | {%- endfilter %} 17 | {%- endfor %} 18 | {%- if ast.has_else_clause() %} 19 | else: 20 | {%- filter indent(2) %} 21 | {%- set ast = ast.get_else_clause().get_stmts_body() %} 22 | {%- include "directives_py/StmtsBody.jinja2" %} 23 | {%- endfilter %} 24 | {%- endif %} 25 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/MemberDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates declaration for a variable 3 | @param variable ASTVariable 4 | @param variable_symbol VariableSymbol 5 | #} 6 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 7 | {%- if variable_symbol.has_comment() %} 8 | {{ variable_symbol.print_comment("# ") }} 9 | {%- endif %} 10 | {%- if variable_symbol.get_symbol_name() in numeric_state_variables %} 11 | ode_state[ode_state_variable_name_to_index["{{ printer_no_origin.print(variable) }}"]] = np.nan # type: {{ declarations.print_variable_type(variable_symbol) }} 12 | {%- else %} 13 | {{ printer_no_origin.print(variable) }} = None # type: {{ declarations.print_variable_type(variable_symbol) }} 14 | {%- endif %} 15 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/MemberInitialization.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | In general case creates an 3 | @param variable_symbol variable_symbolSymbol variable_symbol for which the initialization should be done 4 | #} 5 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 6 | {%- if variable_symbol.has_declaring_expression() and not variable_symbol.is_kernel() %} 7 | {%- if variable_symbol.has_vector_parameter() %} 8 | {{ printer.print_vector_declaration(variable_symbol) }} 9 | {%- else %} 10 | {{ printer.print(variable) }} = {{ printer.print(variable_symbol.get_declaring_expression()) }} # type: {{variable_symbol.get_type_symbol().print_symbol()}} 11 | {%- endif %} 12 | {%- else %} 13 | {%- if variable_symbol.has_vector_parameter() %} 14 | {{ printer.print(variable) }} = [] # type: {{ variable_symbol.get_type_symbol().print_symbol() }} 15 | {%- else %} 16 | {{ printer.print(variable) }} = 0 # type: {{ variable_symbol.get_type_symbol().print_symbol() }} 17 | {%- endif -%} 18 | {%- endif -%} 19 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/MemberVariableGetterSetter.jinja2: -------------------------------------------------------------------------------- 1 | {% if variable_symbol.is_inline_expression and not utils.contains_convolve_call(variable_symbol) -%} 2 | def get_{{ printer_no_origin.print(variable) }}(self) -> {{ declarations.print_variable_type(variable_symbol) }}: 3 | return get_{{ printer_no_origin.print(variable_symbol.get_declaring_expression()) }} 4 | {%- else %} 5 | def get_{{ printer_no_origin.print(variable) }}(self) -> {{ declarations.print_variable_type(variable_symbol) }}: 6 | return {{ printer.print(variable) }} 7 | 8 | def set_{{ printer_no_origin.print(variable) }}(self, __v: {{ declarations.print_variable_type(variable_symbol) }}): 9 | {{ printer.print(variable) }} = __v 10 | {%- endif %} 11 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/ReturnStatement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates a single return statement 3 | @param ast ASTReturnStmt 4 | #} 5 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 6 | {%- if ast.has_expression() %} 7 | return {{ printer.print(ast.get_expression()) }} 8 | {%- else %} 9 | return 10 | {%- endif %} 11 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/SmallStatement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates a single small statement 3 | @param stmt ASTSmallStmt 4 | #} 5 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 6 | {%- if stmt.is_assignment() %} 7 | {%- with ast = stmt.get_assignment() %} 8 | {%- include "directives_py/Assignment.jinja2" %} 9 | {%- endwith %} 10 | {%- elif stmt.is_function_call() %} 11 | {%- with ast = stmt.get_function_call() %} 12 | {%- include "directives_py/FunctionCall.jinja2" %} 13 | {%- endwith %} 14 | {%- elif stmt.is_declaration() %} 15 | {%- with ast = stmt.get_declaration() %} 16 | {%- include "directives_py/Declaration.jinja2" %} 17 | {%- endwith %} 18 | {%- elif stmt.is_return_stmt() %} 19 | {%- with ast = stmt.get_return_stmt() %} 20 | {%- include "directives_py/ReturnStatement.jinja2" %} 21 | {%- endwith %} 22 | {%- endif %} 23 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/Statement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates a single statement, either a simple or compound 3 | @param ast ASTSmallStmt or ASTCompoundStmt 4 | #} 5 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 6 | {%- if stmt.has_comment() %} 7 | {{ stmt.print_comment('#') }} 8 | {%- endif %} 9 | {%- if stmt.is_small_stmt() %} 10 | {%- with stmt = stmt.small_stmt %} 11 | {%- include "directives_py/SmallStatement.jinja2" %} 12 | {%- endwith %} 13 | {%- elif stmt.is_compound_stmt() %} 14 | {%- with stmt = stmt.compound_stmt %} 15 | {%- include "directives_py/CompoundStatement.jinja2" %} 16 | {%- endwith %} 17 | {%- endif %} 18 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/StmtsBody.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Handles a sequence of statements 3 | @param ast ASTStmtsBody 4 | #} 5 | {%- if tracing %}# generated by {{ self._TemplateReference__context.name }}{% endif %} 6 | 7 | {%- for statement in ast.get_stmts() %} 8 | {%- with stmt = statement %} 9 | {%- include "directives_py/Statement.jinja2" %} 10 | {%- endwith %} 11 | {%- endfor %} 12 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/WhileStatement.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates Python while statement 3 | @param ast ASTWhileStmt 4 | #} 5 | {%- if tracing %}# generated by {{self._TemplateReference__context.name}}{% endif %} 6 | while {{ printer.print(ast.get_condition()) }}: 7 | {%- filter indent(2) %} 8 | {%- set ast = ast.get_stmts_body() %} 9 | {%- include "directives_py/StmtsBody.jinja2" %} 10 | {%- endfilter %} 11 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/directives_py/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | # --------------------------------------------------------------- 23 | # Caution: This file is required to enable Python to also include the templates 24 | # --------------------------------------------------------------- 25 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_python_standalone/point_neuron/utils.py.jinja2: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | def steps(time_ms: float, timestep: float): 4 | r"""Convert a time period (in milliseconds) to number of simulation steps""" 5 | return int(np.ceil(time_ms / timestep)) 6 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/@SYNAPSE_NAME@.py.jinja2: -------------------------------------------------------------------------------- 1 | # TODO: This should be class of SynapseDynamicSTDP with default values set to generated timing and weight 2 | from spynnaker.pyNN.models.neuron.synapse_dynamics.synapse_dynamics_stdp import SynapseDynamicsSTDP 3 | 4 | from python_models8.neuron.builds.{{synapseName}}_timing import MyTimingDependence 5 | from python_models8.neuron.builds.{{synapseName}}_weight import MyWeightDependence 6 | 7 | class {{synapseName}}_synapse_impl(SynapseDynamicsSTDP): 8 | 9 | def __init__(self): 10 | super().__init__( 11 | timing_dependence=MyTimingDependence(my_potentiation_parameter=2., my_depression_parameter=0.1), 12 | weight_dependence=MyWeightDependence(w_min=0., w_max=10., my_weight_parameter=0.5), 13 | ) 14 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/@SYNAPSE_NAME@_timing_impl.c.jinja2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/pynestml/codegeneration/resources_spinnaker/@SYNAPSE_NAME@_timing_impl.c.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/@SYNAPSE_NAME@_timing_impl.h.jinja2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/pynestml/codegeneration/resources_spinnaker/@SYNAPSE_NAME@_timing_impl.h.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/@SYNAPSE_NAME@_weight_impl.c.jinja2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/pynestml/codegeneration/resources_spinnaker/@SYNAPSE_NAME@_weight_impl.c.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/@SYNAPSE_NAME@_weight_impl.h.jinja2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nest/nestml/1cd66c54b3d9d9c37c4d159d5fea4e9cc077f756/pynestml/codegeneration/resources_spinnaker/@SYNAPSE_NAME@_weight_impl.h.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/Makefile_@NEURON_NAME@_impl.jinja2: -------------------------------------------------------------------------------- 1 | APP = $(notdir $(CURDIR)) 2 | 3 | NEURON_IMPL_H = $(EXTRA_SRC_DIR)/my_models/implementations/{{neuronName}}_impl.h 4 | SYNAPSE_DYNAMICS = $(NEURON_DIR)/neuron/plasticity/synapse_dynamics_static_impl.c 5 | 6 | include ../extra.mk 7 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/Makefile_@SYNAPSE_NAME@_impl.jinja2: -------------------------------------------------------------------------------- 1 | APP = $(notdir $(CURDIR)) 2 | BUILD_DIR = build/ 3 | 4 | NEURON_IMPL_H = $(EXTRA_SRC_DIR)/my_models/implementations/iaf_psc_exp_nestml_impl.h 5 | SYNAPSE_DYNAMICS = $(EXTRA_SRC_DIR)/my_models/implementations/{{synapseName}}_impl.c 6 | TIMING_DEPENDENCE = $(EXTRA_SRC_DIR)/my_models/implementations/{{synapseName}}_timing_impl.c 7 | TIMING_DEPENDENCE_H = $(EXTRA_SRC_DIR)/my_models/implementations/{{synapseName}}_timing_impl.h 8 | WEIGHT_DEPENDENCE = $(EXTRA_SRC_DIR)/my_models/implementations/{{synapseName}}_weight_impl.c 9 | WEIGHT_DEPENDENCE_H = $(EXTRA_SRC_DIR)/my_models/implementations/{{synapseName}}_weight_impl.h 10 | 11 | include ../extra.mk 12 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/Makefile_models.jinja2: -------------------------------------------------------------------------------- 1 | MODELS = \ 2 | {%- for neuron in neurons %} 3 | {{neuron.get_name()}}_impl \ 4 | {%- endfor %} 5 | {%- for synapse in synapses %} 6 | {{synapse.get_name()}}_impl \ 7 | {%- endfor %} 8 | 9 | all: 10 | for d in $(MODELS); do $(MAKE) -C $$d || exit $$?; done 11 | 12 | clean: 13 | for d in $(MODELS); do $(MAKE) -C $$d clean || exit $$?; done 14 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/Makefile_root.jinja2: -------------------------------------------------------------------------------- 1 | DIRS = makefiles 2 | 3 | all: $(DIRS) 4 | for d in $(DIRS); do $(MAKE) -C $$d || exit $$?; done 5 | 6 | clean: $(DIRS) 7 | for d in $(DIRS); do $(MAKE) -C $$d clean || exit $$?; done 8 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/__init__.py.jinja2: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | import os 23 | from spynnaker.pyNN.data import SpynnakerDataView 24 | from python_models8 import model_binaries 25 | 26 | # This adds the model binaries path to the paths searched by sPyNNaker 27 | SpynnakerDataView.register_binary_search_path(os.path.dirname(model_binaries.__file__)) 28 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/AnalyticIntegrationStep_begin.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/AnalyticIntegrationStep_begin.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/AnalyticIntegrationStep_end.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/AnalyticIntegrationStep_end.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/ApplySpikesFromBuffers.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/ApplySpikesFromBuffers.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/AssignTmpDictionaryValue.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/AssignTmpDictionaryValue.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/Assignment.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/Assignment.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/BufferDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/BufferDeclaration.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/BufferDeclarationValue.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/BufferDeclarationValue.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/BufferInitialization.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/BufferInitialization.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/CommonPropertiesDictionaryMemberInitialization.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/CommonPropertiesDictionaryMemberInitialization.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/CommonPropertiesDictionaryReader.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/CommonPropertiesDictionaryReader.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/CommonPropertiesDictionaryWriter.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/CommonPropertiesDictionaryWriter.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/CompoundStatement.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/CompoundStatement.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/ContinuousInputBufferGetter.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/ContinuousInputBufferGetter.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/Declaration.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/Declaration.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/DelayVariablesDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/DelayVariablesDeclaration.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/DelayVariablesInitialization.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/DelayVariablesInitialization.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/DynamicStateElement.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/DynamicStateElement.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/ForStatement.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/ForStatement.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/FunctionCall.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/FunctionCall.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/FunctionDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/FunctionDeclaration.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/GSLDifferentiationFunction.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/GSLDifferentiationFunction.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/GSLIntegrationStep.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/GSLIntegrationStep.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/IfStatement.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/IfStatement.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/MemberDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/MemberDeclaration.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/MemberInitialization.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/MemberInitialization.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/MemberVariableGetterSetter.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/MemberVariableGetterSetter.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/OutputEvent.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/OutputEvent.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/PredefinedFunction_emit_spike.jinja2: -------------------------------------------------------------------------------- 1 | {# 2 | Generates code for emit_spike() function call 3 | @param ast ASTFunctionCall 4 | #} 5 | {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} 6 | 7 | // begin generated code for emit_spike() function 8 | {% if ast.get_args() | length == 0 %} 9 | {#- no parameters -- emit_spike() called from within neuron #} 10 | neuron_recording_record_bit(SPIKE_RECORDING_BITFIELD, neuron_index); 11 | send_spike(timer_count, time, neuron_index); 12 | {%- else %} 13 | {#- weight and delay parameters given -- emit_spike() called from within synapse #} 14 | #error "Synapse code generation not supported yet for SpiNNaker" 15 | {%- endif %} 16 | // end generated code for emit_spike() function 17 | -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/PredefinedFunction_integrate_odes.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/PredefinedFunction_integrate_odes.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/ReadFromDictionaryToTmp.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/ReadFromDictionaryToTmp.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/ReturnStatement.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/ReturnStatement.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/RportToBufferIndexEntry.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/RportToBufferIndexEntry.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/SmallStatement.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/SmallStatement.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/SpikeBufferGetter.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/SpikeBufferGetter.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/StateVariablesEnum.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/StateVariablesEnum.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/Statement.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/Statement.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/StmtsBody.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/StmtsBody.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/UpdateDelayVariables.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/UpdateDelayVariables.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/VectorDeclaration.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/VectorDeclaration.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/VectorSizeParameter.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/VectorSizeParameter.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/WhileStatement.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/WhileStatement.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_cpp/WriteInDictionary.jinja2: -------------------------------------------------------------------------------- 1 | ../../resources_nest/point_neuron/directives_cpp/WriteInDictionary.jinja2 -------------------------------------------------------------------------------- /pynestml/codegeneration/resources_spinnaker/directives_py: -------------------------------------------------------------------------------- 1 | ../resources_python_standalone/point_neuron/directives_py -------------------------------------------------------------------------------- /pynestml/exceptions/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | __all__ = ['generated_code_build_exception', 'implicit_cast_exception', 'implicit_magnitude_cast_exception', 'invalid_path_exception', 'invalid_target_exception'] 23 | -------------------------------------------------------------------------------- /pynestml/exceptions/code_generator_options_exception.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # code_generator_options_exception.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | 23 | class CodeGeneratorOptionsException(Exception): 24 | r""" 25 | This exception is thrown whenever a non-existing option is passed to the code generator (or builder). 26 | """ 27 | pass 28 | -------------------------------------------------------------------------------- /pynestml/exceptions/generated_code_build_exception.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # generated_code_build_exception.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | 23 | class GeneratedCodeBuildException(Exception): 24 | """ 25 | This exception is thrown whenever a failure occurs while building or installing the generated code for the target platform. 26 | """ 27 | pass 28 | -------------------------------------------------------------------------------- /pynestml/exceptions/implicit_cast_exception.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # implicit_cast_exception.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | 23 | class ImplicitCastException(Exception): 24 | 25 | def __init__(self, code, message, resulting_type): 26 | self.code = code 27 | self.message = message 28 | self.resulting_type = resulting_type 29 | -------------------------------------------------------------------------------- /pynestml/exceptions/implicit_magnitude_cast_exception.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # implicit_magnitude_cast_exception.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | 23 | class ImplicitMagnitudeCastException(Exception): 24 | 25 | def __init__(self, code, message, conversion_factor): 26 | self.code = code 27 | self.message = message 28 | self.conversion_factor = conversion_factor 29 | -------------------------------------------------------------------------------- /pynestml/exceptions/invalid_path_exception.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # invalid_path_exception.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | 23 | class InvalidPathException(Exception): 24 | """ 25 | This exception is thrown whenever neither a file nor a dir has been handed over. This should not happen. 26 | """ 27 | pass 28 | -------------------------------------------------------------------------------- /pynestml/exceptions/invalid_target_exception.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # invalid_target_exception.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | 23 | class InvalidTargetException(Exception): 24 | """ 25 | This exception is thrown whenever an unknown target is requested. 26 | """ 27 | pass 28 | -------------------------------------------------------------------------------- /pynestml/frontend/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | __all__ = ['frontend_configuration.py', 'pynestml_frontend.py'] 23 | -------------------------------------------------------------------------------- /pynestml/generated/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | __all__ = ['PyNestMLLexer', 'PyNestMLParser', 'PyNestMLParserVisitor', 'PyNestMLLexerBase'] 23 | -------------------------------------------------------------------------------- /pynestml/grammars/generate_lexer_parser: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # generate_lexer_parser 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | # 22 | 23 | # Do not change the position of this file! In order to generate the corresponding code into `pynestml/generated`, this script has to be executed from `pynestml/grammars`. 24 | 25 | antlr4 -encoding UTF8 -Dlanguage=Python3 *.g4 -visitor -no-listener -o ../generated 26 | -------------------------------------------------------------------------------- /pynestml/symbol_table/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | __all__ = ['scope.py', 'symbol_table.py'] 23 | -------------------------------------------------------------------------------- /pynestml/transformers/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | __all__ = [ 23 | 'illegal_variable_name_transformer', 24 | 'synapse_post_neuron_transformer', 25 | 'transformer' 26 | ] 27 | -------------------------------------------------------------------------------- /pynestml/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | __all__ = ["ast_nestml_printer", "ast_utils", "cloning_helpers", "either", "error_listener", "error_strings", "logger", "logging_helper", "messages", "model_parser", "port_signal_type", "source_location", "stack", "type_caster", "type_dictionary", "unit_type", "with_options"] 23 | -------------------------------------------------------------------------------- /pynestml/utils/conc_info_enricher.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # conc_info_enricher.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | from pynestml.utils.mechs_info_enricher import MechsInfoEnricher 23 | 24 | 25 | class ConcInfoEnricher(MechsInfoEnricher): 26 | """Just created for consistency with the rest of the mechanism generation process. No more than the base-class 27 | enriching needs to be done""" 28 | def __init__(self, params): 29 | super(MechsInfoEnricher, self).__init__(params) 30 | -------------------------------------------------------------------------------- /pynestml/utils/port_signal_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # port_signal_type.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | from enum import Enum 23 | 24 | 25 | class PortSignalType(Enum): 26 | """ 27 | This enum is used to describe the type of the received or emitted signal. 28 | """ 29 | SPIKE = 1 30 | CONTINUOUS = 2 31 | -------------------------------------------------------------------------------- /pynestml/utils/string_utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # string_utils.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | 22 | 23 | def removeprefix(s: str, prefix: str) -> str: 24 | if prefix and s.startswith(prefix): 25 | return s[len(prefix):] 26 | 27 | return s 28 | 29 | 30 | def removesuffix(s: str, suffix: str) -> str: 31 | if suffix and s.endswith(suffix): 32 | return s[:-len(suffix)] 33 | 34 | return s 35 | -------------------------------------------------------------------------------- /pynestml/utils/type_dictionary.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # type_dictionary.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | from copy import copy 22 | 23 | 24 | class TypeDictionary(dict): 25 | 26 | def __getitem__(self, item): 27 | return copy(self.get(item)) 28 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # note: copy any changes to doc/requirements.txt 2 | numpy >= 1.8.2 3 | scipy 4 | sympy 5 | antlr4-python3-runtime == 4.13.2 6 | setuptools 7 | Jinja2 >= 2.10 8 | typing;python_version<"3.5" 9 | astropy 10 | odetoolbox >= 2.5.9 11 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # __init__.py 4 | # 5 | # This file is part of NEST. 6 | # 7 | # Copyright (C) 2004 The NEST Initiative 8 | # 9 | # NEST is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # NEST is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with NEST. If not, see . 21 | -------------------------------------------------------------------------------- /tests/invalid/CoCoOutputPortDefinedIfEmitCall.nestml: -------------------------------------------------------------------------------- 1 | # CoCoOutputPortDefinedIfEmitCall.nestml 2 | # ###################################### 3 | # 4 | # 5 | # Description 6 | # +++++++++++ 7 | # 8 | # This model is used to test if broken CoCos are identified correctly. Here, if the output port is not defined. 9 | # 10 | # Negative case. 11 | # 12 | # 13 | # Copyright statement 14 | # +++++++++++++++++++ 15 | # 16 | # This file is part of NEST. 17 | # 18 | # Copyright (C) 2004 The NEST Initiative 19 | # 20 | # NEST is free software: you can redistribute it and/or modify 21 | # it under the terms of the GNU General Public License as published by 22 | # the Free Software Foundation, either version 2 of the License, or 23 | # (at your option) any later version. 24 | # 25 | # NEST is distributed in the hope that it will be useful, 26 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 27 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 | # GNU General Public License for more details. 29 | # 30 | # You should have received a copy of the GNU General Public License 31 | # along with NEST. If not, see . 32 | # 33 | model spiking_output_port_is_defined: 34 | update: 35 | emit_spike() 36 | -------------------------------------------------------------------------------- /tests/invalid/CoCoVariableNotDefined.nestml: -------------------------------------------------------------------------------- 1 | # CoCoVariableNotDefined.nestml 2 | # ############################# 3 | # 4 | # 5 | # Description 6 | # +++++++++++ 7 | # 8 | # This model is used to test if broken CoCos are identified correctly. Here, if not defined variables are detected. 9 | # 10 | # Negative case. 11 | # 12 | # 13 | # Copyright statement 14 | # +++++++++++++++++++ 15 | # 16 | # This file is part of NEST. 17 | # 18 | # Copyright (C) 2004 The NEST Initiative 19 | # 20 | # NEST is free software: you can redistribute it and/or modify 21 | # it under the terms of the GNU General Public License as published by 22 | # the Free Software Foundation, either version 2 of the License, or 23 | # (at your option) any later version. 24 | # 25 | # NEST is distributed in the hope that it will be useful, 26 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 27 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 | # GNU General Public License for more details. 29 | # 30 | # You should have received a copy of the GNU General Public License 31 | # along with NEST. If not, see . 32 | # 33 | model CoCoVariableNotDefined: 34 | update: 35 | test1 = test2 + 1 36 | -------------------------------------------------------------------------------- /tests/invalid/CompoundOperatorWithDifferentButCompatibleUnits.nestml: -------------------------------------------------------------------------------- 1 | # CompoundOperatorWithDifferentButCompatibleUnits.nestml 2 | # ###################################################### 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model CompoundOperatorTest: 26 | state: 27 | lhs V = 1 V 28 | 29 | update: 30 | lhs *= 1 nA 31 | lhs /= 1 m 32 | lhs *= (1. mA) * (1 Ohm) 33 | lhs += 1 A 34 | lhs -= 1 nS 35 | -------------------------------------------------------------------------------- /tests/invalid/DocstringCommentTest.nestml: -------------------------------------------------------------------------------- 1 | # DocstringCommentTest.nestml 2 | # ########################### 3 | # 4 | # 5 | # Description 6 | # +++++++++++ 7 | # 8 | # This model is used to test whether docstring comments are detected. 9 | # 10 | # Negative case. 11 | # 12 | # 13 | # Copyright statement 14 | # +++++++++++++++++++ 15 | # 16 | # This file is part of NEST. 17 | # 18 | # Copyright (C) 2004 The NEST Initiative 19 | # 20 | # NEST is free software: you can redistribute it and/or modify 21 | # it under the terms of the GNU General Public License as published by 22 | # the Free Software Foundation, either version 2 of the License, or 23 | # (at your option) any later version. 24 | # 25 | # NEST is distributed in the hope that it will be useful, 26 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 27 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 | # GNU General Public License for more details. 29 | # 30 | # You should have received a copy of the GNU General Public License 31 | # along with NEST. If not, see . 32 | 33 | model docstringCommentTest: 34 | state: 35 | # foo 36 | 37 | test boolean = True #inline comment ok 38 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/ForLoop.nestml: -------------------------------------------------------------------------------- 1 | # ForLoop.nestml 2 | # ############## 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | 25 | # 26 | model for_loop: 27 | state: 28 | V_m mV = -0.20 mV 29 | 30 | parameters: 31 | N integer = 42 32 | 33 | update: 34 | k integer = 0 35 | j integer = 0 36 | for j in 0 ... N step 1: 37 | k = j / N 38 | V_m += 0.01 mV 39 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/PrintStatementInFunction.nestml: -------------------------------------------------------------------------------- 1 | # PrintStatementInFunction.nestml 2 | # ############################### 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model print_test_function: 26 | function print_function(): 27 | print("A statement inside a function") 28 | return 29 | 30 | update: 31 | print_function() 32 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/SimplePrintStatement.nestml: -------------------------------------------------------------------------------- 1 | # SimplePrintStatement.nestml 2 | # ########################### 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model simple_print_test: 26 | update: 27 | print("This is a simple print statement") 28 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/SimpleVectorsModel.nestml: -------------------------------------------------------------------------------- 1 | # 2 | # SimpleVectorsModel.nestml 3 | # ######################### 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | 26 | # 27 | model simple_vectors_model: 28 | state: 29 | g_ex [20] real = 1.2 30 | 31 | update: 32 | g_ex[2] = 10.5 33 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/TimeVariableNeuron.nestml: -------------------------------------------------------------------------------- 1 | # TimeVariableNeuron.nestml 2 | # ######################### 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model time_variable_neuron: 26 | state: 27 | x ms = 0. ms 28 | y s = 0. s 29 | 30 | update: 31 | x = t 32 | y = t 33 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/TimeVariableSynapse.nestml: -------------------------------------------------------------------------------- 1 | # TimeVariableSynapse.nestml 2 | # ########################## 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model time_variable_synapse: 26 | state: 27 | x ms = 0. ms 28 | y ms = 0. ms 29 | 30 | onReceive(pre_spikes): 31 | y = t 32 | 33 | parameters: 34 | w real = 1 35 | d ms = 1 ms 36 | 37 | input: 38 | pre_spikes <- spike 39 | 40 | update: 41 | x = t + timestep() 42 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/WhileLoop.nestml: -------------------------------------------------------------------------------- 1 | # WhileLoop.nestml 2 | # ################ 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | 25 | # 26 | model while_loop: 27 | state: 28 | y real = 0.025 29 | 30 | parameters: 31 | N integer = 5 32 | 33 | update: 34 | k integer = 3 35 | j integer = 0 36 | while j <= N: 37 | y = max(k, j) 38 | y += 0.011 39 | j += 1 40 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/code_options.json: -------------------------------------------------------------------------------- 1 | {"templates": {"path": "resources_nest/point_neuron", "model_templates": {"neuron": ["@NEURON_NAME@.cpp.jinja2", "@NEURON_NAME@.h.jinja2"], "synapse": []}, "module_templates": ["setup/CMakeLists.txt.jinja2", "setup/@MODULE_NAME@.h.jinja2", "setup/@MODULE_NAME@.cpp.jinja2"]}} -------------------------------------------------------------------------------- /tests/nest_tests/resources/delay_test_assigned_delay2_synapse.nestml: -------------------------------------------------------------------------------- 1 | # delay_test_assigned_delay2_synapse 2 | # ################################## 3 | # 4 | model delay_test_assigned_delay2_synapse: 5 | state: 6 | w real = 1 # Synaptic weight 7 | delay ms = 1 ms # Synaptic transmission delay 8 | 9 | input: 10 | pre_spikes <- spike 11 | 12 | output: 13 | spike(weight real, delay ms) 14 | 15 | onReceive(pre_spikes): 16 | emit_spike(w, d) 17 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/delay_test_assigned_delay_synapse.nestml: -------------------------------------------------------------------------------- 1 | # delay_test_assigned_delay_synapse 2 | # ################################# 3 | # 4 | model delay_test_assigned_delay_synapse: 5 | state: 6 | w real = 1 # Synaptic weight 7 | d ms = 1 ms # Synaptic transmission delay 8 | 9 | input: 10 | pre_spikes <- spike 11 | 12 | output: 13 | spike(weight real, delay ms) 14 | 15 | onReceive(pre_spikes): 16 | d = 2 ms # not allowed! 17 | emit_spike(w, d) 18 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/delay_test_assigned_synapse.nestml: -------------------------------------------------------------------------------- 1 | # delay_test_assigned_synapse 2 | # ########################### 3 | # 4 | model delay_test_assigned_synapse: 5 | state: 6 | w real = 1 # Synaptic weight 7 | d ms = 1 ms # Synaptic transmission delay 8 | 9 | input: 10 | pre_spikes <- spike 11 | 12 | output: 13 | spike(weight real, delay ms) 14 | 15 | onReceive(pre_spikes): 16 | w = 2 17 | emit_spike(w, d) 18 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/delay_test_plastic_synapse.nestml: -------------------------------------------------------------------------------- 1 | # delay_test_synapse_plastic 2 | # ########################## 3 | # 4 | model delay_test_plastic_synapse: 5 | state: 6 | x ms = 0 ms 7 | w real = 1 # Synaptic weight 8 | d ms = 1 ms # Synaptic transmission delay 9 | 10 | input: 11 | pre_spikes <- spike 12 | 13 | output: 14 | spike(weight real, delay ms) 15 | 16 | onReceive(pre_spikes): 17 | emit_spike(w, d) 18 | 19 | update: 20 | x = d 21 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/delay_test_synapse.nestml: -------------------------------------------------------------------------------- 1 | # delay_test_synapse 2 | # ################## 3 | # 4 | model delay_test_synapse: 5 | state: 6 | x ms = 0 ms 7 | 8 | parameters: 9 | w real = 1 # Synaptic weight 10 | d ms = 1 ms # Synaptic transmission delay 11 | 12 | input: 13 | pre_spikes <- spike 14 | 15 | output: 16 | spike(weight real, delay ms) 17 | 18 | onReceive(pre_spikes): 19 | emit_spike(w, d) 20 | 21 | update: 22 | x = d 23 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/homogeneous_parameters_synapse.nestml: -------------------------------------------------------------------------------- 1 | # Static synapse 2 | # ############## 3 | # 4 | # Description 5 | # +++++++++++ 6 | # A synapse where the synaptic strength (weight) does not evolve with simulated time, but is defined as a (constant) parameter. 7 | # 8 | model static_synapse: 9 | 10 | parameters: 11 | w real = 900 @homogeneous 12 | d ms = .9 ms @heterogeneous 13 | a real = pi @homogeneous 14 | b real = 100. @heterogeneous 15 | 16 | input: 17 | pre_spikes <- spike 18 | 19 | output: 20 | spike(weight real, delay ms) 21 | 22 | onReceive(pre_spikes): 23 | emit_spike(3.18E-3 * a * b * w, d) 24 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/integrate_odes_nonlinear_test.nestml: -------------------------------------------------------------------------------- 1 | # Model for testing the integrate_odes() function. 2 | # 3 | model integrate_odes_nonlinear_test: 4 | state: 5 | test_1 real = 0. 6 | test_2 real = 0. 7 | r integer = 0 8 | 9 | equations: 10 | test_1' = -test_1**1.00000001 / (100 ms) 11 | test_2' = -test_2**1.00000001 / (10 ms) 12 | 13 | update: 14 | r += 1 15 | 16 | if r % 64 == 0: 17 | test_1 += 1 18 | test_2 += 1 19 | 20 | integrate_odes(test_1) 21 | 22 | if test_1 > 3 and test_1 < 8: 23 | integrate_odes(test_2) 24 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/integrate_odes_test.nestml: -------------------------------------------------------------------------------- 1 | # Model for testing the integrate_odes() function. 2 | # 3 | model integrate_odes_test: 4 | state: 5 | test_1 real = 0. 6 | test_2 real = 0. 7 | r integer = 0 8 | 9 | equations: 10 | test_1' = -test_1 / (100 ms) 11 | test_2' = -test_2 / (10 ms) 12 | 13 | update: 14 | r += 1 15 | 16 | if r % 64 == 0: 17 | test_1 += 1 18 | test_2 += 1 19 | 20 | integrate_odes(test_1) 21 | 22 | if test_1 > 3 and test_1 < 8: 23 | integrate_odes(test_2) 24 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/integrate_odes_test_params.nestml: -------------------------------------------------------------------------------- 1 | # Model for testing the integrate_odes() function. 2 | # 3 | model integrate_odes_test: 4 | state: 5 | test_1 real = 0. 6 | test_2 real = 0. 7 | 8 | update: 9 | integrate_odes(2 * test_1) 10 | integrate_odes(100 ms) 11 | integrate_odes(test_1) 12 | integrate_odes(test_2) 13 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/integrate_odes_test_params2.nestml: -------------------------------------------------------------------------------- 1 | # Model for testing the integrate_odes() function. 2 | # 3 | model integrate_odes_test: 4 | state: 5 | test_1 real = 0. 6 | test_2 real = 0. 7 | 8 | update: 9 | integrate_odes(test_3) 10 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/minimal_neuron.nestml: -------------------------------------------------------------------------------- 1 | # minimal_neuron.nestml 2 | # ##################### 3 | # 4 | # This is a very minimal neuron model for testing, containing as few blocks as possible. 5 | # 6 | # 7 | # Copyright statement 8 | # +++++++++++++++++++ 9 | # 10 | # This file is part of NEST. 11 | # 12 | # Copyright (C) 2004 The NEST Initiative 13 | # 14 | # NEST is free software: you can redistribute it and/or modify 15 | # it under the terms of the GNU General Public License as published by 16 | # the Free Software Foundation, either version 2 of the License, or 17 | # (at your option) any later version. 18 | # 19 | # NEST is distributed in the hope that it will be useful, 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | # GNU General Public License for more details. 23 | # 24 | # You should have received a copy of the GNU General Public License 25 | # along with NEST. If not, see . 26 | # 27 | model minimal_neuron: 28 | output: 29 | spike 30 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/nest_codegen_opts.json: -------------------------------------------------------------------------------- 1 | { 2 | "nest_path": "%NEST_PATH%", 3 | "nest_version": "%NEST_VERSION%" 4 | } 5 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/test_delta_kernel_neuron.nestml: -------------------------------------------------------------------------------- 1 | # test_delta_kernel 2 | # ################# 3 | # 4 | # Description 5 | # +++++++++++ 6 | # 7 | # Used in NESTML unit testing. 8 | # 9 | model test_delta_kernel_neuron: 10 | state: 11 | x mV = 0 mV 12 | 13 | equations: 14 | kernel delta_kernel = delta(t) 15 | recordable inline psp mV = convolve(delta_kernel, spikes) * mV 16 | # x' = -x / tau_m + psp / ms 17 | x' = -x / tau_m + (spikes * V) 18 | 19 | parameters: 20 | tau_m ms = 10 ms 21 | 22 | input: 23 | spikes <- spike 24 | 25 | output: 26 | spike 27 | 28 | update: 29 | integrate_odes() 30 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/weight_test_assigned_synapse.nestml: -------------------------------------------------------------------------------- 1 | # weight_test_assigned_synapse 2 | # ########################### 3 | # 4 | model weight_test_assigned_synapse: 5 | state: 6 | w real = 1 # Synaptic weight 7 | d ms = 1 ms # Synaptic transmission delay 8 | 9 | input: 10 | pre_spikes <- spike 11 | 12 | output: 13 | spike(weight real, delay ms) 14 | 15 | onReceive(pre_spikes): 16 | w = 2 17 | emit_spike(w, d) 18 | -------------------------------------------------------------------------------- /tests/nest_tests/resources/weight_test_plastic_synapse.nestml: -------------------------------------------------------------------------------- 1 | # weight_test_plastic_synapse 2 | # ########################### 3 | # 4 | model weight_test_plastic_synapse: 5 | state: 6 | x real = 0 7 | w real = 1 # Synaptic weight 8 | d ms = 1 ms # Synaptic transmission delay 9 | 10 | input: 11 | pre_spikes <- spike 12 | 13 | output: 14 | spike(weight real, delay ms) 15 | 16 | onReceive(pre_spikes): 17 | emit_spike(w, d) 18 | 19 | update: 20 | x = w 21 | -------------------------------------------------------------------------------- /tests/resources/CompoundAssignmentWithDifferentButCompatibleUnits.nestml: -------------------------------------------------------------------------------- 1 | # CompoundAssignmentWithDifferentButCompatibleUnits.nestml 2 | # ######################################################## 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model BlockTest: 26 | state: 27 | lhs V = 0 V 28 | 29 | update: 30 | lhs += 1200mV 31 | -------------------------------------------------------------------------------- /tests/resources/DeclarationWithDifferentButCompatibleUnitMagnitude.nestml: -------------------------------------------------------------------------------- 1 | # DeclarationWithDifferentButCompatibleUnitMagnitude.nestml 2 | # ######################################################### 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model BlockTest: 26 | state: 27 | lhs mV = 10V 28 | -------------------------------------------------------------------------------- /tests/resources/DeclarationWithDifferentButCompatibleUnits.nestml: -------------------------------------------------------------------------------- 1 | # DeclarationWithDifferentButCompatibleUnits.nestml 2 | # ################################################# 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model BlockTest: 26 | state: 27 | V_m mV = (10 pA) / (100 pF) * (1 ms) 28 | -------------------------------------------------------------------------------- /tests/resources/DeclarationWithSameVariableNameAsUnit.nestml: -------------------------------------------------------------------------------- 1 | # DeclarationWithDifferentButCompatibleUnits.nestml 2 | # ################################################# 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model BlockTest: 26 | state: 27 | V mV = -70. mV 28 | -------------------------------------------------------------------------------- /tests/resources/DirectAssignmentWithDifferentButCompatibleNestedUnits.nestml: -------------------------------------------------------------------------------- 1 | # DirectAssignmentWithDifferentButCompatibleNestedUnits.nestml 2 | # ############################################################ 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model BlockTest: 26 | state: 27 | lhs mV = 0 mV 28 | 29 | update: 30 | lhs = 10V + 5mV +20V + 1kV 31 | -------------------------------------------------------------------------------- /tests/resources/DirectAssignmentWithDifferentButCompatibleUnits.nestml: -------------------------------------------------------------------------------- 1 | # DirectAssignmentWithDifferentButCompatibleUnits.nestml 2 | # ###################################################### 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model BlockTest: 26 | state: 27 | lhs mV = 0 mV 28 | 29 | update: 30 | lhs = 10V 31 | -------------------------------------------------------------------------------- /tests/resources/FunctionBodyReturnStatementWithDifferentButCompatibleUnits.nestml: -------------------------------------------------------------------------------- 1 | # FunctionBodyReturnStatementWithDifferentButCompatibleUnits.nestml 2 | # ################################################################# 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model BlockTest: 26 | function foo(bar mV) V: 27 | return bar 28 | -------------------------------------------------------------------------------- /tests/resources/FunctionCallWithDifferentButCompatibleUnits.nestml: -------------------------------------------------------------------------------- 1 | # FunctionCallWithDifferentButCompatibleUnits.nestml 2 | # ################################################## 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model BlockTest: 26 | function foo(bar mV): 27 | return 28 | update: 29 | foo(10V) 30 | -------------------------------------------------------------------------------- /tests/resources/RhsFunctionCallWithDifferentButCompatibleUnits.nestml: -------------------------------------------------------------------------------- 1 | # RhsFunctionCallWithDifferentButCompatibleUnits.nestml 2 | # ##################################################### 3 | # 4 | # 5 | # Copyright statement 6 | # +++++++++++++++++++ 7 | # 8 | # This file is part of NEST. 9 | # 10 | # Copyright (C) 2004 The NEST Initiative 11 | # 12 | # NEST is free software: you can redistribute it and/or modify 13 | # it under the terms of the GNU General Public License as published by 14 | # the Free Software Foundation, either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # NEST is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with NEST. If not, see . 24 | # 25 | model BlockTest: 26 | state: 27 | lhs mV = 0 mV 28 | 29 | function foo(bar mV) mV: 30 | return bar 31 | 32 | update: 33 | lhs = foo(10V) 34 | -------------------------------------------------------------------------------- /tests/valid/DocstringCommentTest.nestml: -------------------------------------------------------------------------------- 1 | # DocstringCommentTest.nestml 2 | # ########################### 3 | # 4 | # 5 | # Description 6 | # +++++++++++ 7 | # 8 | # This model is used to test whether docstring comments are detected. 9 | # 10 | # Positive case. 11 | # 12 | # 13 | # Copyright statement 14 | # +++++++++++++++++++ 15 | # 16 | # This file is part of NEST. 17 | # 18 | # Copyright (C) 2004 The NEST Initiative 19 | # 20 | # NEST is free software: you can redistribute it and/or modify 21 | # it under the terms of the GNU General Public License as published by 22 | # the Free Software Foundation, either version 2 of the License, or 23 | # (at your option) any later version. 24 | # 25 | # NEST is distributed in the hope that it will be useful, 26 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 27 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 | # GNU General Public License for more details. 29 | # 30 | # You should have received a copy of the GNU General Public License 31 | # along with NEST. If not, see . 32 | # 33 | model docstringCommentTest: 34 | state: 35 | # foo 36 | test boolean = True #inline comment ok 37 | # foo 38 | # bar 39 | --------------------------------------------------------------------------------