From bd16ba8cdc963dabc303fd894b937973cebf4fe2 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Mon, 21 Mar 2016 12:40:00 +0100 Subject: [PATCH] Corrected typo in the reference --- Cortical_Column.cpp | 10 +++++++--- Cortical_Column.h | 14 +++++++++----- Data_Storage.h | 2 +- ODE.h | 2 +- Stimulation.h | 4 ++-- TC.cpp | 7 ++----- TC_mex.cpp | 3 +-- Thalamic_Column.cpp | 36 ++++++++++++++++++------------------ Thalamic_Column.h | 30 +++++++++++++++--------------- 9 files changed, 56 insertions(+), 52 deletions(-) diff --git a/Cortical_Column.cpp b/Cortical_Column.cpp index d0a223c..4fe4ef9 100644 --- a/Cortical_Column.cpp +++ b/Cortical_Column.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 UniVprsity of Lübeck + * Copyright (c) 2015 University of Lübeck * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -21,11 +21,15 @@ * * AUTHORS: Michael Schellenberger Costa: mschellenbergercosta@gmail.com * - * Based on: A thalamocortical neural mass model of the EEG during NREM sleep and its response + * Based on: Characterization of K-Complexes and Slow Wave Activity in a Neural Mass Model + * A Weigenand, M Schellenberger Costa, H-VV Ngo, JC Claussen, T Martinetz + * PLoS Computational Biology. 2014;10:e1003923 + * + * A thalamocortical neural mass model of the EEG during NREM sleep and its response * to auditory stimulation. * M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born, T Martinetz, * JC Claussen. - * PLoS Computational Biology In Review (in review). + * PLoS Computational Biology (in review). */ /****************************************************************************************************/ diff --git a/Cortical_Column.h b/Cortical_Column.h index dbdb4b7..f2eea2c 100644 --- a/Cortical_Column.h +++ b/Cortical_Column.h @@ -21,11 +21,15 @@ * * AUTHORS: Michael Schellenberger Costa: mschellenbergercosta@gmail.com * - * Based on: A thalamocortical neural mass model of the EEG during NREM sleep and its response + * Based on: Characterization of K-Complexes and Slow Wave Activity in a Neural Mass Model + * A Weigenand, M Schellenberger Costa, H-VV Ngo, JC Claussen, T Martinetz + * PLoS Computational Biology. 2014;10:e1003923 + * + * A thalamocortical neural mass model of the EEG during NREM sleep and its response * to auditory stimulation. * M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born, T Martinetz, * JC Claussen. - * PLoS Computational Biology In Review (in review). + * PLoS Computational Biology (in review). */ /************************************************************************************************/ @@ -137,14 +141,14 @@ class Cortical_Column { /* Axonal flux time constant */ const double nu = 120E-3; - /* Conductivities */ - /* Leak in aU*/ + /* Leak weight in aU*/ const double g_L = 1.; - /* Synaptic conductivities in ms */ + /* Synaptic weight in ms */ const double g_AMPA = 1.; const double g_GABA = 1.; + /* Conductivity */ /* KNa in mS/cm^2 */ const double g_KNa = 1.33; diff --git a/Data_Storage.h b/Data_Storage.h index dcb7473..06e79c6 100644 --- a/Data_Storage.h +++ b/Data_Storage.h @@ -25,7 +25,7 @@ * to auditory stimulation. * M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born, T Martinetz, * JC Claussen. - * PLoS Computational Biology In Review (in review). + * PLoS Computational Biology (in review). */ /****************************************************************************************************/ diff --git a/ODE.h b/ODE.h index 99b6bcd..d8d81c3 100644 --- a/ODE.h +++ b/ODE.h @@ -25,7 +25,7 @@ * to auditory stimulation. * M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born, T Martinetz, * JC Claussen. - * PLoS Computational Biology In Review (in review). + * PLoS Computational Biology (in review). */ /****************************************************************************************************/ diff --git a/Stimulation.h b/Stimulation.h index 5c0048e..b6e74fe 100644 --- a/Stimulation.h +++ b/Stimulation.h @@ -25,7 +25,7 @@ * to auditory stimulation. * M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born, T Martinetz, * JC Claussen. - * PLoS Computational Biology In Review (in review). + * PLoS Computational Biology (in review). */ /****************************************************************************************************/ @@ -145,7 +145,7 @@ class Stim { std::vector marker_stimulation; /* Random number generator in case of semi-periodic stimulation */ - random_stream_uniform_int Uniform_Distribution; + random_stream_uniform_int Uniform_Distribution; }; /****************************************************************************************************/ /* end */ diff --git a/TC.cpp b/TC.cpp index d816f96..ae2e846 100644 --- a/TC.cpp +++ b/TC.cpp @@ -25,17 +25,14 @@ * to auditory stimulation. * M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born, T Martinetz, * JC Claussen. - * PLoS Computational Biology In Review (in review). + * PLoS Computational Biology (in review). */ /****************************************************************************************************/ -/* Main file for compilation tests */ -/* The Simulation requires the following boost libraries: Random */ +/* Main file for compilation tests */ /****************************************************************************************************/ #include #include -#include "Cortical_Column.h" -#include "Thalamic_Column.h" #include "ODE.h" diff --git a/TC_mex.cpp b/TC_mex.cpp index da470eb..1e18e0f 100644 --- a/TC_mex.cpp +++ b/TC_mex.cpp @@ -32,7 +32,6 @@ /* Implementation of the simulation as MATLAB routine (mex compiler) */ /* mex command is given by: */ /* mex CXXFLAGS="\$CXXFLAGS -std=c++11" TC_mex.cpp Cortical_Column.cpp Thalamic_Column.cpp */ -/* The Simulation requires the following boost libraries: Random */ /****************************************************************************************************/ #include #include "mex.h" @@ -124,7 +123,7 @@ mxArray* GetMexArray(int N, int M) { mxArray* Array = mxCreateDoubleMatrix(0, 0, mxREAL); mxSetM(Array, N); mxSetN(Array, M); - #pragma omp critical +#pragma omp critical {mxSetData(Array, mxMalloc(sizeof(double)*M*N));} return Array; } diff --git a/Thalamic_Column.cpp b/Thalamic_Column.cpp index 4739830..62e7f29 100644 --- a/Thalamic_Column.cpp +++ b/Thalamic_Column.cpp @@ -25,11 +25,11 @@ * to auditory stimulation. * M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born, T Martinetz, * JC Claussen. - * PLoS Computational Biology In Review (in review). + * PLoS Computational Biology (in review). */ /****************************************************************************************************/ -/* Functions of the cortical module */ +/* Functions of the thalamic module */ /****************************************************************************************************/ #include "Thalamic_Column.h" @@ -83,24 +83,24 @@ double Thalamic_Column::get_Qr (int N) const{ /****************************************************************************************************/ /* Excitatory input to TC population */ double Thalamic_Column::I_et (int N) const{ - double I = g_AMPA * y_et[N]* (Vt[N]- E_AMPA); + double I = g_AMPA * s_et[N]* (Vt[N]- E_AMPA); return I; } /* Inhibitory input to TC population */ double Thalamic_Column::I_gt (int N) const{ - double I = g_AMPA * y_rt[N]* (Vt[N]- E_GABA); + double I = g_AMPA * s_rt[N]* (Vt[N]- E_GABA); return I; } /* Excitatory input to RE population */ double Thalamic_Column::I_er (int N) const{ - double I = g_GABA * y_er[N]* (Vr[N]- E_AMPA); + double I = g_GABA * s_er[N]* (Vr[N]- E_AMPA); return I; } /* Inhibitory input to RE population */ double Thalamic_Column::I_gr (int N) const{ - double I = g_GABA * y_rr[N]* (Vr[N]- E_GABA); + double I = g_GABA * s_rr[N]* (Vr[N]- E_GABA); return I; } /****************************************************************************************************/ @@ -255,15 +255,15 @@ void Thalamic_Column::set_RK (int N) { Vt [N+1] = Vt [0] + A[N]*dt*(-(I_L_t(N) + I_et(N) + I_gt(N))/tau_t - (I_LK_t(N) + I_T_t(N) + I_h(N))); Vr [N+1] = Vr [0] + A[N]*dt*(-(I_L_r(N) + I_er(N) + I_gr(N))/tau_r - (I_LK_r(N) + I_T_r(N))); Ca [N+1] = Ca [0] + A[N]*dt*(alpha_Ca * I_T_t(N) - (Ca[N] - Ca_0)/tau_Ca); - y_et [N+1] = y_et [0] + A[N]*dt*(x_et[N]); - y_er [N+1] = y_er [0] + A[N]*dt*(x_er[N]); - y_rt [N+1] = y_rt [0] + A[N]*dt*(x_rt[N]); - y_rr [N+1] = y_rr [0] + A[N]*dt*(x_rr[N]); + s_et [N+1] = s_et [0] + A[N]*dt*(x_et[N]); + s_er [N+1] = s_er [0] + A[N]*dt*(x_er[N]); + s_rt [N+1] = s_rt [0] + A[N]*dt*(x_rt[N]); + s_rr [N+1] = s_rr [0] + A[N]*dt*(x_rr[N]); y [N+1] = y [0] + A[N]*dt*(x [N]); - x_et [N+1] = x_et [0] + A[N]*dt*(pow(gamma_e, 2) * ( + N_pt * Cortex->y[N] - y_et[N]) - 2 * gamma_e * x_et[N]) + noise_xRK(N,0); - x_er [N+1] = x_er [0] + A[N]*dt*(pow(gamma_e, 2) * (N_tr * get_Qt(N) + N_pr * Cortex->y[N] - y_er[N]) - 2 * gamma_e * x_er[N]); - x_rt [N+1] = x_rt [0] + A[N]*dt*(pow(gamma_g, 2) * (N_rt * get_Qr(N) - y_rt[N]) - 2 * gamma_g * x_rt[N]); - x_rr [N+1] = x_rr [0] + A[N]*dt*(pow(gamma_g, 2) * (N_rr * get_Qr(N) - y_rr[N]) - 2 * gamma_g * x_rr[N]); + x_et [N+1] = x_et [0] + A[N]*dt*(pow(gamma_e, 2) * ( + N_pt * Cortex->y[N] - s_et[N]) - 2 * gamma_e * x_et[N]) + noise_xRK(N,0); + x_er [N+1] = x_er [0] + A[N]*dt*(pow(gamma_e, 2) * (N_tr * get_Qt(N) + N_pr * Cortex->y[N] - s_er[N]) - 2 * gamma_e * x_er[N]); + x_rt [N+1] = x_rt [0] + A[N]*dt*(pow(gamma_g, 2) * (N_rt * get_Qr(N) - s_rt[N]) - 2 * gamma_g * x_rt[N]); + x_rr [N+1] = x_rr [0] + A[N]*dt*(pow(gamma_g, 2) * (N_rr * get_Qr(N) - s_rr[N]) - 2 * gamma_g * x_rr[N]); x [N+1] = x [0] + A[N]*dt*(pow(nu, 2) * ( get_Qt(N) - y [N]) - 2 * nu * x [N]); h_T_t [N+1] = h_T_t[0] + A[N]*dt*(h_inf_T_t(N) - h_T_t[N])/tau_h_T_t(N); h_T_r [N+1] = h_T_r[0] + A[N]*dt*(h_inf_T_r(N) - h_T_r[N])/tau_h_T_r(N); @@ -282,10 +282,10 @@ void Thalamic_Column::add_RK(void) { Vt [0] =(-3*Vt [0] + 2*Vt [1] + 4*Vt [2] + 2* Vt [3] + Vt [4])/6; Vr [0] =(-3*Vr [0] + 2*Vr [1] + 4*Vr [2] + 2* Vr [3] + Vr [4])/6; Ca [0] =(-3*Ca [0] + 2*Ca [1] + 4*Ca [2] + 2* Ca [3] + Ca [4])/6; - y_et [0] =(-3*y_et [0] + 2*y_et [1] + 4*y_et [2] + 2* y_et [3] + y_et [4])/6; - y_er [0] =(-3*y_er [0] + 2*y_er [1] + 4*y_er [2] + 2* y_er [3] + y_er [4])/6; - y_rt [0] =(-3*y_rt [0] + 2*y_rt [1] + 4*y_rt [2] + 2* y_rt [3] + y_rt [4])/6; - y_rr [0] =(-3*y_rr [0] + 2*y_rr [1] + 4*y_rr [2] + 2* y_rr [3] + y_rr [4])/6; + s_et [0] =(-3*s_et [0] + 2*s_et [1] + 4*s_et [2] + 2* s_et [3] + s_et [4])/6; + s_er [0] =(-3*s_er [0] + 2*s_er [1] + 4*s_er [2] + 2* s_er [3] + s_er [4])/6; + s_rt [0] =(-3*s_rt [0] + 2*s_rt [1] + 4*s_rt [2] + 2* s_rt [3] + s_rt [4])/6; + s_rr [0] =(-3*s_rr [0] + 2*s_rr [1] + 4*s_rr [2] + 2* s_rr [3] + s_rr [4])/6; y [0] =(-3*y [0] + 2*y [1] + 4*y [2] + 2* y [3] + y [4])/6; x_et [0] =(-3*x_et [0] + 2*x_et [1] + 4*x_et [2] + 2* x_et [3] + x_et [4])/6 + noise_aRK(0); x_er [0] =(-3*x_er [0] + 2*x_er [1] + 4*x_er [2] + 2* x_er [3] + x_er [4])/6; diff --git a/Thalamic_Column.h b/Thalamic_Column.h index 46554bb..cd4421c 100644 --- a/Thalamic_Column.h +++ b/Thalamic_Column.h @@ -25,7 +25,7 @@ * to auditory stimulation. * M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born, T Martinetz, * JC Claussen. - * PLoS Computational Biology In Review (in review). + * PLoS Computational Biology (in review). */ /************************************************************************************************/ @@ -76,7 +76,7 @@ class Thalamic_Column { friend void get_data (int, Cortical_Column&, Thalamic_Column&, vector); friend class Cortical_Column; - /* Set strength of input */ + /* Set strength of external input */ void set_input (double I) {input = I;} private: @@ -149,17 +149,17 @@ class Thalamic_Column { const double gamma_e = 70E-3; const double gamma_g = 100E-3; - /* axonal flux time constant */ + /* Axonal flux time constant in ms^-1*/ const double nu = 120E-3; - /* Conductivities */ - /* Leak in aU */ + /* Leak weight in aU */ const double g_L = 1.; - /* Synaptic conductivity in ms */ + /* Synaptic weights in ms */ const double g_AMPA = 1.; const double g_GABA = 1.; + /* Conductivities */ /* Potassium leak current in mS/m^2 */ const double g_LK = 0.02; @@ -168,7 +168,7 @@ class Thalamic_Column { const double g_T_r = 2.3; /* h current in mS/m^2 */ - const double g_h = 0.051; + const double g_h = 0.06; /* Reversal potentials in mV */ /* Synaptic */ @@ -232,15 +232,15 @@ class Thalamic_Column { vector Vt = _INIT(E_L_t), /* TC membrane voltage */ Vr = _INIT(E_L_r), /* RE membrane voltage */ Ca = _INIT(Ca_0), /* Calcium concentration of TC population */ - y_et = _INIT(0.0), /* PostSP from TC population to TC population */ - y_er = _INIT(0.0), /* PostSP from TC population to RE population */ - y_rt = _INIT(0.0), /* PostSP from RE population to TC population */ - y_rr = _INIT(0.0), /* PostSP from RE population to RE population */ + s_et = _INIT(0.0), /* PostSP from TC population to TC population */ + s_er = _INIT(0.0), /* PostSP from TC population to RE population */ + s_rt = _INIT(0.0), /* PostSP from RE population to TC population */ + s_rr = _INIT(0.0), /* PostSP from RE population to RE population */ y = _INIT(0.0), /* axonal flux */ - x_et = _INIT(0.0), /* derivative of y_et */ - x_er = _INIT(0.0), /* derivative of y_er */ - x_rt = _INIT(0.0), /* derivative of y_rt */ - x_rr = _INIT(0.0), /* derivative of y_rr */ + x_et = _INIT(0.0), /* derivative of s_et */ + x_er = _INIT(0.0), /* derivative of s_er */ + x_rt = _INIT(0.0), /* derivative of s_rt */ + x_rr = _INIT(0.0), /* derivative of s_rr */ x = _INIT(0.0), /* derivative of y */ h_T_t = _INIT(0.0), /* inactivation of T channel */ h_T_r = _INIT(0.0), /* inactivation of T channel */