00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _NEURON_H
00012 #define _NEURON_H
00013
00018 class Neuron
00019 {
00020 public:
00021 Neuron();
00022 Neuron( const Neuron& other );
00023 void setRM( double v );
00024 double getRM() const;
00025 void setRA( double v );
00026 double getRA() const;
00027 void setCM( double v );
00028 double getCM() const;
00029 void setEm( double v );
00030 double getEm() const;
00031 void setTheta( double v );
00032 double getTheta() const;
00033 void setPhi( double v );
00034 double getPhi() const;
00035 void setSourceFile( string v );
00036 string getSourceFile() const;
00037 void setCompartmentLengthInLambdas( double v );
00038 double getCompartmentLengthInLambdas() const;
00039 unsigned int getNumCompartments() const;
00040 unsigned int getNumBranches() const;
00041 vector< double> getPathDistFromSoma() const;
00042 vector< double> getGeomDistFromSoma() const;
00043 vector< double> getElecDistFromSoma() const;
00044 vector< ObjId > getCompartments() const;
00045 vector< ObjId > getExprElist( const Eref& e, string line ) const;
00046 vector< double > getExprVal( const Eref& e, string line ) const;
00047 vector< ObjId > getSpinesFromExpression(
00048 const Eref& e, string line ) const;
00049 void setChannelDistribution( const Eref& e, vector< string > v );
00050 vector< string > getChannelDistribution( const Eref& e ) const;
00051 void setPassiveDistribution( const Eref& e, vector< string > v );
00052 vector< string > getPassiveDistribution( const Eref& e ) const;
00053 void setSpineDistribution( const Eref& e, vector< string > v );
00054 vector< string > getSpineDistribution( const Eref& e ) const;
00055
00056 void buildSegmentTree( const Eref& e );
00057 void setSpineAndPsdMesh( Id spineMesh, Id psdMesh );
00058 void setSpineAndPsdDsolve( Id spineDsolve, Id psdDsolve );
00059
00061
00063 void updateSegmentLengths();
00064 void installSpines( const vector< ObjId >& elist,
00065 const vector< double >& val, const vector< string >& line );
00066 void makeSpacingDistrib(
00067 const vector< ObjId >& elist, const vector< double >& val,
00068 vector< unsigned int >& seglistIndex,
00069 vector< unsigned int >& elistIndex,
00070 vector< double >& pos,
00071 const vector< string >& line ) const;
00072 void parseMechSpec( const Eref& e );
00073 void installMechanism( const string& name,
00074 const vector< ObjId >& elist, const vector< double >& val,
00075 const vector< string >& line );
00076 void buildElist(
00077 const Eref& e,
00078 const vector< string >& line, vector< ObjId >& elist,
00079 vector< double >& val );
00080
00081 void evalExprForElist( const vector< ObjId >& elist,
00082 const string& expn, vector< double >& val ) const;
00083
00085
00087 Spine* lookupSpine( unsigned int index );
00088 void setNumSpines( unsigned int num );
00089 unsigned int getNumSpines() const;
00090
00091 const vector< Id >& spineIds( unsigned int index ) const;
00092 void scaleBufAndRates( unsigned int spineNum,
00093 double lenScale, double diaScale ) const;
00094 void scaleShaftDiffusion( unsigned int spineNum,
00095 double len, double dia) const;
00096 void scaleHeadDiffusion( unsigned int spineNum,
00097 double len, double dia) const;
00098
00102 static const Cinfo* initCinfo();
00103 private:
00104 double RM_;
00105 double RA_;
00106 double CM_;
00107 double Em_;
00108 double theta_;
00109 double phi_;
00110 double maxP_;
00111 double maxG_;
00112 double maxL_;
00113 Id soma_;
00114 string sourceFile_;
00115 double compartmentLengthInLambdas_;
00116 vector< string > channelDistribution_;
00117 vector< string > passiveDistribution_;
00118 vector< string > spineDistribution_;
00119
00121 map< Id, unsigned int > segIndex_;
00123 vector< unsigned int > spineParentSegIndex_;
00124 vector< vector< Id > > spines_;
00125
00126 vector< Id > spineStoich_;
00128 vector< Id > psdStoich_;
00130 vector< unsigned int > spineToMeshOrdering_;
00131
00132 Id headDsolve_;
00133 Id psdDsolve_;
00134
00135
00136
00137
00138
00140 Spine spineEntry_;
00141
00142 vector< Id > segId_;
00143 vector< SwcSegment > segs_;
00144 vector< SwcBranch > branches_;
00145
00146 };
00147
00148
00149
00150 #endif //