Skip to content

Commit

Permalink
Merge pull request #547 from sg-s/no-getfullstatesize
Browse files Browse the repository at this point in the history
No getfullstatesize
  • Loading branch information
sg-s authored Dec 12, 2020
2 parents 99dc6b5 + 80ae5c0 commit 8358165
Show file tree
Hide file tree
Showing 192 changed files with 687 additions and 1,160 deletions.
2 changes: 1 addition & 1 deletion +xolotl/version.m
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
function version()
disp('v20.12.11');
disp('v20.12.12');
4 changes: 2 additions & 2 deletions @xtest/xtest.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
properties

% xolotl objects
single_comp@xolotl
single_comp (1,1) xolotl

stg_network@xolotl
stg_network (1,1) xolotl



Expand Down
12 changes: 6 additions & 6 deletions c++/compartment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ It does the following things:
1. Adds a pointer to the conductance to a vector of pointers called `mech`
2. Updates various attributes of the conductance like verbosity, etc.
3. Tells the mechanism what its ordering in `mech` is by updating `mechanism_idx` in that mechanism object
4. Determines the data frame size of this object by calling `getFullStateSize` and storing this in `mechanism_sizes`
4. Determines the data frame size of this object by reading out `fullStateSize` and storing this in `mechanism_sizes`
**See Also**
Expand All @@ -453,7 +453,7 @@ void compartment::addMechanism(mechanism *mech_) {
n_mech++;

// also store the mechanism's full state size
mechanism_sizes.push_back(mech_->getFullStateSize());
mechanism_sizes.push_back(mech_->fullStateSize);
}

/*
Expand All @@ -473,7 +473,7 @@ void compartment::addSynapse(synapse *syn_) {
n_syn ++;

// also store the synapse's full state size
synapse_sizes.push_back(syn_->getFullStateSize());
synapse_sizes.push_back(syn_->fullStateSize);
}

/*
Expand Down Expand Up @@ -569,7 +569,7 @@ conductance* compartment::getConductancePointer(const char* cond_class) {
conductance* req_cond = NULL;

for (int i = 0; i < n_cond; i ++) {
if ((cond[i]->getClass()) == cond_class) {
if ((cond[i]->name) == cond_class) {
req_cond = cond[i];
}
}
Expand Down Expand Up @@ -640,7 +640,7 @@ what their data dimension is, and adding up all those numbers.
int compartment::getFullMechanismSize(void) {
int full_size = 0;
for (int i=0; i<n_mech; i++) {
full_size += mech[i]->getFullStateSize();
full_size += mech[i]->fullStateSize;
}
return full_size;
}
Expand Down Expand Up @@ -687,7 +687,7 @@ what their data dimension is, and adding up all those numbers.
int compartment::getFullSynapseSize(void) {
int full_size = 0;
for (int i=0; i<n_syn; i++) {
full_size += syn[i]->getFullStateSize();
full_size += syn[i]->fullStateSize;
}
return full_size;
}
Expand Down
13 changes: 7 additions & 6 deletions c++/conductance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ class conductance {
double m = 0;
double h = 1;

string name = "unset";

int verbosity = -1;

int p = 1;
Expand Down Expand Up @@ -162,7 +164,6 @@ class conductance {
virtual void integrateLangevin(double, double);

virtual void connect(compartment*);
virtual string getClass(void) = 0;
virtual double getState(int);
virtual double getCurrent(double);
void checkSolvers(int);
Expand Down Expand Up @@ -222,7 +223,7 @@ void conductance::buildLUT(double approx_channels) {


if (verbosity==0) {
mexPrintf("%s NOT using approximate activation functions because approx_channels is set to 0.\n", getClass().c_str());
mexPrintf("%s NOT using approximate activation functions because approx_channels is set to 0.\n", name.c_str());
}

return;
Expand All @@ -237,7 +238,7 @@ void conductance::buildLUT(double approx_channels) {

if (UseMInfApproximation == 1) {
if (verbosity==0) {
mexPrintf("%s using approximate activation functions\n", getClass().c_str());
mexPrintf("%s using approximate activation functions\n", name.c_str());
}


Expand All @@ -248,13 +249,13 @@ void conductance::buildLUT(double approx_channels) {
}
} else {
if (verbosity==0) {
mexPrintf("%s NOT USING approximate activation functions\n", getClass().c_str());
mexPrintf("%s NOT USING approximate activation functions\n", name.c_str());
}
}

if (UseHInfApproximation == 1) {
if (verbosity==0) {
mexPrintf("%s using approximate in-activation functions\n", getClass().c_str());
mexPrintf("%s using approximate in-activation functions\n", name.c_str());
}

for (int V_int = -999; V_int < 1001; V_int++) {
Expand Down Expand Up @@ -342,7 +343,7 @@ void conductance::checkSolvers(int solver_order) {
} else if (solver_order == 4) {
return;
} else {
mexPrintf("Error using %s", getClass().c_str());
mexPrintf("Error using %s", name.c_str());
mexErrMsgTxt("Unsupported solver order \n");
}
}
Expand Down
5 changes: 3 additions & 2 deletions c++/conductances/GenericKdLike.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ class GenericKdLike: public conductance {

p = 4;

name = "GenericKdLike";

}

double m_inf(double, double);
double tau_m(double, double);
string getClass(void);

};

string GenericKdLike::getClass(){return "GenericKdLike";}


double GenericKdLike::m_inf(double V, double Ca) {return 1.0/(1.0+exp((V-m_V_half)/m_V_slope));}
Expand Down
6 changes: 3 additions & 3 deletions c++/conductances/GenericNaVLike.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ class GenericNaVLike: public conductance {
p = 3;
q = 1;

name = "GenericNaVLike";

}

double m_inf(double, double);
double h_inf(double, double);
double tau_m(double, double);
double tau_h(double, double);
string getClass(void);

};

string GenericNaVLike::getClass(){return "GenericNaVLike";}


double GenericNaVLike::m_inf(double V, double Ca) {return 1.0/(1.0+exp((V-m_V_half)/m_V_slope));}
double GenericNaVLike::h_inf(double V, double Ca) {return 1.0/(1.0+exp((V-h_V_half)/h_V_slope));}
Expand Down
5 changes: 3 additions & 2 deletions c++/conductances/Leak.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@ class Leak: public conductance {

if (isnan (E)) { E = -55; }

name = "Leak";

}


void integrate(double, double);
void integrateMS(int, double, double);
void integrateLangevin(double, double);

string getClass(void);


};

string Leak::getClass(){return "Leak";}

void Leak::integrate(double V, double Ca) {
// do nothing
Expand Down
5 changes: 3 additions & 2 deletions c++/conductances/bronk/EAGes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ class EAGes: public conductance {

p = 1;

name = "EAGes";

}

double m_inf(double V, double Ca);
double tau_m(double, double);
string getClass(void);


};

string EAGes::getClass(){return "EAG";}


double EAGes::m_inf(double V, double Ca) { return (9.29e-4/(Ca+9.29e-4))/(1.0+exp((V+23.12)/-16.94)); }
Expand Down
6 changes: 3 additions & 3 deletions c++/conductances/bronk/EAGmut.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ class EAGmut: public conductance {

if (isnan (E)) { E = -80; }

name = "EAGmut";

p = 1;

}


double m_inf(double V, double Ca);
double tau_m(double, double);
string getClass(void);


};

string EAGmut::getClass(){return "EAG";}


double EAGmut::m_inf(double V, double Ca) { return (.92*(1-.05)/(Ca+.92) + .05)/(1.0+exp((V+23.12)/-16.94)); }
double EAGmut::tau_m(double V, double Ca) {return 5497 - 5500/(1.0+exp((V+251.5 )/-51.5));}
Expand Down
6 changes: 3 additions & 3 deletions c++/conductances/bronk/EAGwt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ class EAGwt: public conductance {

// defaults
if (isnan(gbar)) { gbar = 0; }

if (isnan (E)) { E = -80; }

name = "EAGwt";

p = 1;


}

double m_inf(double V, double Ca);
double tau_m(double, double);
string getClass(void);


};

string EAGwt::getClass(){return "EAG";}

double EAGwt::m_inf(double V, double Ca) { return (9.29e-2/(Ca+9.29e-2))/(1.0+exp((V+23.12)/-16.94)); }
double EAGwt::tau_m(double V, double Ca) {return 5497 - 5500/(1.0+exp((V+251.5 )/-51.5));}
Expand Down
7 changes: 3 additions & 4 deletions c++/conductances/brookings/ACurrent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,20 @@ class ACurrent: public conductance {

p = 3;

name = "ACurrent";

}


double m_inf(double V, double Ca);
double h_inf(double V, double Ca);
double tau_m(double V, double Ca);
double tau_h(double V, double Ca);
string getClass(void);

};


string ACurrent::getClass(){
return "ACurrent";
}



double ACurrent::m_inf(double V, double Ca) {return (1.0/(1.0+exp(((V)+12.3)/-11.8))); }
Expand Down
7 changes: 3 additions & 4 deletions c++/conductances/caplan/MICurrent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,21 @@ class MICurrent: public conductance {

// defaults
if (isnan(gbar)) { gbar = 0; }

if (isnan (E)) { E = 30; }

p = 1;

name = "MICurrent";
}

double m_inf(double V, double Ca);
double h_inf(double V, double Ca);
double tau_m(double V, double Ca);
double tau_h(double V, double Ca);
string getClass(void);


};

string MICurrent::getClass(){return "MICurrent";}



double MICurrent::m_inf(double V, double Ca) {return 1.0/(1.0+exp((V+12.0)/-5));}
Expand Down
9 changes: 3 additions & 6 deletions c++/conductances/chow/Kd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,25 @@ class Kd: public conductance {

// defaults
if (isnan(gbar)) { gbar = 0; }

if (isnan (E)) { E = -77; }

unitary_conductance = 20e-6; // uS

name = "Kd";

p = 4;

}

double m_inf(double, double);
double tau_m(double, double);
string getClass(void);


double Alpha(double);
double Beta(double);

};

string Kd::getClass(){
return "Kd";
}


double Kd::Alpha(double V) {
return 0.01 * (V+55) / (1-exp((V+55)/(-10)));
Expand Down
8 changes: 4 additions & 4 deletions c++/conductances/chow/NaV.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ class NaV: public conductance {

// defaults
if (isnan(gbar)) { gbar = 0; }


if (isnan (E)) { E = 50; }

unitary_conductance = 20e-6; // uS

p = 3;
q = 1;

name = "NaV";

}

double m_inf(double, double);
Expand All @@ -45,10 +45,10 @@ class NaV: public conductance {
double BetaM(double);
double BetaH(double);

string getClass(void);

};

string NaV::getClass(){return "NaV";}



double NaV::AlphaM(double V) {
Expand Down
8 changes: 3 additions & 5 deletions c++/conductances/clay00/Kd2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,17 @@ class Kd2: public conductance {
// need to set E to zero to linearize. Don't worry,
// this is not the reversal potential
E = 0;

name = "Kd2";
}

string getClass(void);


void integrate(double, double);


};

string Kd2::getClass(){
return "Kd2";
}


void Kd2::integrate(double V_, double Ca_){

Expand Down
Loading

0 comments on commit 8358165

Please sign in to comment.