const Cinfo* initBinomialRngCinfo() { static Finfo* binomialRngFinfos[] = { new ValueFinfo("n", ValueFtype1< double >::global(), GFCAST( &BinomialRng::getN), RFCAST(&BinomialRng::setN)), new ValueFinfo("p", ValueFtype1< double >::global(), GFCAST( &BinomialRng::getP), RFCAST(&BinomialRng::setP)), new DestFinfo("nDest", Ftype1 < double >::global(), RFCAST(&BinomialRng::setN)), new DestFinfo("pDest", Ftype1 < double >::global(), RFCAST(&BinomialRng::setP)), }; static string doc[] = { "Name", "BinomialRng", "Author", "Subhasis Ray", "Description", "Binomially distributed random number generator.", }; static Cinfo binomialRngCinfo( doc, sizeof( doc ) / sizeof( string ), initRandGeneratorCinfo(), binomialRngFinfos, sizeof(binomialRngFinfos)/sizeof(Finfo*), ValueFtype1<BinomialRng>::global() ); return &binomialRngCinfo; }
Finfo* initCompartmentZombieFinfo() { static Finfo* compartmentFields[] = { new ValueFinfo( "Vm", ValueFtype1< double >::global(), GFCAST( &HSolveHub::getVm ), RFCAST( &HSolveHub::setVm ) ), new ValueFinfo( "Im", ValueFtype1< double >::global(), GFCAST( &HSolveHub::getIm ), &dummyFunc ), new ValueFinfo( "inject", ValueFtype1< double >::global(), GFCAST( &HSolveHub::getInject ), RFCAST( &HSolveHub::setInject ) ), }; static const ThisFinfo* tf = dynamic_cast< const ThisFinfo* >( initCompartmentCinfo()->getThisFinfo() ); assert( tf != 0 ); static SolveFinfo compartmentZombieFinfo( compartmentFields, sizeof( compartmentFields ) / sizeof( Finfo* ), tf, "These fields will replace the original compartment fields so that the lookups refer to the solver rather " "than the compartment." ); return &compartmentZombieFinfo; }
const Cinfo* initPoissonRngCinfo() { static Finfo* poissonRngFinfos[] = { new ValueFinfo("mean", ValueFtype1<double>::global(), GFCAST( &PoissonRng::getMean), RFCAST( &PoissonRng::setMean)), }; static string doc[] = { "Name", "PoissonRng", "Author", "Subhasis Ray", "Description", "Poisson distributed random number generator.", }; static Cinfo poissonRngCinfo( doc, sizeof( doc ) / sizeof( string ), initRandGeneratorCinfo(), poissonRngFinfos, sizeof(poissonRngFinfos)/sizeof(Finfo*), ValueFtype1<PoissonRng>::global() ); return &poissonRngCinfo; }
const Cinfo* initStochSpikeGenCinfo() { static Finfo* stochSpikeGenFinfos[] = { new ValueFinfo( "pr", ValueFtype1< double >::global(), GFCAST( &StochSpikeGen::getPr ), RFCAST( &StochSpikeGen::setPr ), "Release probability." ), }; static string doc[] = { "Name", "StochSpikeGen", "Author", "Subhasis Ray", "Description", "StochSpikeGen object, is a generalization of SpikeGen object " "where it transmits a spike with a release probability specified by " "Pr (=0.95 by default)." }; static Cinfo stochSpikeGenCinfo( doc, sizeof( doc ) / sizeof( string ), initSpikeGenCinfo(), stochSpikeGenFinfos, sizeof( stochSpikeGenFinfos ) / sizeof( Finfo* ), ValueFtype1< StochSpikeGen >::global()); return &stochSpikeGenCinfo; }
Finfo* initHHChannelZombieFinfo() { static Finfo* hhchannelFields[] = { new ValueFinfo( "Gbar", ValueFtype1< double >::global(), GFCAST( &HSolveHub::getHHChannelGbar ), RFCAST( &HSolveHub::setHHChannelGbar ) ), new ValueFinfo( "Ek", ValueFtype1< double >::global(), GFCAST( &HSolveHub::getEk ), RFCAST( &HSolveHub::setEk ) ), new ValueFinfo( "Gk", ValueFtype1< double >::global(), GFCAST( &HSolveHub::getGk ), RFCAST( &HSolveHub::setGk ) ), new ValueFinfo( "Ik", ValueFtype1< double >::global(), GFCAST( &HSolveHub::getIk ), &dummyFunc ), new ValueFinfo( "X", ValueFtype1< double >::global(), GFCAST( &HSolveHub::getX ), RFCAST( &HSolveHub::setX ) ), new ValueFinfo( "Y", ValueFtype1< double >::global(), GFCAST( &HSolveHub::getY ), RFCAST( &HSolveHub::setY ) ), new ValueFinfo( "Z", ValueFtype1< double >::global(), GFCAST( &HSolveHub::getZ ), RFCAST( &HSolveHub::setZ ) ), }; static const ThisFinfo* tf = dynamic_cast< const ThisFinfo* >( initHHChannelCinfo()->getThisFinfo() ); assert( tf != 0 ); static SolveFinfo hhchannelZombieFinfo( hhchannelFields, sizeof( hhchannelFields ) / sizeof( Finfo* ), tf ); return &hhchannelZombieFinfo; }
Finfo* initCaConcZombieFinfo() { static Finfo* caconcFields[] = { new ValueFinfo( "Ca", ValueFtype1< double >::global(), GFCAST( &HSolveHub::getCa ), RFCAST( &HSolveHub::setCa ) ), }; static const ThisFinfo* tf = dynamic_cast< const ThisFinfo* >( initCaConcCinfo()->getThisFinfo() ); assert( tf != 0 ); static SolveFinfo caconcZombieFinfo( caconcFields, sizeof( caconcFields ) / sizeof( Finfo* ), tf ); return &caconcZombieFinfo; }
const Cinfo* initSigNeurCinfo() { static Finfo* sigNeurFinfos[] = { /////////////////////////////////////////////////////// // Field definitions /////////////////////////////////////////////////////// new ValueFinfo( "cellProto", ValueFtype1< Id >::global(), GFCAST( &SigNeur::getCellProto ), RFCAST( &SigNeur::setCellProto ) ), new ValueFinfo( "spineProto", ValueFtype1< Id >::global(), GFCAST( &SigNeur::getSpineProto ), RFCAST( &SigNeur::setSpineProto ) ), new ValueFinfo( "dendProto", ValueFtype1< Id >::global(), GFCAST( &SigNeur::getDendProto ), RFCAST( &SigNeur::setDendProto ) ), new ValueFinfo( "somaProto", ValueFtype1< Id >::global(), GFCAST( &SigNeur::getSomaProto ), RFCAST( &SigNeur::setSomaProto ) ), new ValueFinfo( "cell", ValueFtype1< Id >::global(), GFCAST( &SigNeur::getCell ), &dummyFunc ), new ValueFinfo( "spine", ValueFtype1< Id >::global(), GFCAST( &SigNeur::getSpine ), &dummyFunc ), new ValueFinfo( "dend", ValueFtype1< Id >::global(), GFCAST( &SigNeur::getDend ), &dummyFunc ), new ValueFinfo( "soma", ValueFtype1< Id >::global(), GFCAST( &SigNeur::getSoma ), &dummyFunc ), new ValueFinfo( "cellMethod", ValueFtype1< string >::global(), GFCAST( &SigNeur::getCellMethod ), RFCAST( &SigNeur::setCellMethod ) ), new ValueFinfo( "spineMethod", ValueFtype1< string >::global(), GFCAST( &SigNeur::getSpineMethod ), RFCAST( &SigNeur::setSpineMethod ) ), new ValueFinfo( "dendMethod", ValueFtype1< string >::global(), GFCAST( &SigNeur::getDendMethod ), RFCAST( &SigNeur::setDendMethod ) ), new ValueFinfo( "somaMethod", ValueFtype1< string >::global(), GFCAST( &SigNeur::getSomaMethod ), RFCAST( &SigNeur::setSomaMethod ) ), new ValueFinfo( "sigDt", ValueFtype1< double >::global(), GFCAST( &SigNeur::getSigDt ), RFCAST( &SigNeur::setSigDt ) ), new ValueFinfo( "cellDt", ValueFtype1< double >::global(), GFCAST( &SigNeur::getCellDt ), RFCAST( &SigNeur::setCellDt ) ), new ValueFinfo( "Dscale", ValueFtype1< double >::global(), GFCAST( &SigNeur::getDscale ), RFCAST( &SigNeur::setDscale ) ), new ValueFinfo( "lambda", ValueFtype1< double >::global(), GFCAST( &SigNeur::getLambda ), RFCAST( &SigNeur::setLambda ) ), new ValueFinfo( "parallelMode", ValueFtype1< int >::global(), GFCAST( &SigNeur::getParallelMode ), RFCAST( &SigNeur::setParallelMode ) ), new ValueFinfo( "updateStep", // Time between sig<->neuro updates ValueFtype1< double >::global(), GFCAST( &SigNeur::getUpdateStep ), RFCAST( &SigNeur::setUpdateStep ) ), new LookupFinfo( "channelMap", // Mapping from channels to sig mols LookupFtype< string, string >::global(), GFCAST( &SigNeur::getChannelMap ), RFCAST( &SigNeur::setChannelMap ) ), new LookupFinfo( "calciumMap", // Mapping from calcium to sig. LookupFtype< string, string >::global(), GFCAST( &SigNeur::getCalciumMap ), RFCAST( &SigNeur::setCalciumMap ) ), new ValueFinfo( "calciumScale", ValueFtype1< double >::global(), GFCAST( &SigNeur::getCalciumScale ), RFCAST( &SigNeur::setCalciumScale ) ), new ValueFinfo( "dendInclude", ValueFtype1< string >::global(), GFCAST( &SigNeur::getDendInclude ), RFCAST( &SigNeur::setDendInclude ) ), new ValueFinfo( "dendExclude", ValueFtype1< string >::global(), GFCAST( &SigNeur::getDendExclude ), RFCAST( &SigNeur::setDendExclude ) ), // Would be nice to have a way to include synaptic input into // the mGluR input. /////////////////////////////////////////////////////// // MsgSrc definitions /////////////////////////////////////////////////////// /////////////////////////////////////////////////////// // MsgDest definitions /////////////////////////////////////////////////////// new DestFinfo( "build", Ftype0::global(), RFCAST( &SigNeur::build ) ), /////////////////////////////////////////////////////// // Synapse definitions /////////////////////////////////////////////////////// /////////////////////////////////////////////////////// // Shared definitions /////////////////////////////////////////////////////// }; // Schedule it to tick 1 stage 0 // static SchedInfo schedInfo[] = { { process, 0, 0 } }; static string doc[] = { "Name", "SigNeur", "Author", "Upinder S. Bhalla, 2007, NCBS", "Description", "SigNeur: Multiscale simulation setup object for doing combined electrophysiological " "and signaling models of neurons. Takes the geometry from the neuronal model and " "sets up diffusion between signaling models to fit in this geometry. Arranges " "interfaces between channel conductances and molecular species representing " "channels.Also interfaces calcium conc in the two kinds of model.", }; static Cinfo sigNeurCinfo( doc, sizeof( doc ) / sizeof( string ), initNeutralCinfo(), sigNeurFinfos, sizeof( sigNeurFinfos )/sizeof(Finfo *), ValueFtype1< SigNeur >::global() ); // methodMap.size(); // dummy function to keep compiler happy. return &sigNeurCinfo; }
const Cinfo* initIzhikevichNrnCinfo() { static Finfo* processShared[] = { new DestFinfo( "process", Ftype1< ProcInfo >::global(), RFCAST( &IzhikevichNrn::processFunc )), new DestFinfo( "reinit", Ftype1< ProcInfo >::global(), RFCAST( &IzhikevichNrn::reinitFunc )), }; static Finfo* process = new SharedFinfo("process", processShared, sizeof(processShared) / sizeof(Finfo*), "This is a shared message to receive Process messages from the scheduler objects. " "The first entry is a MsgDest for the Process operation. It has a single argument,ProcInfo, " "which holds lots of information about current time, thread, dt and so on. " "The second entry is a MsgDest for the Reinit operation. " "It also uses ProcInfo."); static Finfo* izhikevichNrnFinfos[] = { new ValueFinfo("Vmax", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getVmax), RFCAST(&IzhikevichNrn::setVmax), "Maximum membrane potential. Membrane potential is reset to c whenever" " it reaches Vmax. NOTE: Izhikevich model specifies the PEAK voltage," " rather than THRSHOLD voltage. The threshold depends on the previous" " history."), new ValueFinfo("c", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getC), RFCAST(&IzhikevichNrn::setC), "Reset potential. Membrane potential is reset to c whenever it reaches" " Vmax."), new ValueFinfo("d", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getD), RFCAST(&IzhikevichNrn::setD), "Parameter d in Izhikevich model. Unit is V/s."), new ValueFinfo("a", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getA), RFCAST(&IzhikevichNrn::setA), "Parameter a in Izhikevich model. Unit is s^-1"), new ValueFinfo("b", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getB), RFCAST(&IzhikevichNrn::setB), "Parameter b in Izhikevich model. Unit is s^-1"), new ValueFinfo("Vm", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getVm), RFCAST(&IzhikevichNrn::setVm), "Membrane potential, equivalent to v in Izhikevich equation."), new ValueFinfo("u", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getU), RFCAST(&dummyFunc), "Parameter u in Izhikevich equation. Unit is V/s^-1"), new ValueFinfo("Im", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getInject), RFCAST(&dummyFunc), "Total current going through the membrane. Unit is A."), new ValueFinfo("initVm", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getInitVm), RFCAST(&IzhikevichNrn::setInitVm), "Initial membrane potential. Unit is V."), new ValueFinfo("initU", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getInitU), RFCAST(&IzhikevichNrn::setInitU), "Initial value of u."), new ValueFinfo("alpha", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getAlpha), RFCAST(&IzhikevichNrn::setAlpha), "Coefficient of v^2 in Izhikevich equation. Defaults to 0.04 in" " physiological unit. In SI it should be 40000.0. Unit is V^-1 s^-1"), new ValueFinfo("beta", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getBeta), RFCAST(&IzhikevichNrn::setBeta), "Coefficient of v in Izhikevich model. Defaults to 5 in physiological" " unit, 5000.0 for SI units. Unit is s^-1"), new ValueFinfo("gamma", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getGamma), RFCAST(&IzhikevichNrn::setGamma), "Constant term in Izhikevich model. Defaults to 140 in both" " physiological and SI units. unit is V/s."), new ValueFinfo("Rm", ValueFtype1<double>::global(), GFCAST(&IzhikevichNrn::getRm), RFCAST(&IzhikevichNrn::setRm), "Hidden cefficient of input current term (I) in Izhikevich model. Defaults to 1e6 Ohm."), /////////////////////////////// // MsgSrc definition /////////////////////////////// new SrcFinfo("VmSrc", Ftype1<double>::global()), new SrcFinfo("eventSrc", Ftype1<double>::global(), "Sends out a trigger for an event whenever Vm >= c."), /////////////////////////////// // MsgDest definition /////////////////////////////// new DestFinfo("injectDest", Ftype1< double >::global(), RFCAST( &IzhikevichNrn::setInject), "Injection current into the neuron."), new DestFinfo("cDest", Ftype1< double >::global(), RFCAST(&IzhikevichNrn::setC), "Destination message to modify parameter c at runtime."), new DestFinfo("dDest", Ftype1< double >::global(), RFCAST(&IzhikevichNrn::setD), "Destination message to modify parameter d at runtime."), new DestFinfo("aDest", Ftype1<double>::global(), RFCAST(&IzhikevichNrn::setA), "Destination message modify parameter a at runtime."), new DestFinfo("bDest", Ftype1<double>::global(), RFCAST(&IzhikevichNrn::setB), "Destination message to modify parameter b at runtime"), /////////////////////////////// // SharedFinfos /////////////////////////////// process, }; static SchedInfo schedInfo[] = { {process, 0, 0 },}; static string doc[] = { "Name", "IzhikevichNrn", "Author", "Subhasis Ray", "Description", "Izhikevich model of spiking neuron " "(Izhikevich,EM. 2003. Simple model of spiking neurons. Neural" " Networks, IEEE Transactions on 14(6). pp 1569–1572).\n" " This class obeys the equations (in physiological units):\n" " dVm/dt = 0.04 * Vm^2 + 5 * Vm + 140 - u + inject\n" " du/dt = a * (b * Vm - u)\n" " if Vm >= Vmax then Vm = c and u = u + d\n" " Vmax = 30 mV in the paper." }; static Cinfo izhikevichNrnCinfo( doc, sizeof(doc) / sizeof(string), initNeutralCinfo(), izhikevichNrnFinfos, sizeof(izhikevichNrnFinfos) / sizeof(Finfo*), ValueFtype1<IzhikevichNrn>::global(), schedInfo, 1); return &izhikevichNrnCinfo; }
const Cinfo* initInputEventPortCinfo() { static Finfo* processShared[] = { new DestFinfo( "process", Ftype1< ProcInfo >::global(), dummyFunc ), new DestFinfo( "reinit", Ftype1< ProcInfo >::global(), RFCAST( &InputEventPort::reinitFunc ) ) }; static Finfo* process = new SharedFinfo( "process", processShared, sizeof( processShared ) / sizeof( Finfo* ), "This is a shared message to receive Process messages from the scheduler objects." ); static Finfo* inputEventPortFinfos[] = { new ValueFinfo( "isConnected", ValueFtype1< unsigned int >::global(), GFCAST( &InputEventPort::getIsConnected ), &dummyFunc ), new ValueFinfo( "width", ValueFtype1< unsigned int >::global(), GFCAST( &InputEventPort::getWidth ), &dummyFunc ), new ValueFinfo( "accLatency", ValueFtype1< double >::global(), GFCAST( &InputEventPort::getAccLatency ), RFCAST( &InputEventPort::setAccLatency ) ), new ValueFinfo( "maxBuffered", ValueFtype1< int >::global(), GFCAST( &InputEventPort::getMaxBuffered ), RFCAST( &InputEventPort::setMaxBuffered ) ), new DestFinfo( "initialise", Ftype3< unsigned int, unsigned int, MUSIC::EventInputPort* >::global(), RFCAST( &InputEventPort::initialiseFunc ) ), ////////////////////////////////////////////////////////////////// // SharedFinfos ////////////////////////////////////////////////////////////////// process, }; static SchedInfo schedInfo[] = { { process, 0, 0 } }; static string doc[] = { "Name", "InputEventPort", "Author", "Niraj Dudani and Johannes Hjorth", "Description", "InputEventPort for communciation with the MUSIC API", }; static Cinfo inputEventPortCinfo( doc, sizeof( doc ) / sizeof( string ), initNeutralCinfo(), inputEventPortFinfos, sizeof( inputEventPortFinfos ) / sizeof( Finfo* ), ValueFtype1< InputEventPort >::global(), schedInfo, 1 ); return &inputEventPortCinfo; }
const Cinfo* initOutputEventPortCinfo() { static Finfo* processShared[] = { new DestFinfo( "process", Ftype1< ProcInfo >::global(), dummyFunc ), new DestFinfo( "reinit", Ftype1< ProcInfo >::global(), RFCAST( &OutputEventPort::reinitFunc ) ) }; static Finfo* process = new SharedFinfo( "process", processShared, sizeof( processShared ) / sizeof( Finfo* ) ); static Finfo* outputEventPortFinfos[] = { new ValueFinfo( "isConnected", ValueFtype1< unsigned int >::global(), GFCAST( &OutputEventPort::getIsConnected ), &dummyFunc ), new ValueFinfo( "width", ValueFtype1< unsigned int >::global(), GFCAST( &OutputEventPort::getWidth ), &dummyFunc ), new ValueFinfo( "maxBuffered", ValueFtype1< int >::global(), GFCAST( &OutputEventPort::getMaxBuffered ), RFCAST( &OutputEventPort::setMaxBuffered ) ), new DestFinfo( "initialise", Ftype3< unsigned int, unsigned int, MUSIC::EventOutputPort* >::global(), RFCAST( &OutputEventPort::initialiseFunc ) ), process }; /** * Music ports should be initialized before the MusicManager gets initialized. * In the default autoschedule, * * By default, /music is connected to clock 0, stage 1. In some cases it is * possible to attach /music to a slow clock. */ static SchedInfo schedInfo[] = { { process, 0, 0 } }; static string doc[] = { "Name", "OutputEventPort", "Author", "Niraj Dudani and Johannes Hjorth", "Description", "OutputEventPort for communciation with the MUSIC API", }; static Cinfo outputEventPortCinfo( doc, sizeof( doc ) / sizeof( string ), initNeutralCinfo(), outputEventPortFinfos, sizeof( outputEventPortFinfos ) / sizeof( Finfo* ), ValueFtype1< OutputEventPort >::global(), schedInfo, 1 ); return &outputEventPortCinfo; }
const Cinfo* initGssaStoichCinfo() { static Finfo* processShared[] = { new DestFinfo( "process", Ftype1< ProcInfo >::global(), RFCAST( &GssaStoich::processFunc )), new DestFinfo( "reinit", Ftype1< ProcInfo >::global(), RFCAST( &GssaStoich::reinitFunc )), }; static Finfo* process = new SharedFinfo( "process", processShared, sizeof( processShared ) / sizeof( Finfo* ) ); //These are the fields of the stoich class static Finfo* gssaStoichFinfos[] = { /////////////////////////////////////////////////////// // Field definitions /////////////////////////////////////////////////////// new ValueFinfo( "method", ValueFtype1< string >::global(), GFCAST( &GssaStoich::getMethod ), RFCAST( &GssaStoich::setMethod ) ), /* * Inherited. Get rid of after testing. new ValueFinfo( "path", ValueFtype1< string >::global(), GFCAST( &GssaStoich::getPath ), RFCAST( &GssaStoich::setPath ) ), */ /////////////////////////////////////////////////////// // MsgSrc definitions /////////////////////////////////////////////////////// /////////////////////////////////////////////////////// // MsgDest definitions /////////////////////////////////////////////////////// /////////////////////////////////////////////////////// // Shared definitions /////////////////////////////////////////////////////// /* new SharedFinfo( "integrate", integrateShared, sizeof( integrateShared )/ sizeof( Finfo* ) ), new SharedFinfo( "gssa", gssaShared, sizeof( gssaShared )/ sizeof( Finfo* ) ), */ process, }; static SchedInfo schedInfo[] = { { process, 0, 0 } }; static string doc[] = { "Name", "GssaStoich", "Author", "Upinder S. Bhalla, 2008, NCBS", "Description", "GssaStoich: Gillespie Stochastic Simulation Algorithm object.Closely based on the " "Stoich object and inherits its handling functions for constructing the matrix. Sets up " "stoichiometry matrix based calculations from a\nwildcard path for the reaction system.Knows how to " "compute derivatives for most common things, also knows how to handle special cases where the object " "will have to do its own computation.Generates a stoichiometry matrix, which is useful for lots of " "other operations as well.", }; static Cinfo gssaStoichCinfo( doc, sizeof( doc ) / sizeof( string ), initStoichCinfo(), gssaStoichFinfos, sizeof( gssaStoichFinfos )/sizeof(Finfo *), ValueFtype1< GssaStoich >::global(), schedInfo, 1 ); return &gssaStoichCinfo; }
const Cinfo* initBinSynchanCinfo() { static Finfo* processShared[] = { new DestFinfo( "process", Ftype1< ProcInfo >::global(), RFCAST( &BinSynchan::processFunc ) ), new DestFinfo( "reinit", Ftype1< ProcInfo >::global(), RFCAST( &BinSynchan::reinitFunc ) ), }; static Finfo* process = new SharedFinfo( "process", processShared, sizeof( processShared ) / sizeof( Finfo* ), "This is a shared message to receive Process message from the scheduler." ); static Finfo* channelShared[] = { new SrcFinfo( "channel", Ftype2< double, double >::global() ), new DestFinfo( "Vm", Ftype1< double >::global(), RFCAST( &BinSynchan::channelFunc ) ), }; /////////////////////////////////////////////////////// // Field definitions /////////////////////////////////////////////////////// static Finfo* binSynchanFinfos[] = { new ValueFinfo( "Gbar", ValueFtype1< double >::global(), GFCAST( &BinSynchan::getGbar ), RFCAST( &BinSynchan::setGbar ) ), new ValueFinfo( "Ek", ValueFtype1< double >::global(), GFCAST( &BinSynchan::getEk ), RFCAST( &BinSynchan::setEk ) ), new ValueFinfo( "tau1", ValueFtype1< double >::global(), GFCAST( &BinSynchan::getTau1 ), RFCAST( &BinSynchan::setTau1 ) ), new ValueFinfo( "tau2", ValueFtype1< double >::global(), GFCAST( &BinSynchan::getTau2 ), RFCAST( &BinSynchan::setTau2 ) ), new ValueFinfo( "normalizeWeights", ValueFtype1< bool >::global(), GFCAST( &BinSynchan::getNormalizeWeights ), RFCAST( &BinSynchan::setNormalizeWeights ) ), new ValueFinfo( "Gk", ValueFtype1< double >::global(), GFCAST( &BinSynchan::getGk ), RFCAST( &BinSynchan::setGk ) ), new ValueFinfo( "Ik", ValueFtype1< double >::global(), GFCAST( &BinSynchan::getIk ), RFCAST( &BinSynchan::setIk ) ), new ValueFinfo( "numSynapses", ValueFtype1< unsigned int >::global(), GFCAST( &BinSynchan::getNumSynapses ), &dummyFunc // Prohibit reassignment of this index. ), new LookupFinfo( "weight", LookupFtype< double, unsigned int >::global(), GFCAST( &BinSynchan::getWeight ), RFCAST( &BinSynchan::setWeight ) ), new LookupFinfo( "delay", LookupFtype< double, unsigned int >::global(), GFCAST( &BinSynchan::getDelay ), RFCAST( &BinSynchan::setDelay ) ), new LookupFinfo( "poolSize", LookupFtype< int, unsigned int >::global(), GFCAST( &BinSynchan::getPoolSize ), RFCAST( &BinSynchan::setPoolSize ) ), new LookupFinfo( "releaseP", LookupFtype< double, unsigned int>::global(), GFCAST( &BinSynchan::getReleaseP ), RFCAST( &BinSynchan::setReleaseP ) ), new LookupFinfo( "releaseCount", LookupFtype< double, unsigned int>::global(), GFCAST( &BinSynchan::getReleaseCount ), &dummyFunc ), /////////////////////////////////////////////////////// // Shared message definitions /////////////////////////////////////////////////////// process, new SharedFinfo( "channel", channelShared, sizeof( channelShared ) / sizeof( Finfo* ), "This is a shared message to couple channel to compartment. " "The first entry is a MsgSrc to send Gk and Ek to the compartment. " "The second entry is a MsgDest for Vm from the compartment. " ), /////////////////////////////////////////////////////// // MsgSrc definitions /////////////////////////////////////////////////////// new SrcFinfo( "IkSrc", Ftype1< double >::global() ), new SrcFinfo( "origChannel", Ftype2< double, double >:: global() ), /////////////////////////////////////////////////////// // MsgDest definitions /////////////////////////////////////////////////////// new DestFinfo( "synapse", Ftype1< double >::global(), RFCAST( &BinSynchan::synapseFunc ), "Arrival of a spike. Arg is time of sending of spike." ), new DestFinfo( "activation", Ftype1< double >::global(), RFCAST( &BinSynchan::activationFunc ), "Sometimes we want to continuously activate the channel" ), new DestFinfo( "modulator", Ftype1< double >::global(), RFCAST( &BinSynchan::modulatorFunc ), "Modulate channel response" ), }; // BinSynchan is scheduled after the compartment calculations. static SchedInfo schedInfo[] = { { process, 0, 1 } }; static string doc[] = { "Name", "BinSynchan", "Author", "Upinder S. Bhalla, 2007, NCBS", "Description", "BinSynchan: Synaptic channel incorporating weight and delay. Does not " "handle activity-dependent modification, see HebbBinSynchan for that. " "Very similiar to the old synchan from GENESIS.", }; static Cinfo binSynchanCinfo( doc, sizeof( doc ) / sizeof( string ), initNeutralCinfo(), binSynchanFinfos, sizeof( binSynchanFinfos )/sizeof(Finfo *), ValueFtype1< BinSynchan >::global(), schedInfo, 1 ); return &binSynchanCinfo; }
const Cinfo* initPulseGenCinfo() { static Finfo* processShared[] = { new DestFinfo( "process", Ftype1<ProcInfo>::global(), RFCAST(&PulseGen::processFunc)), new DestFinfo( "reinit", Ftype1<ProcInfo>::global(), RFCAST( &PulseGen::reinitFunc)), }; static Finfo* process = new SharedFinfo( "process", processShared, sizeof(processShared)/sizeof(Finfo*)); static Finfo* pulseGenFinfos[] = { new ValueFinfo("firstLevel", ValueFtype1<double>::global(), GFCAST( &PulseGen::getFirstLevel), RFCAST( &PulseGen::setFirstLevel), "Amplitude of the first pulse output."), new ValueFinfo("firstWidth", ValueFtype1<double>::global(), GFCAST( &PulseGen::getFirstWidth), RFCAST( &PulseGen::setFirstWidth), "Duration of the first pulse output."), new ValueFinfo("firstDelay", ValueFtype1<double>::global(), GFCAST( &PulseGen::getFirstDelay), RFCAST( &PulseGen::setFirstDelay), "Delay to first pulse output. In FREE RUN mode, this is the interval" \ "from the end of the previous pulse till the start of the first pulse." \ "In case of TRIGGERED mode, this is how long it takes to start the " "triggered pulse after the start of the triggering pulse." "NOTE: If another triggering pulse comes before the triggered pulse " "was generated, the triggered pulse will be lost as the last trigger " "time is reset to the latest one and the pulsegen never reaches a state " "where the time interval since the last trigger input never crosses " "firstDelay."), new ValueFinfo("secondLevel", ValueFtype1<double>::global(), GFCAST( &PulseGen::getSecondLevel), RFCAST( &PulseGen::setSecondLevel), "Amplitude of the second pulse. Default value: 0"), new ValueFinfo("secondWidth", ValueFtype1<double>::global(), GFCAST( &PulseGen::getSecondWidth), RFCAST( &PulseGen::setSecondWidth), "Duration of the second pulse. Default value: 0"), new ValueFinfo("secondDelay", ValueFtype1<double>::global(), GFCAST( &PulseGen::getSecondDelay), RFCAST( &PulseGen::setSecondDelay), "Time interval between first and second pulse. If 0, there will be no " "second pulse. Default value: 0"), new ValueFinfo("baseLevel", ValueFtype1<double>::global(), GFCAST( &PulseGen::getBaseLevel), RFCAST( &PulseGen::setBaseLevel), "Baseline output (when no pulse is being generated). Default value: 0."), new ValueFinfo("output", ValueFtype1<double>::global(), GFCAST( &PulseGen::getOutput), &dummyFunc, "Pulse output."), new ValueFinfo("trigTime", ValueFtype1<double>::global(), GFCAST( &PulseGen::getTrigTime), RFCAST( &PulseGen::setTrigTime), "Time since last time the input switched from 0 to non-zero. This is " "supposed to be an internal variable, but old GENESIS scripts use this " "field to generate a single pulse. If you set trigTime to a positive " "value after reset, a single output will be generated at firstDelay " "time."), new ValueFinfo("count", ValueFtype1<int>::global(), GFCAST( &PulseGen::getCount), RFCAST( &PulseGen::setCount), "Number of pulses in each period. Default is 2, where the second is " "same as baseline at delay 0 with width 0."), new LookupFinfo("width", LookupFtype<double, int>::global(), GFCAST( &PulseGen::getWidth), RFCAST( &PulseGen::setWidth), "Width of i-th pulse in a period. Before you can set this, make sure " "you have >= i pulses using pulseCount field."), new LookupFinfo("delay", LookupFtype<double, int>::global(), GFCAST( &PulseGen::getDelay), RFCAST( &PulseGen::setDelay), "Delay of i-th pulse in a period. Before you can set this, make sure" " you have >= i pulses using pulseCount field."), new LookupFinfo("level", LookupFtype<double, int>::global(), GFCAST( &PulseGen::getLevel), RFCAST( &PulseGen::setLevel), "Amplitude of i-th pulse in a period. Before you can set this, make" " sure you have >= i pulses using pulseCount field."), new ValueFinfo("trigMode", ValueFtype1<int>::global(), GFCAST( &PulseGen::getTrigMode), RFCAST( &PulseGen::setTrigMode), "TRIGGER MODES: \n" "trig_mode = 0 free run \n" "trig_mode = 1 ext. trig \n" "trig_mode = 2 ext. gate" ), new ValueFinfo("prevInput", ValueFtype1<int>::global(), GFCAST( &PulseGen::getPreviousInput), &dummyFunc), ////////////////////////////////////////////////////////////////// // SharedFinfos ////////////////////////////////////////////////////////////////// process, /////////////////////////////////////////////////////// // MsgSrc definitions /////////////////////////////////////////////////////// new SrcFinfo("outputSrc", Ftype1<double>::global()), ////////////////////////////////////////////////////////////////// // MessageDestinations ////////////////////////////////////////////////////////////////// new DestFinfo("input", Ftype1<double>::global(), RFCAST(&PulseGen::inputFunc)), new DestFinfo("levelDest", Ftype2<int, double>::global(), RFCAST( &PulseGen::setLevelFunc)), new DestFinfo("widthDest", Ftype2<int, double>::global(), RFCAST( &PulseGen::setWidthFunc)), new DestFinfo("delayDest", Ftype2<int, double>::global(), RFCAST( & PulseGen::setDelayFunc)), }; static SchedInfo schedInfo[] = { { process, 0, 0 } }; static string doc[] = { "Name", "PulseGen", "Author", "Subhasis Ray, 2007, NCBS", "Description", "PulseGen: general purpose pulse generator. This can generate any " "number of pulses with specified level and duration.", }; static Cinfo pulseGenCinfo( doc, sizeof( doc ) / sizeof( string ), initNeutralCinfo(), pulseGenFinfos, sizeof(pulseGenFinfos)/sizeof(Finfo*), ValueFtype1<PulseGen>::global(), schedInfo, 1); return &pulseGenCinfo; }
const Cinfo* initKinSynChanCinfo() { static Finfo* KinSynChanFinfos[] = { new ValueFinfo("rInf", ValueFtype1< double >::global(), GFCAST(&KinSynChan::getRinf), RFCAST(&KinSynChan::setRinf), "The fraction of bound receptors at steady state."), new ValueFinfo( "tau1", ValueFtype1< double >::global(), GFCAST( &SynChan::getTau1 ), RFCAST( &SynChan::setTau1 ), "Decay time constant for the synaptic conductance. This corresponds to 1/beta in [Destexhe, Mainen and Sejnowski, 1994]. You can set this tau1 or rInf, one deciding the value of the other." ), // new ValueFinfo( "tau2", ValueFtype1< double >::global(), // GFCAST( &KinSynChan::getTau2 ), // RFCAST( &KinSynChan::setTau2 ), // "Rise time constant for the synaptic conductance. It is calculated using rInf and tau1 [See: Destexhe, Mainen and Sejnowski, 1994. It corresponds to tau_r in that paper]." // ), // new ValueFinfo( "tauR", ValueFtype1< double >::global(), // GFCAST( &SynChan::getTau2 ), // RFCAST( &SynChan::setTau2 ), // "Rise time constant for the synaptic conductance. It is calculated using rInf and tau1 [See: Destexhe, Mainen and Sejnowski, 1994. It corresponds to tau_r in that paper.]" // ), new ValueFinfo( "pulseWidth", ValueFtype1< double >::global(), GFCAST( &KinSynChan::getPulseWidth ), RFCAST( &KinSynChan::setPulseWidth ), "The duration of the neuroTransmitter pulse. [See: Destexhe, Mainen and Sejnowski, 1994. It corresponds to t1 in that paper.]" ), /////////////////////////////////////////////////////// // MsgSrc definitions /////////////////////////////////////////////////////// /////////////////////////////////////////////////////// // MsgDest definitions /////////////////////////////////////////////////////// }; static string doc[] = { "Name", "KinSynChan", "Author", "Aditya Gilra and Subhasis Ray, 2010, NCBS", "Description", "KinSynChan: Synaptic channel incorporating kinetic model of receptor binding. " "From Destexhe, Mainen and Sejnowski, 1994" "Handles saturation of synapse. Incorporates weight and delay. Does not " "handle activity-dependent modification, see HebbSynChan for that. " }; static Cinfo KinSynChanCinfo( doc, sizeof( doc ) / sizeof( string ), initSynChanCinfo(), KinSynChanFinfos, sizeof( KinSynChanFinfos )/sizeof(Finfo *), ValueFtype1< KinSynChan >::global()); return &KinSynChanCinfo; }
const Cinfo* initGHKCinfo() { static Finfo* processShared[] = { new DestFinfo( "process", Ftype1< ProcInfo >::global(), RFCAST( &GHK::processFunc ) ), new DestFinfo( "reinit", Ftype1< ProcInfo >::global(), RFCAST( &GHK::reinitFunc ) ), }; static Finfo* process = new SharedFinfo( "process", processShared, sizeof( processShared ) / sizeof( Finfo* ) ); static Finfo* channelShared[] = { new SrcFinfo( "channel", Ftype2< double, double >::global() ), new DestFinfo( "Vm", Ftype1< double >::global(), RFCAST( &GHK::channelFunc ) ), }; static Finfo* ghkShared[] = { new SrcFinfo( "Vm", Ftype1< double >::global() ), new DestFinfo( "permeability", Ftype1< double >::global(), RFCAST( &GHK::addPermeability ) ), }; //!! Need to add channelFunc static Finfo* GHKFinfos[] = { new ValueFinfo( "Ik", ValueFtype1< double >::global(), GFCAST( &GHK::getIk ), &dummyFunc ), new ValueFinfo( "Gk", ValueFtype1< double >::global(), GFCAST( &GHK::getGk ), &dummyFunc ), new ValueFinfo( "Ek", ValueFtype1< double >::global(), GFCAST( &GHK::getEk ), &dummyFunc ), new ValueFinfo( "T", ValueFtype1< double >::global(), GFCAST( &GHK::getTemperature ), RFCAST( &GHK::setTemperature ) ), new ValueFinfo( "p", ValueFtype1< double >::global(), GFCAST( &GHK::getPermeability ), RFCAST( &GHK::setPermeability ) ), new ValueFinfo( "Vm", ValueFtype1< double >::global(), GFCAST( &GHK::getVm ), RFCAST( &GHK::setVm ) ), new ValueFinfo( "Cin", ValueFtype1< double >::global(), GFCAST( &GHK::getCin ), RFCAST( &GHK::setCin ) ), new ValueFinfo( "Cout", ValueFtype1< double >::global(), GFCAST( &GHK::getCout ), RFCAST( &GHK::setCout ) ), new ValueFinfo( "valency", ValueFtype1< double >::global(), GFCAST( &GHK::getValency ), RFCAST( &GHK::setValency ) ), process, new SrcFinfo( "IkSrc", Ftype1< double >::global() ), new DestFinfo( "CinDest", Ftype1< double >::global(), RFCAST( &GHK::setCin ) ), new DestFinfo( "CoutDest", Ftype1< double >::global(), RFCAST( &GHK::setCout ) ), new DestFinfo( "pDest", Ftype1< double >::global(), RFCAST( &GHK::addPermeability ) ), new SharedFinfo( "channel", channelShared, sizeof( channelShared ) / sizeof( Finfo* ), "This is a shared message to couple channel to compartment. " "The first entry is a MsgSrc to send Gk and Ek to the compartment " "The second entry is a MsgDest for Vm from the compartment." ), new SharedFinfo( "ghk", ghkShared, sizeof( ghkShared ) / sizeof( Finfo* ), "This shared message connects to an HHChannel. " "The first entry is a MsgSrc which relays the Vm received from " "a compartment. The second entry is a MsgDest which receives " "channel conductance, and interprets it as permeability." ), }; // Order of updates: (t0) Compartment -> (t1) HHChannel -> (t2) GHK static SchedInfo schedInfo[] = { { process, 0, 2 } }; static string doc[] = { "Name", "GHK", "Author", "Johannes Hjorth, 2009, KTH, Stockholm", "Description", "Calculates the Goldman-Hodgkin-Katz (constant field) equation " "for a single ionic species. Provides current as well as " "reversal potential and slope conductance.", }; static Cinfo GHKCinfo( doc, sizeof( doc ) / sizeof( string ), initNeutralCinfo(), GHKFinfos, sizeof( GHKFinfos )/sizeof(Finfo *), ValueFtype1< GHK >::global(), schedInfo, 1 ); return &GHKCinfo; }
const Cinfo* initRandomSpikeCinfo() { static Finfo* processShared[] = { new DestFinfo( "process", Ftype1<ProcInfo>::global(), RFCAST(&RandomSpike::processFunc)), new DestFinfo( "reinit", Ftype1<ProcInfo>::global(), RFCAST( &RandomSpike::reinitFunc)), }; static Finfo* process = new SharedFinfo( "process", processShared, sizeof(processShared)/sizeof(Finfo*)); static Finfo* randomspikeFinfos[] = { new ValueFinfo("minAmp", ValueFtype1<double>::global(), GFCAST( &RandomSpike::getMinAmp), RFCAST( &RandomSpike::setMinAmp)), new ValueFinfo("maxAmp", ValueFtype1<double>::global(), GFCAST( &RandomSpike::getMaxAmp), RFCAST( &RandomSpike::setMaxAmp)), new ValueFinfo("rate", ValueFtype1<double>::global(), GFCAST( &RandomSpike::getRate), RFCAST( &RandomSpike::setRate)), new ValueFinfo("resetValue", ValueFtype1<double>::global(), GFCAST( &RandomSpike::getResetValue), RFCAST( &RandomSpike::setResetValue)), new ValueFinfo("state", ValueFtype1<double>::global(), GFCAST( &RandomSpike::getState), RFCAST( &RandomSpike::setState)), new ValueFinfo("absRefract", ValueFtype1<double>::global(), GFCAST( &RandomSpike::getAbsRefract), RFCAST( &RandomSpike::setAbsRefract)), new ValueFinfo("lastEvent", ValueFtype1<double>::global(), GFCAST( &RandomSpike::getLastEvent), &dummyFunc), new ValueFinfo("reset", ValueFtype1<int>::global(), GFCAST( &RandomSpike::getReset), RFCAST( &RandomSpike::setReset)), ////////////////////////////////////////////////////////////////// // SharedFinfos ////////////////////////////////////////////////////////////////// process, /////////////////////////////////////////////////////// // MsgSrc definitions /////////////////////////////////////////////////////// new SrcFinfo("event", Ftype1<double>::global()), new SrcFinfo("outputSrc", Ftype1<double>::global()), ////////////////////////////////////////////////////////////////// // MessageDestinations ////////////////////////////////////////////////////////////////// new DestFinfo("rateDest", Ftype1<double>::global(), RFCAST(&RandomSpike::setRate)), new DestFinfo("minAmpDest", Ftype1<double>::global(), RFCAST( &RandomSpike::setMinAmp)), new DestFinfo("maxAmpDest", Ftype1<double>::global(), RFCAST( &RandomSpike::setMaxAmp)), new DestFinfo("minmaxDest", Ftype2<double, double>::global(), RFCAST( & RandomSpike::setMinMaxAmp)), new DestFinfo("isiDest", Ftype1<double>::global(), RFCAST( &RandomSpike::setISI), "Interspike interval setting. The output of a random number generator \ can be connected to this and used as the interspike interval."), }; static SchedInfo schedInfo[] = { { process, 0, 1 } }; static string doc[] = { "Name", "RandomSpike", "Author", "Subhasis Ray, 2008, NCBS", "Description", "RandomSpike: generates random events. It generates a random spike with " "probability p = (rate * dt), where dt is the integration timestep for " "the clock assigned to this object. Thus, it simulates a Poisson " "process with rate {rate}. It is also possible to set the " "inter-spike-interval dynamically, for example using a random number " "generator object. The rate can also be changed dynamically via " "rateDest message to simulate a non-homogeneous Poisson process." , }; static Cinfo randomSpikeCinfo( doc, sizeof( doc ) / sizeof( string ), initNeutralCinfo(), randomspikeFinfos, sizeof(randomspikeFinfos)/sizeof(Finfo*), ValueFtype1<RandomSpike>::global(), schedInfo, 1); return &randomSpikeCinfo; }