Hopfield and Brody model (Hopfield, Brody 2000) (NEURON+python)

 Download zip file   Auto-launch 
Help downloading and running models
Accession:144549
Demonstration of Hopfield-Brody snychronization using artificial cells in NEURON+python.
Reference:
1 . Hopfield JJ, Brody CD (2001) What is a moment? Transient synchrony as a collective mechanism for spatiotemporal integration. Proc Natl Acad Sci U S A 98:1282-7 [PubMed]
2 . Hopfield JJ, Brody CD (2000) What is a moment? "Cortical" sensory integration over a brief interval. Proc Natl Acad Sci U S A 97:13919-24 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism:
Cell Type(s):
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: NEURON; Python;
Model Concept(s): Pattern Recognition; Coincidence Detection; Temporal Pattern Generation; Synchronization; Attractor Neural Network;
Implementer(s): Lytton, William [billl at neurosim.downstate.edu]; Neymotin, Sam [samn at neurosim.downstate.edu];
/
hoppy
readme.txt
invlfire.mod
misc.mod *
stats.mod
vecst.mod *
declist.hoc *
decmat.hoc *
decnqs.hoc *
decvec.hoc *
default.hoc *
drline.hoc *
grvec.hoc *
init.hoc
labels.hoc
local.hoc *
misc.h
mysetup.py
net.py
nqs.hoc *
nqs_utils.hoc *
nrnoc.hoc *
pyinit.py
simctrl.hoc *
syncode.hoc *
                            
// $Id: nrnoc.hoc,v 1.74 2007/11/20 07:51:52 billl Exp $

proc nrnoc () {}

// Users should not edit nrnoc.hoc or default.hoc.  Any local 
// changes to these files should be made in local.hoc.

// key '*&*' is picked up by to indicate command for emacs
proc elisp () { printf("*&* %s\n",$s1) }
// if (not exists(simname)) { strdef simname, output_file, datestr, comment }

// Simctrl.hoc will automatically load stdgraph.hoc which automatically
// loads stdrun.hoc
strdef temp_string_, user_string_  // needed for simctrl
/* Global variable default values.  NOTE that stdrun.hoc, stdgraph.hoc
and simctrl.hoc all contain variable definitions and thus default.hoc
should be loaded after these files */
load_file("default.hoc")      /* Load default.hoc */

/* Allows arrays of strings */
objref hoc_obj_[2]
load_file("stdgui.hoc") // don't want to encounter other String tempate defs
load_file("simctrl.hoc")

proc run () {
  running_ = 1
  stdinit()
  continueRun(tstop)
  finish()
}

proc continueRun () { local rt, rtstart, ts
  if (numarg()==1) ts=$1 else ts=t+1e3
  realtime = 0  rt = screen_update_invl  rtstart = startsw()
  eventcount=0
  eventslow=1
  stoprun = 0
  if (using_cvode_) {
    if (cvode.use_local_dt || (cvode.current_method()%10) == 0) {
      cvode.solve(ts)
      flushPlot()
      realtime = startsw() - rtstart
      return
    }
  } else {
    ts -= dt/2
  }
  while (t<ts && stoprun==0) {
    step()
    realtime = startsw() - rtstart
    if (realtime >= rt) {
      //                        if (!stdrun_quiet) fastflushPlot()
      screen_update()
      //really compute for at least screen_update_invl
      realtime = startsw() - rtstart
      rt = realtime + screen_update_invl
    }
  }
  if (using_cvode_ && stoprun == 0) { // handle the "tstop" event
    step() // so all recordings take place at tstop
  }
  flushPlot()
  realtime = startsw() - rtstart
}

proc stdinit() {
        cvode_simgraph()
        realtime = 0
        setdt()
        init()
        initPlot()
}

proc init () {
  cvode_simgraph()
  initMech()
  initMisc1()

  // Initialize state vars then calculate currents
  // If user hand-set v in initMisc1() then v_init should be > 1000,
  // else all compartments will be set to v_init
  if (v_init < 1000) {
    finitialize(v_init)
  } else {
    finitialize()
  }

  // Set ca pump and leak channel for steady state
  setMemb()

  initMisc2()
  if (cvode_active()) cvode.re_init() else fcurrent()
  frecord_init()
}

// Initialization of mechanism variables
// NOTE: if any changes are made to the NEURON block of any local mod
// file, the user must add the necessary inits to initMisc1()
proc initMech () { 
  forall {
    if ((!ismembrane("pas")) && (!ismembrane("Passive"))) { 
      // Allow for either pas or Passive mod file usage
      // errorMsg("passive not inserted") 
    }

    if (ismembrane("na_ion")) { 
      nai = na_init
      nai0_na_ion = na_init
    }
    
    if (ismembrane("k_ion")) {
      ki = k_init
      ki0_k_ion = k_init
    }
    
    if (ismembrane("ca_ion")) { 
      cai = ca_init
      cai0_ca_ion = ca_init
    }
  }
}

//* setMemb complex -- multiple names for passive mech
//** declarations
iterator scase() { local i
  for i = 1, numarg() { temp_string_ = $si iterator_statement }}
objref paslist,pasvars[3],XO
double pasvals[2],x[1]
paslist = new List()
for ii=0,2 pasvars[ii]= new String()
for scase("fastpas","pas","Pass","Passive") paslist.append(new String(temp_string_))

//** getval(),setval() -- return/set the hoc value of a string
func retval () { return getval($s1) }
func getval () { 
  sprint(temp_string2_,"x=%s",$s1)
  execute(temp_string2_)
  return x
}
proc setval () { 
  sprint(temp_string2_,"%s=%g",$s1,$2)
  execute(temp_string2_)
}

//** findpas()
// assumes that we are starting in a live section since looks for pass mech there
qx_=0
proc findpas () {
  for ii=0,paslist.count-1 {
    XO=paslist.object(ii)
    if (ismembrane(XO.s)) {
      // print XO.s,"found"
      pasvars[2].s=XO.s
      sprint(pasvars[0].s,"g_%s(qx_)",XO.s)
      for scase("e","erev","XXXX") {  // look for the proper prefix
        sprint(temp_string_,"%s_%s",temp_string_,XO.s)
        if (name_declared(temp_string_)==1) break
      }
      if (name_declared(temp_string_)==0) { // not found
        printf("SetMemb() in nrnoc.hoc: Can't find proper 'erev' prefix for %s\n",XO.s)
      } else {
        sprint(pasvars[1].s,"%s(qx_)",temp_string_)
      }
    }
  }
}

proc setMemb () {
  if (!secp()) return
  findpas() // assume that passive name is the same in all sections
  forall for (qx_,0) {  // will eventually want 'for (x)' to handle all the segments
    if (ismembrane(pasvars[2].s)) {
        for ii=0,1 pasvals[ii]=getval(pasvars[ii].s)
        setmemb2()
        for ii=0,1 setval(pasvars[ii].s,pasvals[ii])
    }
  }
}

// secp() determine whether any sections exist
func secp () { local n
  n=0
  forall n+=1
  if (n>0) return 1 else return 0
}

func setother () {return 0} // callback stub
proc setmemb2 () { local iSum, ii, epas, gpas
  if (!secp()) return
  gpas=pasvals[0] epas=pasvals[1]
  // Setup steady state voltage using leak channel
  iSum = 0.0
  if (ismembrane("na_ion")) { iSum += ina(qx_) }
  if (ismembrane("k_ion"))  { iSum += ik(qx_)  }
  if (ismembrane("ca_ion")) { iSum += ica(qx_) }
  iSum += setother()

  if (iSum == 0) {        // Passive cmp so set e_pas = v
    epas = v
  } else {
    if (gpas > 0) {    // Assume g set by user, calc e
      epas = v + iSum/gpas

    } else {            // Assume e set by user, calc g
      if (epas != v) {
        gpas = iSum/(epas - v)
      } else { gpas=0 }
    }
    if (gpas < 0) errorMsg("bad g", gpas)
    if (epas < -100 || epas > 0) {
      printf(".")
      // printf("%s erev: %g %g %g\n",secname(),e_pas,ina,ik)
    }
  }
  pasvals[0]=gpas pasvals[1]=epas
}

proc finish () {
  /* Called following completion of continueRun() */

finishMisc()

if (graph_flag == 1) {
  if (iv_flag == 1) {
    flushPlot()
    doEvents()
  } else {
    graphmode(-1)
    plt(-1)
  }
}

if (print_flag == 1) {
  wopen("")
}
}

/*------------------------------------------------------------
User definable GRAPHICS and PRINTING routines
------------------------------------------------------------*/

proc outputData() {
  // Default procedure - if outputData() doesn't exist in the run file

  if (graph_flag == 1) {
    if (iv_flag == 1) {
      Plot()
      rt = stopsw()
      if (rt > realtime) {
        realtime = rt
        fastflushPlot()
        doNotify()
        if (realtime == 2 && eventcount > 50) {
          eventslow = int(eventcount/50) + 1
        }
        eventcount = 0
      }else{
        eventcount = eventcount + 1
        if ((eventcount%eventslow) == 0) {
          doEvents()
        }
      }

    } else {
      graph(t)
    }
  }

  if (print_flag == 1) { 
    if (t%printStep <= printStep) { printOut() }
  }
}

proc printOut() {
  /* Default procedure - if printOut() doesn't exist in the run file */
}

proc initGraph() {
  /* Default procedure - if initGraph() doesn't exist in the run file */

graph()
}

proc initPrint() {
  /* Default procedure - if initPrint() doesn't exist in the run file */

wopen(output_file)
}

/*------------------------------------------------------------
User definable BATCH RUN routines
------------------------------------------------------------*/

proc nextrun() {
  // Called from finishmisc() following completion of batch in an autorun
  wopen("")   
  runnum = runnum + 1
  sprint(output_file,"data/b%s.%02d", datestr, runnum)
}                       

// commands for emacs
proc update_runnum() { 
  runnum = $1
  sprint(output_file,"data/%s.%02d", datestr, runnum)
  print "^&^ (progn (sim-index-revert)(setq sim-runnum ",runnum,"))" }
proc nrn_write_index() { printf("&INDEX& %s\n",$s1) }
proc nrn_update () { elisp("nrn-update") }
proc nrn_message () { printf("!&! %s\n",$s1) } 

/*------------------------------------------------------------
User definable INITIALIZATION and FINISH routines
------------------------------------------------------------*/

// Default procedure - if initMisc1() doesn't exist in the run file 
// Initializations performed prior to finitialize() 
// This should contain point process inits and inits for any changes 
//        made to the NEURON block of any local mod file 
proc initMisc1() { }

// Default procedure - if initMisc2() doesn't exist in the run file 
// Initializations performed after finitialize() 
proc initMisc2() { }

// Default procedure - if finishMisc() doesn't exist in the run file 
proc finishMisc() { }

/*------------------------------------------------------------
Miscellaneous routines
------------------------------------------------------------*/

proc errorMsg() {
  /* Print warning, assumes arg1 is string and arg2 if present is a
  variable value */

sectionname(section)

if (numarg() == 0) {
  printf("ERROR in errorMsg(): Needs at least 1 argument.\n")
} else if (numarg() == 1) {
  printf("ERROR: %s in section %s.\n", $s1, section)
} else {
  printf("ERROR: %s in section %s (var=%g).\n", $s1, section, $2)
}
}

proc clear() {
  /* Clear non-interviews plot window */
plt(-3)
}

func mod() { local x, y
  /* Mod function for non-integers */

x=$1
y=$2

return (x/y - int(x/y))
}

proc whatSection() { print secname() }

proc print_pp_location() { local x //arg1 must be a point process
   x = $o1.get_loc()
   sectionname(temp_string_)
   printf("%s located at %s(%g)\n", $o1, temp_string_, x)
   pop_section()
}

//* set method with method()
proc method () { local prc
  if (numarg()==0) {
    if (cvode_active() && cvode_local()) { printf("\tlocal atol=%g\n",cvode.atol)
    } else if (cvode_active()) { printf("\tglobal atol=%g\n",cvode.atol)
    } else if (secondorder==2) { printf("\tCrank-Nicholson dt=%g\n",dt)
    } else if (secondorder==0) { printf("\timplicit dt=%g\n",dt)
    } else { printf("\tMethod unrecognized\n") }
    return
  }
  if (numarg()==2) prc = $2 else prc=0
  finitialize()
  if (strcmp($s1,"global")==0) {
    cvode_active(1)
    cvode.condition_order(2)
    if (prc) cvode.atol(prc)
  } else if (strcmp($s1,"local")==0) {
    cvode_local(1)
    cvode.condition_order(2)
    if (prc) cvode.atol(prc)
  } else if (strcmp($s1,"implicit")==0) {
    secondorder=0
    cvode_active(1)
    cvode_active(0)
    if (prc) dt=prc
  } else if (strcmp($s1,"CN")==0) {
    secondorder=2
    cvode_active(1) // this turns off local
    cvode_active(0)
    if (prc) dt=prc
  } else {
    printf("Integration method %s not recognized\n",$s1)
  }
}

//* Load local modifications to nrnoc.hoc and default.hoc
load_file("local.hoc")

if (xwindows && graph_flag) { nrnmainmenu() } // pwman_place(50,50)

print "Init complete.\n"

Hopfield JJ, Brody CD (2001) What is a moment? Transient synchrony as a collective mechanism for spatiotemporal integration. Proc Natl Acad Sci U S A 98:1282-7[PubMed]

References and models cited by this paper

References and models that cite this paper

Abeles M (1991) Corticonics: Neural Circuits of the Cerebral Cortex.

Adrian ED (1942) Olfactory reactions in the brain of the hedgehog. J Physiol 100:459-73 [PubMed]

Bi GQ, Poo MM (1998) Synaptic modifications in cultured hippocampal neurons: dependence on spike timing, synaptic strength, and postsynaptic cell type. J Neurosci 18:10464-72 [PubMed]

Buonomano DV, Merzenich MM (1995) Temporal information transformed into a spatial code by a neural network with realistic properties. Science 267:1028-30 [PubMed]

Chafee MV, Goldman-Rakic PS (1998) Matching patterns of activity in primate prefrontal area 8a and parietal area 7ip neurons during a spatial working memory task. J Neurophysiol 79:2919-40 [Journal] [PubMed]

Doyle AC (1890) Sign Of The Four

Fuster JM (1995) Memory In The Cerebral Cortex: An Empirical Approach To Neural Networks In The Human And Nonhuman Primate

GERSTEIN GL, MANDELBROT B (1964) RANDOM WALK MODELS FOR THE SPIKE ACTIVITY OF A SINGLE NEURON. Biophys J 4:41-68 [PubMed]

Gibson JR, Beierlein M, Connors BW (1999) Two networks of electrically coupled inhibitory neurons in neocortex. Nature 402:75-9 [PubMed]

Hopfield JJ (1996) Transforming neural computations and representing time. Proc Natl Acad Sci U S A 93:15440-4 [PubMed]

Hopfield JJ (1999) Odor space and olfactory processing: collective algorithms and neural implementation. Proc Natl Acad Sci U S A 96:12506-11 [PubMed]

Hopfield JJ, Brody CD (2000) What is a moment? "Cortical" sensory integration over a brief interval. Proc Natl Acad Sci U S A 97:13919-24 [Journal] [PubMed]

   Hopfield and Brody model (Hopfield, Brody 2000) (NEURON+python) [Model]
   Hopfield and Brody model (Hopfield, Brody 2000) [Model]

Hopfield JJ, Brody CD, Roweis S (1998) Adv Neural Inf Processing 10:166-172

Keil A, Muller MM, Ray WJ, Gruber T, Elbert T (1999) Human gamma band activity and perception of a gestalt. J Neurosci 19:7152-61 [PubMed]

Kuffler SW, Nicholls JG, Martin AR (1984) From Neuron To Brain :19-73

Matthews PC, Mirollo RE, Strogatz SH (1991) Physica D 52:293-331

Riehle A, Grun S, Diesmann M, Aertsen A (1997) Spike synchronization and rate modulation differentially involved in motor cortical function. Science 278:1950-3 [PubMed]

Romo R, Brody CD, Hernandez A, Lemus L (1999) Neuronal correlates of parametric working memory in the prefrontal cortex. Nature 399:470-3 [PubMed]

Salinas E, Hernandez A, Zainos A, Romo R (2000) Periodicity and firing rate as candidate neural codes for the frequency of vibrotactile stimuli. J Neurosci 20:5503-15 [PubMed]

Shadlen MN, Newsome WT (1994) Noise, neural codes and cortical organization. Curr Opin Neurobiol 4:569-79 [PubMed]

Singer W, Gray CM (1995) Visual feature integration and the temporal correlation hypothesis. Annu Rev Neurosci 18:555-86 [PubMed]

Sobel EC, Tank DW (1994) In vivo Ca2+ dynamics in a cricket auditory neuron: an example of chemical computation. Science 263:823-6 [PubMed]

Sompolinsky H, Golomb D, Kleinfeld D (1990) Global processing of visual stimuli in a neural network of coupled oscillators. Proc Natl Acad Sci U S A 87:7200-4 [PubMed]

van Vreeswijk C, Sompolinsky H (1998) Chaotic balanced state in a model of cortical circuits. Neural Comput 10:1321-71 [PubMed]

von der Malsburg C, Schneider W (1986) A neural cocktail-party processor. Biol Cybern 54:29-40 [PubMed]

Wehr M, Laurent G (1996) Odour encoding by temporal sequences of firing in oscillating neural assemblies. Nature 384:162-6 [PubMed]

Barak O, Tsodyks M (2006) Recognition by variance: learning rules for spatiotemporal patterns. Neural Comput 18:2343-58 [PubMed]

Cebulla C (2007) Asymptotic behavior and synchronizability characteristics of a class of recurrent neural networks. Neural Comput 19:2492-514 [PubMed]

Cymbalyuk G, Shilnikov A (2005) Coexistence of Tonic Spiking Oscillations in a Leech Neuron Model J Comp Neurosci 18:255-263 [Journal]

Gutig R, Sompolinsky H (2009) Time-warp-invariant neuronal processing. PLoS Biol 7:e1000141 [Journal] [PubMed]

   Time-warp-invariant neuronal processing (Gutig & Sompolinsky 2009) [Model]

Legenstein R, Pecevski D, Maass W (2008) A learning theory for reward-modulated spike-timing-dependent plasticity with application to biofeedback. PLoS Comput Biol 4:e1000180 [Journal] [PubMed]

   Reward modulated STDP (Legenstein et al. 2008) [Model]

Migliore M, Hines ML, Shepherd GM (2005) The role of distal dendritic gap junctions in synchronization of mitral cell axonal output. J Comp Neurosci 18:151-161 [Journal] [PubMed]

   Olfactory bulb mitral cell: synchronization by gap junctions (Migliore et al 2005) [Model]

Migliore M, Messineo L, Cardaci M, Ayala GF (2001) Quantitative modeling of perception and production of time intervals. J Neurophysiol 86:2754-60 [Journal] [PubMed]

   Estimation and Production of Time Intervals (Migliore et al 2001) [Model]

Miller JA, Kenyon GT (2007) Extracting number-selective responses from coherent oscillations in a computer model. Neural Comput 19:1766-97 [PubMed]

Monaco JD, Knierim JJ, Zhang K (2011) Sensory feedback, error correction, and remapping in a multiple oscillator model of place cell activity Frontiers in Computational Neuroscience 5(0):39 [Journal]

   Sensory feedback in an oscillatory interference model of place cell activity (Monaco et al. 2011) [Model]

Okamoto H, Isomura Y, Takada M, Fukai T (2007) Temporal integration by stochastic recurrent network dynamics with bimodal neurons. J Neurophysiol 97:3859-67 [PubMed]

   Temporal integration by stochastic recurrent network (Okamoto et al. 2007) [Model]

Salinas E, Sejnowski TJ (2001) Correlated neuronal activity and the flow of neural information. Nat Rev Neurosci 2:539-50 [PubMed]

Talathi SS, Abarbanel HD, Ditto WL (2008) Temporal spike pattern learning. Phys Rev E Stat Nonlin Soft Matter Phys 78:031918 [Journal] [PubMed]

Welday AC, Shlifer IG, Bloom ML, Zhang K, Blair HT (2011) Cosine Directional Tuning of Theta Cell Burst Frequencies: Evidence for Spatial Coding by Oscillatory Interference J. Neurosci. 31:16157-16176 [Journal] [PubMed]

   Synthesis of spatial tuning functions from theta cell spike trains (Welday et al., 2011) [Model]

Zilli EA (2012) Models of grid cell spatial firing published 2005-2011. Front Neural Circuits 6:16 [Journal] [PubMed]

   Grid cell spatial firing models (Zilli 2012) [Model]

(40 refs)

Hopfield JJ, Brody CD (2000) What is a moment? "Cortical" sensory integration over a brief interval. Proc Natl Acad Sci U S A 97:13919-24[PubMed]

References and models cited by this paper

References and models that cite this paper

Gutig R, Sompolinsky H (2009) Time-warp-invariant neuronal processing. PLoS Biol 7:e1000141 [Journal] [PubMed]

   Time-warp-invariant neuronal processing (Gutig & Sompolinsky 2009) [Model]

Hopfield JJ, Brody CD (2001) What is a moment? Transient synchrony as a collective mechanism for spatiotemporal integration. Proc Natl Acad Sci U S A 98:1282-7 [Journal] [PubMed]

   Hopfield and Brody model (Hopfield, Brody 2000) (NEURON+python) [Model]
   Hopfield and Brody model (Hopfield, Brody 2000) [Model]

Migliore M, Hines ML, Shepherd GM (2005) The role of distal dendritic gap junctions in synchronization of mitral cell axonal output. J Comp Neurosci 18:151-161 [Journal] [PubMed]

   Olfactory bulb mitral cell: synchronization by gap junctions (Migliore et al 2005) [Model]

(3 refs)