Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
Public Member Functions | List of all members
auryn::LinearComboSynapse Class Reference

Implements Auryn's default conductance based AMPA, Combo synapse without Combo voltage dependence. More...

#include <LinearComboSynapse.h>

Inheritance diagram for auryn::LinearComboSynapse:
Inheritance graph
[legend]
Collaboration diagram for auryn::LinearComboSynapse:
Collaboration graph
[legend]

Public Member Functions

 LinearComboSynapse (NeuronGroup *parent, AurynStateVector *input, AurynStateVector *output)
 
virtual ~LinearComboSynapse ()
 
void set_tau_ampa (const AurynState tau)
 Sets AMPA decay time scale. More...
 
void set_tau_nmda (const AurynState tau)
 Sets Combo decay time scale. More...
 
void set_e_rev (const AurynState reversal_pot)
 Sets reversal potential. More...
 
void set_ampa_nmda_ratio (AurynFloat ratio)
 Set ratio between ampa/nmda contribution to excitatory conductance. More...
 
void set_nmda_ampa_current_ampl_ratio (AurynFloat ratio)
 Sets nmda-ampa amplitude ratio. More...
 
void clear ()
 
virtual void evolve ()
 
- Public Member Functions inherited from auryn::SynapseModel
 SynapseModel (NeuronGroup *parent, AurynStateVector *input, AurynStateVector *output)
 

Additional Inherited Members

- Protected Attributes inherited from auryn::SynapseModel
NeuronGroupparent_group
 
AurynStateVectorinput_state
 
AurynStateVectoroutput_state
 

Detailed Description

Implements Auryn's default conductance based AMPA, Combo synapse without Combo voltage dependence.

Default timescales are tau_ampa = 5e-3 and tau_nmda = 100e-3.

Constructor & Destructor Documentation

◆ LinearComboSynapse()

LinearComboSynapse::LinearComboSynapse ( NeuronGroup parent,
AurynStateVector input,
AurynStateVector output 
)
31  : SynapseModel( parent, input, output )
32 {
33  if ( input == output ) {
34  logger->warning("LinearComboSynapse requires input and output state to be different!");
35  }
36 
37  set_tau_ampa(5e-3); // sets a default timescale
38  set_tau_nmda(100e-3); // sets a default timescale
39  set_e_rev(0.0); // sets default reversal potential
40 
41  g_ampa = input_state;
42  g_nmda = parent_group->get_state_vector("g_nmda");
43  temp = parent_group->get_state_vector("_temp");
44 
46 }
NeuronGroup * parent_group
Definition: SynapseModel.h:54
void set_e_rev(const AurynState reversal_pot)
Sets reversal potential.
Definition: LinearComboSynapse.cpp:64
AurynStateVector * get_state_vector(std::string key)
Creates a new or returns an existing state vector by name.
Definition: SpikingGroup.cpp:781
void warning(std::string text)
Definition: Logger.cpp:136
void set_ampa_nmda_ratio(AurynFloat ratio)
Set ratio between ampa/nmda contribution to excitatory conductance.
Definition: LinearComboSynapse.cpp:83
Logger * logger
Global pointer to instance of Logger which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:36
SynapseModel(NeuronGroup *parent, AurynStateVector *input, AurynStateVector *output)
Definition: SynapseModel.cpp:30
void set_tau_nmda(const AurynState tau)
Sets Combo decay time scale.
Definition: LinearComboSynapse.cpp:58
AurynStateVector * input_state
Definition: SynapseModel.h:55
void set_tau_ampa(const AurynState tau)
Sets AMPA decay time scale.
Definition: LinearComboSynapse.cpp:52
Here is the call graph for this function:

◆ ~LinearComboSynapse()

LinearComboSynapse::~LinearComboSynapse ( )
virtual
49 {
50 }

Member Function Documentation

◆ clear()

void auryn::LinearComboSynapse::clear ( )

◆ evolve()

void LinearComboSynapse::evolve ( )
virtual

Implements auryn::SynapseModel.

70 {
71  temp->diff(e_rev, parent_group->mem);
72 
73  output_state->set_all(0.0);
74  output_state->saxpy(A_ampa,g_ampa);
75  output_state->saxpy(A_nmda,g_nmda);
76  output_state->mul(temp);
77 
78  g_nmda->saxpy(-mul_nmda, g_nmda);
79  g_nmda->saxpy(mul_nmda, g_ampa);
80  g_ampa->scale(scale_ampa);
81 }
NeuronGroup * parent_group
Definition: SynapseModel.h:54
void set_all(const T v)
Set all elements to value v.
Definition: AurynVector.h:232
void diff(AurynVectorFloat *a, AurynVectorFloat *b)
Definition: AurynVector.cpp:262
void mul(const float a)
Definition: AurynVector.h:819
void scale(const float a)
Definition: AurynVector.cpp:74
void saxpy(const float a, AurynVectorFloat *x)
Definition: AurynVector.cpp:96
AurynStateVector * mem
Definition: NeuronGroup.h:64
AurynStateVector * output_state
Definition: SynapseModel.h:56
Here is the call graph for this function:

◆ set_ampa_nmda_ratio()

void LinearComboSynapse::set_ampa_nmda_ratio ( AurynFloat  ratio)

Set ratio between ampa/nmda contribution to excitatory conductance.

This sets the ratio between the integrals between the conductance kernels.

84 {
85  A_ampa = ratio/(ratio+1.0);
86  A_nmda = 1./(ratio+1.0);
87 }

◆ set_e_rev()

void LinearComboSynapse::set_e_rev ( const AurynState  reversal_pot)

Sets reversal potential.

65 {
66  e_rev = reversal_pot;
67 }

◆ set_nmda_ampa_current_ampl_ratio()

void LinearComboSynapse::set_nmda_ampa_current_ampl_ratio ( AurynFloat  ratio)

Sets nmda-ampa amplitude ratio.

This sets the ratio between the amplitudes of nmda to ampa.

90 {
91  const double tau_r = tau_ampa;
92  const double tau_d = tau_nmda;
93 
94  // compute amplitude of Combo conductance
95  const double tmax = tau_r*std::log((tau_r+tau_d)/tau_r); // argmax
96  const double ampl = (1.0-std::exp(-tmax/tau_r))*std::exp(-tmax/tau_d)*tau_r/(tau_d-tau_r);
97 
98  // set relative amplitudes
99  A_ampa = 1.0;
100  A_nmda = ratio/ampl;
101 
102  // normalize sum to one
103  const double sum = A_ampa+A_nmda;
104  A_ampa /= sum;
105  A_nmda /= sum;
106 
107  // write constants to logfile
108  logger->parameter("A_ampa", A_ampa);
109  logger->parameter("A_nmda", A_nmda);
110 }
void parameter(std::string name, T value)
Definition: Logger.h:90
Logger * logger
Global pointer to instance of Logger which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:36
Here is the call graph for this function:

◆ set_tau_ampa()

void LinearComboSynapse::set_tau_ampa ( const AurynState  tau)

Sets AMPA decay time scale.

53 {
54  tau_ampa = tau;
55  scale_ampa = std::exp(-auryn_timestep/tau_ampa);
56 }
double auryn_timestep
Simulation timestep in seconds.
Definition: auryn_definitions.cpp:31

◆ set_tau_nmda()

void LinearComboSynapse::set_tau_nmda ( const AurynState  tau)

Sets Combo decay time scale.

59 {
60  tau_nmda = tau;
61  mul_nmda = 1.0-std::exp(-auryn_timestep/tau_nmda);
62 }
double auryn_timestep
Simulation timestep in seconds.
Definition: auryn_definitions.cpp:31

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