From 0397322ee06356cc914f979652040cbff436f512 Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Tue, 17 May 2022 10:49:59 +0200 Subject: [PATCH 1/3] Fix for Neuron9.0 --- ProbAMPANMDA2.mod | 7 ++++++- readme.txt | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ProbAMPANMDA2.mod b/ProbAMPANMDA2.mod index 25c7377..b916d6c 100644 --- a/ProbAMPANMDA2.mod +++ b/ProbAMPANMDA2.mod @@ -47,8 +47,13 @@ VERBATIM #include #include +#ifndef NRN_VERSION_GTEQ_8_2_0 double nrn_random_pick(void* r); void* nrn_random_arg(int argpos); +#define RANDCAST +#else +#define RANDCAST (Rand*) +#endif ENDVERBATIM @@ -185,7 +190,7 @@ VERBATIM : each instance. However, the corresponding hoc Random : distribution MUST be set to Random.negexp(1) */ - value = nrn_random_pick(_p_rng); + value = nrn_random_pick(RANDCAST _p_rng); //fi = fopen("RandomStreamMCellRan4.txt", "w"); //fprintf(fi,"random stream for this simulation = %lf\n",value); //printf("random stream for this simulation = %lf\n",value); diff --git a/readme.txt b/readme.txt index 011dee1..ed4afe7 100644 --- a/readme.txt +++ b/readme.txt @@ -12,3 +12,6 @@ Parameters for the user to play with: 2. connectivity = 0 or 1, whether the cells are interconnected or not 3. modelnum = 1 to 6, referring to the different biophysical models 4. condition = simulation condition, see comments in file for options + +--- +2022-05-17: fix ProbAMPANMDA2 for Neuron9.0 From b52e61d4fea5af1f03e57720f4f80fa8b628f617 Mon Sep 17 00:00:00 2001 From: Olli Lupton Date: Wed, 18 May 2022 11:05:11 +0200 Subject: [PATCH 2/3] ProbUDFsyn2.mod --- ProbUDFsyn2.mod | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ProbUDFsyn2.mod b/ProbUDFsyn2.mod index 2807653..e2036c1 100644 --- a/ProbUDFsyn2.mod +++ b/ProbUDFsyn2.mod @@ -43,8 +43,13 @@ VERBATIM #include #include +#ifndef NRN_VERSION_GTEQ_8_2_0 double nrn_random_pick(void* r); void* nrn_random_arg(int argpos); +#define RANDCAST +#else +#define RANDCAST (Rand*) +#endif ENDVERBATIM @@ -155,7 +160,7 @@ VERBATIM : each instance. However, the corresponding hoc Random : distribution MUST be set to Random.negexp(1) */ - value = nrn_random_pick(_p_rng); + value = nrn_random_pick(RANDCAST _p_rng); //fi = fopen("RandomStreamMCellRan4.txt", "w"); //fprintf(fi,"random stream for this simulation = %lf\n",value); //printf("random stream for this simulation = %lf\n",value); From 3d80b872c009e98b0fc0bb5f9b4abdd890a699fd Mon Sep 17 00:00:00 2001 From: Olli Lupton Date: Mon, 23 May 2022 14:47:49 +0200 Subject: [PATCH 3/3] Cleanup for merge. --- readme.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index ed4afe7..2c62f79 100644 --- a/readme.txt +++ b/readme.txt @@ -13,5 +13,7 @@ Parameters for the user to play with: 3. modelnum = 1 to 6, referring to the different biophysical models 4. condition = simulation condition, see comments in file for options ---- -2022-05-17: fix ProbAMPANMDA2 for Neuron9.0 +Changelog +--------- +2022-05: Updated MOD files to contain valid C++ and be compatible with + the upcoming versions 8.2 and 9.0 of NEURON.