User Guide
nmodl::codegen::Ion Class Reference

Represent ions used in mod file. More...

Detailed Description

Represent ions used in mod file.

Definition at line 53 of file codegen_info.hpp.

#include <codegen_info.hpp>

Public Member Functions

 Ion ()=delete
 
 Ion (std::string name)
 
bool is_read (const std::string &name) const
 
bool is_conc_read () const
 
bool is_interior_conc_read () const
 
bool is_exterior_conc_read () const
 
bool is_written (const std::string &name) const
 
bool is_conc_written () const
 
bool is_interior_conc_written () const
 
bool is_exterior_conc_written () const
 
bool is_rev_read () const
 
bool is_rev_written () const
 
bool is_ionic_current (const std::string &text) const
 Check if variable name is a ionic current. More...
 
bool is_intra_cell_conc (const std::string &text) const
 Check if variable name is internal cell concentration. More...
 
bool is_extra_cell_conc (const std::string &text) const
 Check if variable name is external cell concentration. More...
 
bool is_rev_potential (const std::string &text) const
 Check if variable name is reveral potential. More...
 
bool is_ionic_conc (const std::string &text) const
 check if it is either internal or external concentration More...
 
bool is_ionic_variable (const std::string &text) const
 Is the variable name text related to this ion? More...
 
bool is_style (const std::string &text) const
 Is the variable name text the style of this ion? More...
 
bool is_current_derivative (const std::string &text) const
 
std::string intra_conc_name () const
 
std::string intra_conc_pointer_name () const
 
std::string extra_conc_name () const
 
std::string extra_conc_pointer_name () const
 
std::string rev_potential_name () const
 
std::string rev_potential_pointer_name () const
 
std::string ionic_current_name () const
 
std::string ionic_current_pointer_name () const
 
std::string current_derivative_name () const
 
std::string current_derivative_pointer_name () const
 
int variable_index (const std::string &var_name) const
 Variable index in the ion mechanism. More...
 

Static Public Member Functions

static std::vector< std::string > get_possible_variables (const std::string &ion_name)
 for a given ion, return different variable names/properties like internal/external concentration, reversal potential, ionic current etc. More...
 

Public Attributes

std::string name
 name of the ion More...
 
std::vector< std::string > reads
 ion variables that are being read More...
 
std::vector< std::string > implicit_reads
 ion variables that are being implicitly read More...
 
std::vector< std::string > writes
 ion variables that are being written More...
 
std::optional< double > valence
 ion valence More...
 
bool need_style = false
 if style semantic needed More...
 

Constructor & Destructor Documentation

◆ Ion() [1/2]

nmodl::codegen::Ion::Ion ( )
delete

◆ Ion() [2/2]

nmodl::codegen::Ion::Ion ( std::string  name)
inlineexplicit

Definition at line 74 of file codegen_info.hpp.

Member Function Documentation

◆ current_derivative_name()

std::string nmodl::codegen::Ion::current_derivative_name ( ) const
inline

Definition at line 214 of file codegen_info.hpp.

◆ current_derivative_pointer_name()

std::string nmodl::codegen::Ion::current_derivative_pointer_name ( ) const
inline

Definition at line 218 of file codegen_info.hpp.

◆ extra_conc_name()

std::string nmodl::codegen::Ion::extra_conc_name ( ) const
inline

Definition at line 190 of file codegen_info.hpp.

◆ extra_conc_pointer_name()

std::string nmodl::codegen::Ion::extra_conc_pointer_name ( ) const
inline

Definition at line 194 of file codegen_info.hpp.

◆ get_possible_variables()

static std::vector<std::string> nmodl::codegen::Ion::get_possible_variables ( const std::string &  ion_name)
inlinestatic

for a given ion, return different variable names/properties like internal/external concentration, reversal potential, ionic current etc.

Definition at line 225 of file codegen_info.hpp.

◆ intra_conc_name()

std::string nmodl::codegen::Ion::intra_conc_name ( ) const
inline

Definition at line 182 of file codegen_info.hpp.

◆ intra_conc_pointer_name()

std::string nmodl::codegen::Ion::intra_conc_pointer_name ( ) const
inline

Definition at line 186 of file codegen_info.hpp.

◆ ionic_current_name()

std::string nmodl::codegen::Ion::ionic_current_name ( ) const
inline

Definition at line 206 of file codegen_info.hpp.

◆ ionic_current_pointer_name()

std::string nmodl::codegen::Ion::ionic_current_pointer_name ( ) const
inline

Definition at line 210 of file codegen_info.hpp.

◆ is_conc_read()

bool nmodl::codegen::Ion::is_conc_read ( ) const
inline

Definition at line 83 of file codegen_info.hpp.

◆ is_conc_written()

bool nmodl::codegen::Ion::is_conc_written ( ) const
inline

Definition at line 99 of file codegen_info.hpp.

◆ is_current_derivative()

bool nmodl::codegen::Ion::is_current_derivative ( const std::string &  text) const
inline

Definition at line 178 of file codegen_info.hpp.

◆ is_exterior_conc_read()

bool nmodl::codegen::Ion::is_exterior_conc_read ( ) const
inline

Definition at line 91 of file codegen_info.hpp.

◆ is_exterior_conc_written()

bool nmodl::codegen::Ion::is_exterior_conc_written ( ) const
inline

Definition at line 107 of file codegen_info.hpp.

◆ is_extra_cell_conc()

bool nmodl::codegen::Ion::is_extra_cell_conc ( const std::string &  text) const
inline

Check if variable name is external cell concentration.

This is equivalent of IONOUT flag in mod2c.

Definition at line 144 of file codegen_info.hpp.

◆ is_interior_conc_read()

bool nmodl::codegen::Ion::is_interior_conc_read ( ) const
inline

Definition at line 87 of file codegen_info.hpp.

◆ is_interior_conc_written()

bool nmodl::codegen::Ion::is_interior_conc_written ( ) const
inline

Definition at line 103 of file codegen_info.hpp.

◆ is_intra_cell_conc()

bool nmodl::codegen::Ion::is_intra_cell_conc ( const std::string &  text) const
inline

Check if variable name is internal cell concentration.

This is equivalent of IONIN flag in mod2c.

Definition at line 135 of file codegen_info.hpp.

◆ is_ionic_conc()

bool nmodl::codegen::Ion::is_ionic_conc ( const std::string &  text) const
inline

check if it is either internal or external concentration

Definition at line 159 of file codegen_info.hpp.

◆ is_ionic_current()

bool nmodl::codegen::Ion::is_ionic_current ( const std::string &  text) const
inline

Check if variable name is a ionic current.

This is equivalent of IONCUR flag in mod2c. If it is read variable then also get NRNCURIN flag. If it is write variables then also get NRNCUROUT flag.

Definition at line 126 of file codegen_info.hpp.

◆ is_ionic_variable()

bool nmodl::codegen::Ion::is_ionic_variable ( const std::string &  text) const
inline

Is the variable name text related to this ion?

Example: For sodium this is true for any of "ena", "ina", "nai" and "nao"; but not ion_ina, etc.

Definition at line 167 of file codegen_info.hpp.

◆ is_read()

bool nmodl::codegen::Ion::is_read ( const std::string &  name) const
inline

Definition at line 77 of file codegen_info.hpp.

◆ is_rev_potential()

bool nmodl::codegen::Ion::is_rev_potential ( const std::string &  text) const
inline

Check if variable name is reveral potential.

Matches ena and na_erev.

Definition at line 153 of file codegen_info.hpp.

◆ is_rev_read()

bool nmodl::codegen::Ion::is_rev_read ( ) const
inline

Definition at line 111 of file codegen_info.hpp.

◆ is_rev_written()

bool nmodl::codegen::Ion::is_rev_written ( ) const
inline

Definition at line 115 of file codegen_info.hpp.

◆ is_style()

bool nmodl::codegen::Ion::is_style ( const std::string &  text) const
inline

Is the variable name text the style of this ion?

Example: For sodium this is true for "style_na".

Definition at line 174 of file codegen_info.hpp.

◆ is_written()

bool nmodl::codegen::Ion::is_written ( const std::string &  name) const
inline

Definition at line 95 of file codegen_info.hpp.

◆ rev_potential_name()

std::string nmodl::codegen::Ion::rev_potential_name ( ) const
inline

Definition at line 198 of file codegen_info.hpp.

◆ rev_potential_pointer_name()

std::string nmodl::codegen::Ion::rev_potential_pointer_name ( ) const
inline

Definition at line 202 of file codegen_info.hpp.

◆ variable_index()

int nmodl::codegen::Ion::variable_index ( const std::string &  var_name) const
inline

Variable index in the ion mechanism.

For sodium (na), the var_name must be one of ina, ena, nai, nao or dinadv. Replace na with the analogous for other ions.

In NRN the order is: 0: ena 1: nai 2: nao 3: ina 4: dinadv

Definition at line 244 of file codegen_info.hpp.

Member Data Documentation

◆ implicit_reads

std::vector<std::string> nmodl::codegen::Ion::implicit_reads

ion variables that are being implicitly read

Definition at line 61 of file codegen_info.hpp.

◆ name

std::string nmodl::codegen::Ion::name

name of the ion

Definition at line 55 of file codegen_info.hpp.

◆ need_style

bool nmodl::codegen::Ion::need_style = false

if style semantic needed

Definition at line 70 of file codegen_info.hpp.

◆ reads

std::vector<std::string> nmodl::codegen::Ion::reads

ion variables that are being read

Definition at line 58 of file codegen_info.hpp.

◆ valence

std::optional<double> nmodl::codegen::Ion::valence

ion valence

Definition at line 67 of file codegen_info.hpp.

◆ writes

std::vector<std::string> nmodl::codegen::Ion::writes

ion variables that are being written

Definition at line 64 of file codegen_info.hpp.


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