Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise implementation of ht_neuron #491

Merged
merged 48 commits into from Dec 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8018857
First version of improved NMDA model.
heplesser Apr 16, 2016
96099dd
Changed defaults parameters for ht_connection to defaults in Synthesi…
heplesser Apr 20, 2016
2bdc9ac
Merge branch 'master' into HT_NMDA
heplesser Apr 20, 2016
cf5805a
Fixed small bug and formatting.
heplesser Apr 20, 2016
2fda52a
Fixed NMDA-conductance readout function.
heplesser Apr 20, 2016
916bc07
Fixed code format.
heplesser Apr 20, 2016
5ee4829
Merge branch 'master' into HT_NMDA
heplesser Apr 22, 2016
a5b883c
Merge branch 'master' into HT_NMDA
heplesser Sep 22, 2016
ffbdb18
Updated model documentation to full NMDA implementation; adjuste one …
heplesser Sep 22, 2016
4998bf2
First step in changing variable names, esp _Tau_ -> _tau_
heplesser Oct 20, 2016
18fb781
Improved comments / documentation.
heplesser Oct 25, 2016
57e5463
Removed test that was accidentally committed in this branch.
heplesser Oct 25, 2016
5c6b651
Added checkes on parameters.
heplesser Oct 25, 2016
8018960
Added checkes on parameters.
heplesser Oct 25, 2016
a157412
Fixing examples to lower-case variable names.
heplesser Oct 25, 2016
800bd08
Updated ConnPlotter documentation wrt to changes in ht_neuron.
heplesser Oct 26, 2016
b978ae0
Fixed formatting.
heplesser Oct 26, 2016
25793f7
Merge branch 'master' into HT_NMDA
heplesser Oct 26, 2016
680f3f6
Fixed formatting.
heplesser Oct 26, 2016
53f136e
Merge branch 'master' into HT_NMDA
heplesser Oct 26, 2016
0889bf5
Fixed formatting.
heplesser Oct 26, 2016
a7d80c1
- Revised parameter names in ht_neuron from AMPA_E_rev to E_rev_AMPA etc
heplesser Nov 23, 2016
ceeb2a2
Merge branch 'master' of https://github.com/nest/nest-simulator into …
heplesser Nov 23, 2016
1f85a54
Fixed formatting.
heplesser Nov 23, 2016
326799b
First part of notebook on ht_neuron details (membrane potential, thre…
heplesser Nov 24, 2016
d63e9eb
First complete version of model description.
heplesser Nov 24, 2016
4947fee
Fixed typo.
heplesser Nov 24, 2016
d7d048f
Adjusted default vesicle pool depletion.
heplesser Nov 25, 2016
061776d
Now possible to choose between instantaneous and non-instantaneous NM…
heplesser Nov 25, 2016
62ec13a
Model documentation now complete. Tests for passive currents incl spi…
heplesser Nov 25, 2016
e225770
Fixed formatting.
heplesser Nov 25, 2016
8ae1372
Corrected references to t_spike to t_ref in comments.
heplesser Nov 25, 2016
f5eb579
ht_neuron now supports voltage clamp and equilibration.
heplesser Nov 28, 2016
97e21db
All intrinsic channels now checked. Some re-organization of code for …
heplesser Nov 29, 2016
6ca214f
Corrected read-out of NMDA current to multimeter.
heplesser Nov 29, 2016
900b308
Notebook documenting Hill-Tononi models now essentially complete. All…
heplesser Nov 29, 2016
4178bf2
Formatting fixes.
heplesser Nov 29, 2016
ea6a79d
Merge branch 'master' of https://github.com/nest/nest-simulator into …
heplesser Nov 29, 2016
9fba9dc
Added missing name declarations.
heplesser Nov 29, 2016
badd650
Removed warning about limited testing.
heplesser Nov 29, 2016
25ef4ba
Now use "inside" method for spike thresholding. Some minor adjustment…
heplesser Dec 1, 2016
d252fcc
Re-ran HillTononiModels notebook with latest code.
heplesser Dec 1, 2016
c443431
Correct units for D_influx,peak in notebook.
heplesser Dec 2, 2016
7b93243
Merge branch 'master' of https://github.com/nest/nest-simulator into …
heplesser Dec 2, 2016
e851207
Adapted presentation of IKNa in first part of notebook the the presen…
heplesser Dec 6, 2016
ad2eddc
Minor improvements in notebook.
heplesser Dec 7, 2016
bec1c52
Merge branch 'master' of https://github.com/nest/nest-simulator into …
heplesser Dec 15, 2016
e7110c6
Improved notebook text based on suggestions by @ingablundell.
heplesser Dec 15, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2,081 changes: 2,081 additions & 0 deletions doc/model_details/HillTononiModels.ipynb

Large diffs are not rendered by default.

25 changes: 15 additions & 10 deletions extras/ConnPlotter/tcd_nest.py
Expand Up @@ -32,7 +32,9 @@
SynapsesNEST. The constructor will import NEST to obtain all necessary
information. TCD can then be obtained by calling the generated object.

NB: At present, TCD is supported only for the ht_model.
NB: At present, TCD is supported only for the ht_model. NMDA charge
deposition is based on steady-state value for open channels at given
voltage.
"""

# ----------------------------------------------------------------------------
Expand Down Expand Up @@ -129,8 +131,8 @@ def __init__(self, syn, props):
syn is name of synapse type.
props is property dictionary of ht_neuron.
"""
td = props[syn + '_Tau_2'] # decay time
tr = props[syn + '_Tau_1'] # rise time
td = props[syn + '_tau_2'] # decay time
tr = props[syn + '_tau_1'] # rise time
# integral over g(t)
self._int_g = (props[syn + '_g_peak'] * (td - tr) /
((tr / td) ** (tr / (td - tr)) -
Expand All @@ -141,7 +143,7 @@ def __call__(self, V):
"""
V is membrane potential.
"""
return - self._int_g * (V - self._e_rev)
return -self._int_g * (V - self._e_rev)

def __str__(self):
return "_int_g = %f, _e_rev = %f" % (self._int_g, self._e_rev)
Expand All @@ -151,21 +153,24 @@ def __str__(self):
class _TcdNMDA(object):
"""
Class representing NMDA synapse model in ht_neuron.

Note: NMDA charge deposition is based on steady-state value
for open channels at given voltage.
"""

def __init__(self, props):
"""
props is property dictionary of ht_neuron.
"""
td = props['NMDA_Tau_2'] # decay time
tr = props['NMDA_Tau_1'] # rise time
td = props['tau_decay_NMDA'] # decay time
tr = props['tau_rise_NMDA'] # rise time
# integral over g(t)
self._int_g = (props['NMDA_g_peak'] * (td - tr) /
self._int_g = (props['g_peak_NMDA'] * (td - tr) /
((tr / td) ** (tr / (td - tr)) -
(tr / td) ** (td / (td - tr))))
self._e_rev = props['NMDA_E_rev']
self._v_act = props['NMDA_Vact']
self._s_act = props['NMDA_Sact']
self._e_rev = props['E_rev_NMDA']
self._v_act = props['V_act_NMDA']
self._s_act = props['S_act_NMDA']

def __call__(self, V):
"""
Expand Down
36 changes: 16 additions & 20 deletions models/ht_connection.h
Expand Up @@ -31,24 +31,23 @@

Description:
This synapse implements the depression model described in [1, p 1678].
See docs/model_details/HillTononi.ipynb for details.

Synaptic dynamics are given by

P'(t) = ( 1 - P ) / tau_p
P'(t) = ( 1 - P ) / tau_P
P(T+) = (1 - delta_P) P(T-) for T : time of a spike
P(t=0) = 1

w(t) = w_max * P(t) is the resulting synaptic weight

Parameters:
The following parameters can be set in the status dictionary:
tauP double - synaptic vesicle pool recovery time constant [ms]
tau_P double - synaptic vesicle pool recovery time constant [ms]
delta_P double - fractional change in vesicle pool on incoming spikes
[unitless]
P double - current size of the vesicle pool [unitless, 0 <= P <= 1]

Warning:
THIS SYNAPSE MODEL HAS NOT BEEN TESTED EXTENSIVELY!

References:
[1] S Hill and G Tononi (2005). J Neurophysiol 93:1671-1698.

Expand All @@ -61,7 +60,7 @@

/**
* Class representing a synapse with Hill short term plasticity. A
* suitale Connector containing these connections can be obtained from
* suitable Connector containing these connections can be obtained from
* the template GenericConnector.
*/

Expand Down Expand Up @@ -178,15 +177,12 @@ HTConnection< targetidentifierT >::send( Event& e,
double t_lastspike,
const CommonSynapseProperties& )
{
double h = e.get_stamp().get_ms() - t_lastspike;
Node* target = get_target( t );
// t_lastspike_ = 0 initially

// propagation t_lastspike -> t_spike, t_lastspike_ = 0 initially, p_ = 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change t_spike to t_ref

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, here t_spike is actually the time of the spike passing through the synapse.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, right, I went a bit fast on that one ^^"

const double h = e.get_stamp().get_ms() - t_lastspike;
p_ = 1 - ( 1 - p_ ) * std::exp( -h / tau_P_ );

// send the spike to the target
e.set_receiver( *target );
e.set_receiver( *get_target( t ) );
e.set_weight( weight_ * p_ );
e.set_delay( get_delay_steps() );
e.set_rport( get_rport() );
Expand All @@ -200,8 +196,8 @@ template < typename targetidentifierT >
HTConnection< targetidentifierT >::HTConnection()
: ConnectionBase()
, weight_( 1.0 )
, tau_P_( 50.0 )
, delta_P_( 0.2 )
, tau_P_( 500.0 )
, delta_P_( 0.125 )
, p_( 1.0 )
{
}
Expand All @@ -222,9 +218,9 @@ HTConnection< targetidentifierT >::get_status( DictionaryDatum& d ) const
{
ConnectionBase::get_status( d );
def< double >( d, names::weight, weight_ );
def< double >( d, "tau_P", tau_P_ );
def< double >( d, "delta_P", delta_P_ );
def< double >( d, "P", p_ );
def< double >( d, names::tau_P, tau_P_ );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are trying to limit the number of names and given that this is clearly a recovery time, I think it would be a good idea to set it to names::tau_rec and specify in the docstring "the recovery time tau_P in the paper is called tau_rec here", or something equivalent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point, but since everything here is about P, and I would like to stay reasonably close to the paper to ease comparisons, I would like to stick with tau_P.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough ;)

def< double >( d, names::delta_P, delta_P_ );
def< double >( d, names::P, p_ );
def< long >( d, names::size_of, sizeof( *this ) );
}

Expand All @@ -236,12 +232,12 @@ HTConnection< targetidentifierT >::set_status( const DictionaryDatum& d,
ConnectionBase::set_status( d, cm );

updateValue< double >( d, names::weight, weight_ );
updateValue< double >( d, "tau_P", tau_P_ );
updateValue< double >( d, "delta_P", delta_P_ );
updateValue< double >( d, "P", p_ );
updateValue< double >( d, names::tau_P, tau_P_ );
updateValue< double >( d, names::delta_P, delta_P_ );
updateValue< double >( d, names::P, p_ );

if ( tau_P_ <= 0.0 )
throw BadProperty( "tau_P >= 0 required." );
throw BadProperty( "tau_P > 0 required." );

if ( delta_P_ < 0.0 || delta_P_ > 1.0 )
throw BadProperty( "0 <= delta_P <= 1 required." );
Expand Down