NEURON
KSChan Class Reference

#include <kschan.h>

Public Member Functions

 KSChan (Object *, bool is_point=false)
 
virtual ~KSChan ()
 
virtual void alloc (Prop *)
 
virtual void init (NrnThread *, Memb_list *)
 
virtual void state (NrnThread *, Memb_list *)
 
virtual void cur (NrnThread *, Memb_list *)
 
virtual void jacob (NrnThread *, Memb_list *)
 
void add_channel (const char **)
 
virtual int count ()
 
virtual void map (Prop *, int, neuron::container::data_handle< double > *, neuron::container::data_handle< double > *, double *)
 
virtual void spec (Memb_list *)
 
virtual void matsol (NrnThread *, Memb_list *)
 
virtual void cv_sc_update (NrnThread *, Memb_list *)
 
double conductance (double gmax, Memb_list *ml, std::size_t instance, std::size_t offset)
 
const char * state (int index)
 
int trans_index (int src, int target)
 
int gate_index (int state_index)
 
bool is_point ()
 
bool is_single ()
 
void set_single (bool, bool update=true)
 
void destroy_pnt (Point_process *)
 
int nsingle (Point_process *)
 
void nsingle (Point_process *, int)
 
double alpha (double v, int, int)
 
double beta (double v, int, int)
 
void setstructure (Vect *)
 
void setname (const char *)
 
void setsname (int, const char *)
 
void setion (const char *)
 
void settype (KSTransition *, int type, const char *)
 
void setivrelation (int)
 
KSStateadd_hhstate (const char *)
 
KSStateadd_ksstate (int igate, const char *)
 
void remove_state (int)
 
KSTransitionadd_transition (int src, int target)
 
void remove_transition (int)
 
void setcond ()
 
void power (KSGateComplex *, int)
 
void usetable (bool, int size, double vmin, double vmax)
 
void usetable (bool)
 
int usetable (double *vmin, double *vmax)
 
bool usetable ()
 
void check_table_thread (NrnThread *)
 
void parm_default_fill ()
 

Public Attributes

std::string name_
 
std::string ion_
 
double gmax_deflt_
 
double erev_deflt_
 
int cond_model_
 
KSIviv_relation_
 
int ngate_
 
int ntrans_
 
int ivkstrans_
 
int iligtrans_
 
int nhhstate_
 
int nksstate_
 
int nstate_
 
KSStatestate_
 
KSGateComplexgc_
 
KSTransitiontrans_
 
Symbolion_sym_
 
int nligand_
 
Symbol ** ligands_
 
Objectobj_
 
KSSinglesingle_
 

Private Member Functions

void free1 ()
 
void setupmat ()
 
void fillmat (double v, Datum *pd)
 
void mat_dt (double dt, Memb_list *ml, std::size_t instance, std::size_t offset)
 
void solvemat (Memb_list *, std::size_t instance, std::size_t offset)
 
void mulmat (Memb_list *ml, std::size_t instance, std::size_t offset_s, std::size_t offset_ds)
 
void ion_consist ()
 Almost obsolete: No longer allow KSChan structure changes when instances exist. More...
 
void ligand_consist (int, int, Prop *, Node *)
 
Propneedion (Symbol *, Node *, Prop *)
 
void sname_install ()
 
Symbollooksym (const char *, Symbol *tmplt=NULL)
 
Symbolinstallsym (const char *, int, Symbol *tmplt=NULL)
 
void freesym (Symbol *, Symbol *tmplt=NULL)
 
Symbol ** newppsym (int)
 
void delete_schan_node_data ()
 
void alloc_schan_node_data ()
 
void update_prop ()
 
void err_if_has_instances () const
 Error if instances exist. More...
 
void register_data_fields ()
 
KSStatestate_insert (int i, const char *name, double frac)
 
void state_remove (int i)
 
KSGateComplexgate_insert (int ig, int is, int power)
 
void gate_remove (int i)
 
KSTransitiontrans_insert (int i, int src, int target)
 
void trans_remove (int i)
 
void check_struct ()
 

Private Attributes

int state_size_
 
int gate_size_
 
int trans_size_
 
bool is_point_
 
bool is_single_
 
int pointtype_
 
int mechtype_
 
int cvode_ieq_
 
Symbolmechsym_
 
Symbolrlsym_
 
char * mat_
 
double ** elms_
 
double ** diag_
 
int dsize_
 
int psize_
 
int soffset_
 
int gmaxoffset_
 
int ppoff_
 
double vmin_
 
double vmax_
 
double dvinv_
 
double dtsav_
 
int hh_tab_size_
 
bool usetable_
 
std::vector< double > parm_default {}
 

Detailed Description

Definition at line 336 of file kschan.h.

Constructor & Destructor Documentation

◆ KSChan()

KSChan::KSChan ( Object obj,
bool  is_point = false 
)

Definition at line 863 of file kschan.cpp.

◆ ~KSChan()

virtual KSChan::~KSChan ( )
inlinevirtual

Definition at line 339 of file kschan.h.

Member Function Documentation

◆ add_channel()

void KSChan::add_channel ( const char **  m)

Definition at line 826 of file kschan.cpp.

◆ add_hhstate()

KSState * KSChan::add_hhstate ( const char *  name)

Definition at line 1523 of file kschan.cpp.

◆ add_ksstate()

KSState * KSChan::add_ksstate ( int  igate,
const char *  name 
)

Definition at line 1551 of file kschan.cpp.

◆ add_transition()

KSTransition * KSChan::add_transition ( int  src,
int  target 
)

Definition at line 1653 of file kschan.cpp.

◆ alloc()

void KSChan::alloc ( Prop prop)
virtual

Definition at line 2303 of file kschan.cpp.

◆ alloc_schan_node_data()

void KSChan::alloc_schan_node_data ( )
private

Definition at line 2486 of file kschan.cpp.

◆ alpha()

double KSChan::alpha ( double  v,
int  ,
int   
)
inline

Definition at line 373 of file kschan.h.

◆ beta()

double KSChan::beta ( double  v,
int  ,
int   
)
inline

Definition at line 376 of file kschan.h.

◆ check_struct()

void KSChan::check_struct ( )
private

Definition at line 1681 of file kschan.cpp.

◆ check_table_thread()

void KSChan::check_table_thread ( NrnThread nt)

Definition at line 3195 of file kschan.cpp.

◆ conductance()

double KSChan::conductance ( double  gmax,
Memb_list ml,
std::size_t  instance,
std::size_t  offset 
)

Definition at line 2763 of file kschan.cpp.

◆ count()

int KSChan::count ( )
virtual

Definition at line 2958 of file kschan.cpp.

◆ cur()

void KSChan::cur ( NrnThread _nt,
Memb_list ml 
)
virtual

Definition at line 2587 of file kschan.cpp.

◆ cv_sc_update()

void KSChan::cv_sc_update ( NrnThread nt,
Memb_list ml 
)
virtual

Definition at line 3028 of file kschan.cpp.

◆ delete_schan_node_data()

void KSChan::delete_schan_node_data ( )
private

Definition at line 2472 of file kschan.cpp.

◆ destroy_pnt()

void KSChan::destroy_pnt ( Point_process pp)

Definition at line 138 of file kschan.cpp.

◆ err_if_has_instances()

void KSChan::err_if_has_instances ( ) const
private

Error if instances exist.

Definition at line 2239 of file kschan.cpp.

◆ fillmat()

void KSChan::fillmat ( double  v,
Datum pd 
)
private

Definition at line 2155 of file kschan.cpp.

◆ free1()

void KSChan::free1 ( )
private

Definition at line 1253 of file kschan.cpp.

◆ freesym()

void KSChan::freesym ( Symbol s,
Symbol tmplt = NULL 
)
private

Definition at line 2100 of file kschan.cpp.

◆ gate_index()

int KSChan::gate_index ( int  state_index)

Definition at line 1044 of file kschan.cpp.

◆ gate_insert()

KSGateComplex * KSChan::gate_insert ( int  ig,
int  is,
int  power 
)
private

Definition at line 1800 of file kschan.cpp.

◆ gate_remove()

void KSChan::gate_remove ( int  i)
private

Definition at line 1831 of file kschan.cpp.

◆ init()

void KSChan::init ( NrnThread nt,
Memb_list ml 
)
virtual

Definition at line 2497 of file kschan.cpp.

◆ installsym()

Symbol * KSChan::installsym ( const char *  name,
int  type,
Symbol tmplt = NULL 
)
private

Definition at line 2084 of file kschan.cpp.

◆ ion_consist()

void KSChan::ion_consist ( )
private

Almost obsolete: No longer allow KSChan structure changes when instances exist.

However only a change to is_single_, ion_sym != NULL, or nligand affects the dparam size and that circumstance raises an error if instances exist prior to a call to ion_consist. So if ion_consist is called, either there are no instances, or there were no changes to the above three indicators and dparam size has not changed. However, even though ion_sym != NULL is the same, that does not mean that the specific ion used has not changed. And similarly for nligand. Thus, unless the must_allow_size_update is extended to include a change in ions used, ion_consist must continue to update the ion usage. But it no longer needs to realloc p->dparam.

Definition at line 2408 of file kschan.cpp.

◆ is_point()

bool KSChan::is_point ( )
inline

Definition at line 363 of file kschan.h.

◆ is_single()

bool KSChan::is_single ( )
inline

Definition at line 366 of file kschan.h.

◆ jacob()

void KSChan::jacob ( NrnThread _nt,
Memb_list ml 
)
virtual

Definition at line 2601 of file kschan.cpp.

◆ ligand_consist()

void KSChan::ligand_consist ( int  j,
int  poff,
Prop p,
Node nd 
)
private

Definition at line 2464 of file kschan.cpp.

◆ looksym()

Symbol * KSChan::looksym ( const char *  name,
Symbol tmplt = NULL 
)
private

Definition at line 2066 of file kschan.cpp.

◆ map()

void KSChan::map ( Prop prop,
int  ieq,
neuron::container::data_handle< double > *  pv,
neuron::container::data_handle< double > *  pvdot,
double *  atol 
)
virtual

Definition at line 2962 of file kschan.cpp.

◆ mat_dt()

void KSChan::mat_dt ( double  dt,
Memb_list ml,
std::size_t  instance,
std::size_t  offset 
)
private

Definition at line 2179 of file kschan.cpp.

◆ matsol()

void KSChan::matsol ( NrnThread nt,
Memb_list ml 
)
virtual

Definition at line 3001 of file kschan.cpp.

◆ mulmat()

void KSChan::mulmat ( Memb_list ml,
std::size_t  instance,
std::size_t  offset_s,
std::size_t  offset_ds 
)
private

Definition at line 2216 of file kschan.cpp.

◆ needion()

Prop * KSChan::needion ( Symbol s,
Node nd,
Prop pm 
)
private

Definition at line 2367 of file kschan.cpp.

◆ newppsym()

Symbol ** KSChan::newppsym ( int  n)
private

Definition at line 2094 of file kschan.cpp.

◆ nsingle() [1/2]

int KSChan::nsingle ( Point_process pp)

Definition at line 426 of file kssingle.cpp.

◆ nsingle() [2/2]

void KSChan::nsingle ( Point_process pp,
int  n 
)

Definition at line 421 of file kssingle.cpp.

◆ parm_default_fill()

void KSChan::parm_default_fill ( )

Definition at line 809 of file kschan.cpp.

◆ power()

void KSChan::power ( KSGateComplex gc,
int  p 
)

Definition at line 991 of file kschan.cpp.

◆ register_data_fields()

void KSChan::register_data_fields ( )
private

Definition at line 2249 of file kschan.cpp.

◆ remove_state()

void KSChan::remove_state ( int  is)

Definition at line 1589 of file kschan.cpp.

◆ remove_transition()

void KSChan::remove_transition ( int  it)

Definition at line 1667 of file kschan.cpp.

◆ set_single()

void KSChan::set_single ( bool  b,
bool  update = true 
)

Definition at line 998 of file kschan.cpp.

◆ setcond()

void KSChan::setcond ( )

Definition at line 1298 of file kschan.cpp.

◆ setion()

void KSChan::setion ( const char *  s)

Definition at line 1155 of file kschan.cpp.

◆ setivrelation()

void KSChan::setivrelation ( int  )

◆ setname()

void KSChan::setname ( const char *  s)

Definition at line 943 of file kschan.cpp.

◆ setsname()

void KSChan::setsname ( int  i,
const char *  s 
)

Definition at line 1247 of file kschan.cpp.

◆ setstructure()

void KSChan::setstructure ( Vect vec)

Definition at line 1913 of file kschan.cpp.

◆ settype()

void KSChan::settype ( KSTransition t,
int  type,
const char *  lig 
)

Definition at line 1348 of file kschan.cpp.

◆ setupmat()

void KSChan::setupmat ( )
private

Definition at line 2120 of file kschan.cpp.

◆ sname_install()

void KSChan::sname_install ( )
private

Definition at line 2007 of file kschan.cpp.

◆ solvemat()

void KSChan::solvemat ( Memb_list ml,
std::size_t  instance,
std::size_t  offset 
)
private

Definition at line 2190 of file kschan.cpp.

◆ spec()

void KSChan::spec ( Memb_list ml)
virtual

Definition at line 2973 of file kschan.cpp.

◆ state() [1/2]

const char * KSChan::state ( int  index)

Definition at line 1031 of file kschan.cpp.

◆ state() [2/2]

void KSChan::state ( NrnThread _nt,
Memb_list ml 
)
virtual

Definition at line 2533 of file kschan.cpp.

◆ state_insert()

KSState * KSChan::state_insert ( int  i,
const char *  name,
double  frac 
)
private

Definition at line 1730 of file kschan.cpp.

◆ state_remove()

void KSChan::state_remove ( int  i)
private

Definition at line 1770 of file kschan.cpp.

◆ trans_index()

int KSChan::trans_index ( int  src,
int  target 
)

Definition at line 1035 of file kschan.cpp.

◆ trans_insert()

KSTransition * KSChan::trans_insert ( int  i,
int  src,
int  target 
)
private

Definition at line 1851 of file kschan.cpp.

◆ trans_remove()

void KSChan::trans_remove ( int  i)
private

Definition at line 1887 of file kschan.cpp.

◆ update_prop()

void KSChan::update_prop ( )
private

Definition at line 1053 of file kschan.cpp.

◆ usetable() [1/4]

bool KSChan::usetable ( )
inline

Definition at line 398 of file kschan.h.

◆ usetable() [2/4]

void KSChan::usetable ( bool  use)

Definition at line 3162 of file kschan.cpp.

◆ usetable() [3/4]

void KSChan::usetable ( bool  use,
int  size,
double  vmin,
double  vmax 
)

Definition at line 3134 of file kschan.cpp.

◆ usetable() [4/4]

int KSChan::usetable ( double *  vmin,
double *  vmax 
)

Definition at line 3189 of file kschan.cpp.

Member Data Documentation

◆ cond_model_

int KSChan::cond_model_

Definition at line 446 of file kschan.h.

◆ cvode_ieq_

int KSChan::cvode_ieq_
private

Definition at line 468 of file kschan.h.

◆ diag_

double** KSChan::diag_
private

Definition at line 473 of file kschan.h.

◆ dsize_

int KSChan::dsize_
private

Definition at line 474 of file kschan.h.

◆ dtsav_

double KSChan::dtsav_
private

Definition at line 482 of file kschan.h.

◆ dvinv_

double KSChan::dvinv_
private

Definition at line 482 of file kschan.h.

◆ elms_

double** KSChan::elms_
private

Definition at line 472 of file kschan.h.

◆ erev_deflt_

double KSChan::erev_deflt_

Definition at line 444 of file kschan.h.

◆ gate_size_

int KSChan::gate_size_
private

Definition at line 432 of file kschan.h.

◆ gc_

KSGateComplex* KSChan::gc_

Definition at line 459 of file kschan.h.

◆ gmax_deflt_

double KSChan::gmax_deflt_

Definition at line 443 of file kschan.h.

◆ gmaxoffset_

int KSChan::gmaxoffset_
private

Definition at line 477 of file kschan.h.

◆ hh_tab_size_

int KSChan::hh_tab_size_
private

Definition at line 483 of file kschan.h.

◆ iligtrans_

int KSChan::iligtrans_

Definition at line 451 of file kschan.h.

◆ ion_

std::string KSChan::ion_

Definition at line 442 of file kschan.h.

◆ ion_sym_

Symbol* KSChan::ion_sym_

Definition at line 461 of file kschan.h.

◆ is_point_

bool KSChan::is_point_
private

Definition at line 434 of file kschan.h.

◆ is_single_

bool KSChan::is_single_
private

Definition at line 435 of file kschan.h.

◆ iv_relation_

KSIv* KSChan::iv_relation_

Definition at line 447 of file kschan.h.

◆ ivkstrans_

int KSChan::ivkstrans_

Definition at line 450 of file kschan.h.

◆ ligands_

Symbol** KSChan::ligands_

Definition at line 463 of file kschan.h.

◆ mat_

char* KSChan::mat_
private

Definition at line 471 of file kschan.h.

◆ mechsym_

Symbol* KSChan::mechsym_
private

Definition at line 469 of file kschan.h.

◆ mechtype_

int KSChan::mechtype_
private

Definition at line 438 of file kschan.h.

◆ name_

std::string KSChan::name_

Definition at line 441 of file kschan.h.

◆ ngate_

int KSChan::ngate_

Definition at line 448 of file kschan.h.

◆ nhhstate_

int KSChan::nhhstate_

Definition at line 453 of file kschan.h.

◆ nksstate_

int KSChan::nksstate_

Definition at line 454 of file kschan.h.

◆ nligand_

int KSChan::nligand_

Definition at line 462 of file kschan.h.

◆ nstate_

int KSChan::nstate_

Definition at line 455 of file kschan.h.

◆ ntrans_

int KSChan::ntrans_

Definition at line 449 of file kschan.h.

◆ obj_

Object* KSChan::obj_

Definition at line 464 of file kschan.h.

◆ parm_default

std::vector<double> KSChan::parm_default {}
private

Definition at line 486 of file kschan.h.

◆ pointtype_

int KSChan::pointtype_
private

Definition at line 437 of file kschan.h.

◆ ppoff_

int KSChan::ppoff_
private

Definition at line 479 of file kschan.h.

◆ psize_

int KSChan::psize_
private

Definition at line 475 of file kschan.h.

◆ rlsym_

Symbol* KSChan::rlsym_
private

Definition at line 470 of file kschan.h.

◆ single_

KSSingle* KSChan::single_

Definition at line 465 of file kschan.h.

◆ soffset_

int KSChan::soffset_
private

Definition at line 476 of file kschan.h.

◆ state_

KSState* KSChan::state_

Definition at line 458 of file kschan.h.

◆ state_size_

int KSChan::state_size_
private

Definition at line 431 of file kschan.h.

◆ trans_

KSTransition* KSChan::trans_

Definition at line 460 of file kschan.h.

◆ trans_size_

int KSChan::trans_size_
private

Definition at line 433 of file kschan.h.

◆ usetable_

bool KSChan::usetable_
private

Definition at line 484 of file kschan.h.

◆ vmax_

double KSChan::vmax_
private

Definition at line 482 of file kschan.h.

◆ vmin_

double KSChan::vmin_
private

Definition at line 482 of file kschan.h.


The documentation for this class was generated from the following files: