MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <Neuron.h>
Public Member Functions | |
void | buildElist (const Eref &e, const vector< string > &line, vector< ObjId > &elist, vector< double > &val) |
void | buildSegmentTree (const Eref &e) |
Fills up vector of segments. First entry is soma. More... | |
void | evalExprForElist (const vector< ObjId > &elist, const string &expn, vector< double > &val) const |
vector< string > | getChannelDistribution (const Eref &e) const |
double | getCM () const |
double | getCompartmentLengthInLambdas () const |
vector< ObjId > | getCompartments () const |
vector< double > | getElecDistFromSoma () const |
double | getEm () const |
vector< ObjId > | getExprElist (const Eref &e, string line) const |
vector< double > | getExprVal (const Eref &e, string line) const |
vector< double > | getGeomDistFromSoma () const |
unsigned int | getNumBranches () const |
unsigned int | getNumCompartments () const |
unsigned int | getNumSpines () const |
ObjId | getParentCompartmentOfSpine (const Eref &e, ObjId compt) const |
vector< string > | getPassiveDistribution (const Eref &e) const |
vector< double > | getPathDistFromSoma () const |
double | getPhi () const |
double | getRA () const |
double | getRM () const |
string | getSourceFile () const |
vector< string > | getSpineDistribution (const Eref &e) const |
vector< ObjId > | getSpineIdsFromCompartmentIds (const Eref &e, vector< ObjId > compt) const |
vector< ObjId > | getSpinesFromExpression (const Eref &e, string line) const |
vector< ObjId > | getSpinesOnCompartment (const Eref &e, ObjId compt) const |
double | getTheta () const |
void | installMechanism (const string &name, const vector< ObjId > &elist, const vector< double > &val, const vector< string > &line) |
void | installSpines (const vector< ObjId > &elist, const vector< double > &val, const vector< string > &line) |
Spine * | lookupSpine (unsigned int index) |
void | makeSpacingDistrib (const vector< ObjId > &elist, const vector< double > &val, vector< unsigned int > &seglistIndex, vector< unsigned int > &elistIndex, vector< double > &pos, const vector< string > &line) const |
Neuron () | |
Neuron (const Neuron &other) | |
void | parseMechSpec (const Eref &e) |
void | scaleBufAndRates (unsigned int spineNum, double lenScale, double diaScale) const |
void | scaleHeadDiffusion (unsigned int spineNum, double len, double dia) const |
Scale the diffusion parameters due to a change in the head dimensions. More... | |
void | scaleShaftDiffusion (unsigned int spineNum, double len, double dia) const |
Scale the diffusion parameters due to a change in the shaft dimensions. More... | |
void | setChannelDistribution (const Eref &e, vector< string > v) |
void | setCM (double v) |
void | setCompartmentLengthInLambdas (double v) |
void | setEm (double v) |
void | setNumSpines (unsigned int num) |
void | setPassiveDistribution (const Eref &e, vector< string > v) |
void | setPhi (double v) |
void | setRA (double v) |
void | setRM (double v) |
void | setSourceFile (string v) |
void | setSpineAndPsdDsolve (Id spineDsolve, Id psdDsolve) |
void | setSpineAndPsdMesh (Id spineMesh, Id psdMesh) |
Fills up vector of segments. First entry is soma. More... | |
void | setSpineDistribution (const Eref &e, vector< string > v) |
void | setTheta (double v) |
const vector< Id > & | spineIds (unsigned int index) const |
void | updateSegmentLengths () |
Static Public Member Functions | |
static const Cinfo * | initCinfo () |
Private Attributes | |
vector< vector< Id > > | allSpinesPerCompt_ |
Id of each compt in each spine. More... | |
vector< SwcBranch > | branches_ |
vector< string > | channelDistribution_ |
double | CM_ |
double | compartmentLengthInLambdas_ |
double | Em_ |
Id | headDsolve_ |
double | maxG_ |
double | maxL_ |
double | maxP_ |
vector< string > | passiveDistribution_ |
double | phi_ |
Id | psdDsolve_ |
Id of the Dsolve for the head compt. More... | |
vector< Id > | psdStoich_ |
Id of stoich associated with each PSD. Typically all the same. More... | |
double | RA_ |
double | RM_ |
vector< Id > | segId_ |
map< Id, unsigned int > | segIndex_ |
Map to look up Seg index from Id of associated compt. More... | |
vector< SwcSegment > | segs_ |
Id of compartment in each Seg entry, below. More... | |
Id | soma_ |
string | sourceFile_ |
vector< string > | spineDistribution_ |
Spine | spineEntry_ |
Id of the Dsolve for the PSD compt. More... | |
vector< unsigned int > | spineParentSegIndex_ |
Look up seg index of parent compartment, from index of spine. More... | |
vector< vector< Id > > | spines_ |
vector< Id > | spineStoich_ |
Id of stoich associated with each spine. Typically all the same. More... | |
vector< unsigned int > | spineToMeshOrdering_ |
looks up spine/psd mesh index from FieldIndex of selected spine. More... | |
double | theta_ |
Neuron::Neuron | ( | ) |
Definition at line 542 of file Neuron.cpp.
Neuron::Neuron | ( | const Neuron & | other | ) |
Definition at line 562 of file Neuron.cpp.
void Neuron::buildElist | ( | const Eref & | e, |
const vector< string > & | line, | ||
vector< ObjId > & | elist, | ||
vector< double > & | val | ||
) |
Definition at line 1116 of file Neuron.cpp.
References Eref::data(), Id::eref(), evalExprForElist(), Shell::getCwe(), Eref::objId(), path, Shell::setCwe(), and wildcardFind().
Referenced by setChannelDistribution(), setPassiveDistribution(), and setSpineDistribution().
void Neuron::buildSegmentTree | ( | const Eref & | e | ) |
Fills up vector of segments. First entry is soma.
Definition at line 1362 of file Neuron.cpp.
References Neutral::children(), fillSegIndex(), fillSegments(), Eref::id(), Id::path(), segId_, segIndex_, segs_, soma_, and updateSegmentLengths().
Referenced by initCinfo().
void Neuron::evalExprForElist | ( | const vector< ObjId > & | elist, |
const string & | expn, | ||
vector< double > & | val | ||
) | const |
Evaluates expn for every CompartmentBase entry in elist. Pushes value, length and dia for each elist entry into the 'val' vector.
Definition at line 1478 of file Neuron.cpp.
References nuParser::DIA, nuParser::EL, nuParser::eval(), nuParser::EXPR, nuParser::G, Field< A >::get(), nuParser::LEN, nuParser::MAXG, maxG_, nuParser::MAXL, maxL_, nuParser::MAXP, maxP_, nuParser::numVal, nuParser::OLDVAL, nuParser::P, segIndex_, segs_, nuParser::X, nuParser::Y, and nuParser::Z.
Referenced by buildElist(), getExprElist(), and getExprVal().
vector< string > Neuron::getChannelDistribution | ( | const Eref & | e | ) | const |
Definition at line 1158 of file Neuron.cpp.
References channelDistribution_.
Referenced by initCinfo().
double Neuron::getCM | ( | ) | const |
Definition at line 845 of file Neuron.cpp.
References CM_.
Referenced by initCinfo().
double Neuron::getCompartmentLengthInLambdas | ( | ) | const |
Definition at line 899 of file Neuron.cpp.
References compartmentLengthInLambdas_.
Referenced by initCinfo().
vector< ObjId > Neuron::getCompartments | ( | ) | const |
Definition at line 945 of file Neuron.cpp.
References segId_.
Referenced by initCinfo().
vector< double > Neuron::getElecDistFromSoma | ( | ) | const |
Definition at line 937 of file Neuron.cpp.
References segs_.
Referenced by initCinfo().
double Neuron::getEm | ( | ) | const |
Definition at line 855 of file Neuron.cpp.
References Em_.
Referenced by initCinfo().
Digest the path and the math expression to obtain an elist of compartments that satisfy both criteria. The argument 'line' has path followed by the math expression, separated by a space.
Definition at line 959 of file Neuron.cpp.
References Eref::data(), Id::eref(), evalExprForElist(), Shell::getCwe(), nuParser::numVal, Eref::objId(), path, Shell::setCwe(), and wildcardFind().
Referenced by getSpinesFromExpression(), and initCinfo().
vector< double > Neuron::getExprVal | ( | const Eref & | e, |
string | line | ||
) | const |
Digest the path and the math expression to obtain all the values pertaining to the elements in the path. There are nuParser::numVal * elist.size() entries. The argument 'line' has path followed by the math expression, separated by a space.
Definition at line 991 of file Neuron.cpp.
References Eref::data(), Id::eref(), evalExprForElist(), Shell::getCwe(), Eref::objId(), path, Shell::setCwe(), and wildcardFind().
Referenced by initCinfo().
vector< double > Neuron::getGeomDistFromSoma | ( | ) | const |
Definition at line 929 of file Neuron.cpp.
References segs_.
Referenced by initCinfo().
unsigned int Neuron::getNumBranches | ( | ) | const |
Definition at line 916 of file Neuron.cpp.
References branches_.
Referenced by initCinfo().
unsigned int Neuron::getNumCompartments | ( | ) | const |
Definition at line 904 of file Neuron.cpp.
References segId_.
Referenced by initCinfo().
unsigned int Neuron::getNumSpines | ( | ) | const |
Definition at line 2039 of file Neuron.cpp.
References spines_.
Referenced by initCinfo().
Definition at line 1066 of file Neuron.cpp.
References allSpinesPerCompt_, ObjId::id, and segId_.
Referenced by initCinfo().
vector< string > Neuron::getPassiveDistribution | ( | const Eref & | e | ) | const |
Definition at line 1183 of file Neuron.cpp.
References passiveDistribution_.
Referenced by initCinfo().
vector< double > Neuron::getPathDistFromSoma | ( | ) | const |
Definition at line 921 of file Neuron.cpp.
References segs_.
Referenced by initCinfo().
double Neuron::getPhi | ( | ) | const |
Definition at line 877 of file Neuron.cpp.
References phi_.
Referenced by initCinfo().
double Neuron::getRA | ( | ) | const |
Definition at line 833 of file Neuron.cpp.
References RA_.
Referenced by initCinfo().
double Neuron::getRM | ( | ) | const |
Definition at line 821 of file Neuron.cpp.
References RM_.
Referenced by initCinfo().
string Neuron::getSourceFile | ( | ) | const |
Definition at line 889 of file Neuron.cpp.
References sourceFile_.
Referenced by initCinfo().
vector< string > Neuron::getSpineDistribution | ( | const Eref & | e | ) | const |
Definition at line 1205 of file Neuron.cpp.
References spineDistribution_.
Referenced by initCinfo().
vector< ObjId > Neuron::getSpineIdsFromCompartmentIds | ( | const Eref & | e, |
vector< ObjId > | compt | ||
) | const |
Definition at line 1079 of file Neuron.cpp.
References Eref::dataIndex(), Eref::id(), lookupSpine(), spines_, and Id::value().
Referenced by initCinfo().
Definition at line 1009 of file Neuron.cpp.
References allSpinesPerCompt_, getExprElist(), matchBeforeBrace(), path, segId_, and segIndex_.
Referenced by initCinfo().
Definition at line 1050 of file Neuron.cpp.
References allSpinesPerCompt_, ObjId::id, and segIndex_.
Referenced by initCinfo().
double Neuron::getTheta | ( | ) | const |
Definition at line 866 of file Neuron.cpp.
References theta_.
Referenced by initCinfo().
|
static |
Initializes the class info.
Definition at line 106 of file Neuron.cpp.
References buildSegmentTree(), getChannelDistribution(), getCM(), getCompartmentLengthInLambdas(), getCompartments(), getElecDistFromSoma(), getEm(), getExprElist(), getExprVal(), getGeomDistFromSoma(), getNumBranches(), getNumCompartments(), getNumSpines(), getParentCompartmentOfSpine(), getPassiveDistribution(), getPathDistFromSoma(), getPhi(), getRA(), getRM(), getSourceFile(), getSpineDistribution(), getSpineIdsFromCompartmentIds(), getSpinesFromExpression(), getSpinesOnCompartment(), getTheta(), Spine::initCinfo(), Neutral::initCinfo(), lookupSpine(), neuronCinfo, setChannelDistribution(), setCM(), setCompartmentLengthInLambdas(), setEm(), setNumSpines(), setPassiveDistribution(), setPhi(), setRA(), setRM(), setSourceFile(), setSpineAndPsdDsolve(), setSpineAndPsdMesh(), setSpineDistribution(), and setTheta().
void Neuron::installMechanism | ( | const string & | name, |
const vector< ObjId > & | elist, | ||
const vector< double > & | val, | ||
const vector< string > & | line | ||
) |
void Neuron::installSpines | ( | const vector< ObjId > & | elist, |
const vector< double > & | val, | ||
const vector< string > & | line | ||
) |
Now fill in allSpinesPerCompt_ vector. First clear it out.
Definition at line 1974 of file Neuron.cpp.
References addSpine(), allSpinesPerCompt_, coordSystem(), makeAngleDistrib(), makeSizeDistrib(), makeSpacingDistrib(), psdStoich_, segId_, soma_, spineParentSegIndex_, spines_, spineStoich_, and spineToMeshOrdering_.
Referenced by setSpineDistribution().
Spine * Neuron::lookupSpine | ( | unsigned int | index | ) |
Definition at line 2028 of file Neuron.cpp.
References spineEntry_.
Referenced by getSpineIdsFromCompartmentIds(), and initCinfo().
void Neuron::makeSpacingDistrib | ( | const vector< ObjId > & | elist, |
const vector< double > & | val, | ||
vector< unsigned int > & | seglistIndex, | ||
vector< unsigned int > & | elistIndex, | ||
vector< double > & | pos, | ||
const vector< string > & | line | ||
) | const |
Definition at line 1841 of file Neuron.cpp.
References addPos(), nuParser::eval(), nuParser::EXPR, findArg(), nuParser::numVal, segIndex_, and segs_.
Referenced by installSpines().
void Neuron::parseMechSpec | ( | const Eref & | e | ) |
void Neuron::scaleBufAndRates | ( | unsigned int | spineNum, |
double | lenScale, | ||
double | diaScale | ||
) | const |
Definition at line 2055 of file Neuron.cpp.
References doubleEq(), psdStoich_, SetGet2< A1, A2 >::set(), spineStoich_, and spineToMeshOrdering_.
Referenced by Spine::setHeadDiameter(), Spine::setHeadLength(), and Spine::setHeadVolume().
void Neuron::scaleHeadDiffusion | ( | unsigned int | spineNum, |
double | len, | ||
double | dia | ||
) | const |
Scale the diffusion parameters due to a change in the head dimensions.
Definition at line 2106 of file Neuron.cpp.
References Field< A >::get(), headDsolve_, PI, psdDsolve_, SetGet2< A1, A2 >::set(), LookupField< L, A >::set(), and spineToMeshOrdering_.
Referenced by Spine::setHeadDiameter(), Spine::setHeadLength(), and Spine::setHeadVolume().
void Neuron::scaleShaftDiffusion | ( | unsigned int | spineNum, |
double | len, | ||
double | dia | ||
) | const |
Scale the diffusion parameters due to a change in the shaft dimensions.
Definition at line 2094 of file Neuron.cpp.
References headDsolve_, PI, SetGet2< A1, A2 >::set(), and spineToMeshOrdering_.
Referenced by Spine::setShaftDiameter(), and Spine::setShaftLength().
void Neuron::setChannelDistribution | ( | const Eref & | e, |
vector< string > | v | ||
) |
Definition at line 1132 of file Neuron.cpp.
References buildElist(), buildFromProto(), channelDistribution_, parseDistrib(), and setMechParams().
Referenced by initCinfo().
void Neuron::setCM | ( | double | v | ) |
Definition at line 838 of file Neuron.cpp.
References CM_.
Referenced by initCinfo().
void Neuron::setCompartmentLengthInLambdas | ( | double | v | ) |
Definition at line 895 of file Neuron.cpp.
References compartmentLengthInLambdas_.
Referenced by initCinfo().
void Neuron::setEm | ( | double | v | ) |
Definition at line 851 of file Neuron.cpp.
References Em_.
Referenced by initCinfo().
void Neuron::setNumSpines | ( | unsigned int | num | ) |
Ignore it. the number of spines is set when we build the tree.
Definition at line 2033 of file Neuron.cpp.
Referenced by initCinfo().
void Neuron::setPassiveDistribution | ( | const Eref & | e, |
vector< string > | v | ||
) |
Definition at line 1163 of file Neuron.cpp.
References buildElist(), parseDistrib(), passiveDistribution_, and setCompartmentParams().
Referenced by initCinfo().
void Neuron::setPhi | ( | double | v | ) |
Definition at line 872 of file Neuron.cpp.
References phi_.
Referenced by initCinfo().
void Neuron::setRA | ( | double | v | ) |
Definition at line 826 of file Neuron.cpp.
References RA_.
Referenced by initCinfo().
void Neuron::setRM | ( | double | v | ) |
Definition at line 814 of file Neuron.cpp.
References RM_.
Referenced by initCinfo().
void Neuron::setSourceFile | ( | string | v | ) |
Definition at line 883 of file Neuron.cpp.
References sourceFile_.
Referenced by initCinfo().
Definition at line 1462 of file Neuron.cpp.
References headDsolve_, and psdDsolve_.
Referenced by initCinfo().
Fills up vector of segments. First entry is soma.
Definition at line 1410 of file Neuron.cpp.
References Neutral::child(), Element::cinfo(), Id::element(), Id::eref(), Cinfo::isA(), Id::path(), psdStoich_, spines_, spineStoich_, and spineToMeshOrdering_.
Referenced by initCinfo().
void Neuron::setSpineDistribution | ( | const Eref & | e, |
vector< string > | v | ||
) |
Definition at line 1188 of file Neuron.cpp.
References buildElist(), installSpines(), parseDistrib(), and spineDistribution_.
Referenced by initCinfo().
void Neuron::setTheta | ( | double | v | ) |
Definition at line 861 of file Neuron.cpp.
References theta_.
Referenced by initCinfo().
const vector< Id > & Neuron::spineIds | ( | unsigned int | index | ) | const |
Definition at line 2047 of file Neuron.cpp.
References spines_.
Referenced by Spine::getHeadDiameter(), Spine::getHeadLength(), Spine::getShaftDiameter(), Spine::getShaftLength(), Spine::setHeadDiameter(), Spine::setHeadLength(), Spine::setHeadVolume(), Spine::setShaftDiameter(), and Spine::setShaftLength().
void Neuron::updateSegmentLengths | ( | ) |
Definition at line 1333 of file Neuron.cpp.
References Field< A >::get(), maxG_, maxL_, maxP_, segId_, segs_, soma_, and traverseCumulativeDistance().
Referenced by buildSegmentTree().
|
private |
Id of each compt in each spine.
Ids of all spines on each compt, looked up by segIndex of compt.
Definition at line 133 of file Neuron.h.
Referenced by getParentCompartmentOfSpine(), getSpinesFromExpression(), getSpinesOnCompartment(), and installSpines().
|
private |
Definition at line 154 of file Neuron.h.
Referenced by getNumBranches().
|
private |
Definition at line 122 of file Neuron.h.
Referenced by getChannelDistribution(), and setChannelDistribution().
|
private |
|
private |
Definition at line 121 of file Neuron.h.
Referenced by getCompartmentLengthInLambdas(), and setCompartmentLengthInLambdas().
|
private |
|
private |
Definition at line 142 of file Neuron.h.
Referenced by scaleHeadDiffusion(), scaleShaftDiffusion(), and setSpineAndPsdDsolve().
|
private |
Definition at line 117 of file Neuron.h.
Referenced by evalExprForElist(), and updateSegmentLengths().
|
private |
Definition at line 118 of file Neuron.h.
Referenced by evalExprForElist(), and updateSegmentLengths().
|
private |
Definition at line 116 of file Neuron.h.
Referenced by evalExprForElist(), and updateSegmentLengths().
|
private |
Definition at line 123 of file Neuron.h.
Referenced by getPassiveDistribution(), and setPassiveDistribution().
|
private |
|
private |
Id of the Dsolve for the head compt.
Definition at line 143 of file Neuron.h.
Referenced by scaleHeadDiffusion(), and setSpineAndPsdDsolve().
|
private |
Id of stoich associated with each PSD. Typically all the same.
Definition at line 138 of file Neuron.h.
Referenced by installSpines(), scaleBufAndRates(), and setSpineAndPsdMesh().
|
private |
|
private |
|
private |
Definition at line 152 of file Neuron.h.
Referenced by buildSegmentTree(), getCompartments(), getNumCompartments(), getParentCompartmentOfSpine(), getSpinesFromExpression(), installSpines(), and updateSegmentLengths().
|
private |
Map to look up Seg index from Id of associated compt.
Definition at line 127 of file Neuron.h.
Referenced by buildSegmentTree(), evalExprForElist(), getSpinesFromExpression(), getSpinesOnCompartment(), and makeSpacingDistrib().
|
private |
Id of compartment in each Seg entry, below.
Definition at line 153 of file Neuron.h.
Referenced by buildSegmentTree(), evalExprForElist(), getElecDistFromSoma(), getGeomDistFromSoma(), getPathDistFromSoma(), makeSpacingDistrib(), and updateSegmentLengths().
|
private |
Definition at line 119 of file Neuron.h.
Referenced by buildSegmentTree(), installSpines(), and updateSegmentLengths().
|
private |
Definition at line 120 of file Neuron.h.
Referenced by getSourceFile(), and setSourceFile().
|
private |
Definition at line 124 of file Neuron.h.
Referenced by getSpineDistribution(), and setSpineDistribution().
|
private |
|
private |
Look up seg index of parent compartment, from index of spine.
Definition at line 129 of file Neuron.h.
Referenced by installSpines().
|
private |
Definition at line 130 of file Neuron.h.
Referenced by getNumSpines(), getSpineIdsFromCompartmentIds(), installSpines(), setSpineAndPsdMesh(), and spineIds().
|
private |
Id of stoich associated with each spine. Typically all the same.
Definition at line 136 of file Neuron.h.
Referenced by installSpines(), scaleBufAndRates(), and setSpineAndPsdMesh().
|
private |
looks up spine/psd mesh index from FieldIndex of selected spine.
Definition at line 140 of file Neuron.h.
Referenced by installSpines(), scaleBufAndRates(), scaleHeadDiffusion(), scaleShaftDiffusion(), and setSpineAndPsdMesh().
|
private |
Definition at line 114 of file Neuron.h.
Referenced by getTheta(), and setTheta().