Large scale model of the olfactory bulb (Yu et al., 2013)

 Download zip file   Auto-launch 
Help downloading and running models
Accession:144570
The readme file currently contains links to the results for all the 72 odors investigated in the paper, and the movie showing the network activity during learning of odor k3-3 (an aliphatic ketone).
Reference:
1 . Yu Y, McTavish TS, Hines ML, Shepherd GM, Valenti C, Migliore M (2013) Sparse distributed representation of odors in a large-scale olfactory bulb circuit. PLoS Comput Biol 9:e1003014 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network; Channel/Receptor; Dendrite;
Brain Region(s)/Organism: Olfactory bulb;
Cell Type(s): Olfactory bulb main mitral GLU cell; Olfactory bulb main interneuron granule MC GABA cell;
Channel(s): I Na,t; I A; I K;
Gap Junctions:
Receptor(s): NMDA; Glutamate; Gaba;
Gene(s):
Transmitter(s): Gaba; Glutamate;
Simulation Environment: NEURON;
Model Concept(s): Pattern Recognition; Activity Patterns; Bursting; Temporal Pattern Generation; Oscillations; Synchronization; Active Dendrites; Detailed Neuronal Models; Synaptic Plasticity; Action Potentials; Synaptic Integration; Unsupervised Learning; Olfaction;
Implementer(s): Hines, Michael [Michael.Hines at Yale.edu]; Migliore, Michele [Michele.Migliore at Yale.edu];
Search NeuronDB for information about:  Olfactory bulb main mitral GLU cell; Olfactory bulb main interneuron granule MC GABA cell; NMDA; Glutamate; Gaba; I Na,t; I A; I K; Gaba; Glutamate;
/
YuEtAl2012
readme.html
ampanmda.mod
fi.mod
kamt.mod *
kdrmt.mod *
naxn.mod *
ThreshDetect.mod *
.hg_archival.txt
allsynhinton.hoc *
antest.ses *
clear.hoc *
connect.hoc
control.ses
default.hoc
granule.hoc *
hinton.hoc
init.hoc *
iterator.hoc *
lindgren.job
lptiter.hoc
mgrs.hoc
michele_movie.hoc
mitral.hoc
mosinit.hoc *
net.hoc
odors.txt
odors-forsim500-kensaku.txt
param.hoc
parinit.hoc
pattern.hoc
perfrun.hoc
record.hoc
show.hoc
showstim.hoc
showw.hoc
somesyn.hoc *
spike2file.hoc
spkdat2bin.hoc
split.hoc
start.hoc
start.ses *
stim-AB-rnd-500mt.hoc
stim-o11o12.hoc
stim-o14.hoc
stim-o26.hoc
stim-o26d1-mnoise5hz-gnoise-5s.hoc
stim-o5high-o6low.hoc
stim-odors-AB-seq.hoc
stim-pair.hoc
stim-seq-rnd.hoc
subset.hoc
subset_control.ses *
viewspikes.hoc
viewspikes1.hoc
weight_movie.hoc *
weightsave.hoc
                            
objref idvec, spikevec
idvec = new Vector()
spikevec = new Vector()

iterator serialize_output() {local i
	if (pc.id == 0) {
		$o1.wopen()
		$o1.close()
	}
	pc.barrier()
	for i=0, pc.nhost-1 {
		if (i == pc.id) {
			$o1.aopen()
			iterator_statement
			$o1.close()
		}
		pc.barrier()
	}
}

proc want_all_spikes() {local i, gid  localobj mgr
	idvec.buffer_size(10000)
	spikevec.buffer_size(10000)
	for cell_gids(&gid, &i) if (gid < splitbit) {
		pc.spike_record(gid, spikevec, idvec)
	}
	for i=0, mgrs_list.count()-1 {
		mgr = mgrs_list.object(i)
		if (object_id(mgr.md)) { pc.spike_record(mgr.md_gid, spikevec, idvec) }
		if (object_id(mgr.gd)) { pc.spike_record(mgr.gd_gid, spikevec, idvec) }
	}
}

// replaced by version in spike2file.hoc
proc spike2file() { local i  localobj outf, s
	s = new String()
	//sprint(s.s, "out_%d_%d.dat", odor_idx, pnm.nhost)
	sprint(s.s, "out_%s_%d.dat", wbase.s, pnm.nhost)
        outf = new File(s.s)
	for serialize_output(outf) {
	        for i=0, idvec.size-1 {
        	        outf.printf("%.10g %d\n", spikevec.x[i], idvec.x[i])
		}
        }
}
{load_file("spike2file.hoc")} // replaces above (and different prototypw)

objref tdat_   
tdat_ = new Vector(7)
tdat_.x[5] = cxcpu // expected from lptiter.hoc
mindelay_ = 1e9
proc prun() {local told
	pc.setup_transfer()
        mindelay_ = pc.set_maxstep(10)
        runtime=startsw()
        tdat_.x[0] = pc.wait_time
        stdinit()
if (0) {
	if (0) {
		pc.psolve(tstop/2)
		savestate()
	}else{
		restorestate()
	}
}
//        pc.psolve(tstop)
	while(t < tstop) {
		told = t
		tnext = t + checkpoint_interval
		if (tnext > tstop) {
			tnext = tstop
		}
		if (pc.id == 0) printf("tnext = %g\n", tnext)
	        pc.psolve(tnext)
		// In case infinite loop due to round off error in fixed
		// step method.
		// May wish to use a dt which is a negative power of 2
		if (t == told) {
			if (pc.id == 0) {
printf("psolve did not advance time from t=%.20g to tnext=%.20g\n", t, tnext)
			}
			break
		}
		spike2file(spikevec, idvec, n_spkout_sort, n_spkout_files)
	}

        tdat_.x[0] = pc.wait_time - tdat_.x[0]
        runtime = startsw() - runtime
        tdat_.x[1] = pc.step_time
        tdat_.x[2] = pc.send_time
	tdat_.x[3] = pc.vtransfer_time(0) // for gaps
	tdat_.x[4] = pc.vtransfer_time(1) // for splitcells
//      printf("%d wtime %g\n", pc.id, waittime)
}

objref mxhist_
proc mkhist() {
	if (pc.id == 0) {
		mxhist_ = new Vector($1)
		pc.max_histogram(mxhist_)
	}
}
proc prhist() {local i, j
	if (pc.id == 0 && object_id(mxhist_)) {
		printf("histogram of #spikes vs #exchanges\n")
		j = 0
		for i=0, mxhist_.size-1 {
			if (mxhist_.x[i] != 0) { j = i }
		}
		for i = 0, j {
			printf("%d\t %d\n", i, mxhist_.x[i])
		}
		printf("end of histogram\n")
	}
}


func mindelay() {local i, md
	if (pc.nhost > 1) {
		pc.context("{pc.post(\"mindelay\", mindelay_)}")
		for i=1, pc.nhost-1 {
			pc.take("mindelay", &md)
			if (md < mindelay_) {
				mindelay_ = md
			}
		}		
	}
	return mindelay_ // see nc_append
}

objref tavg_stat, tmin_stat, tmax_stat, idmin_stat, idmax_stat
proc poststat() {
	pc.post("poststat", pc.id, tdat_)
}
proc getstat() {local i, j, id localobj tdat
	tdat = tdat_.c	tavg_stat = tdat_.c  tmin_stat = tdat_.c  tmax_stat = tdat_.c
	idmin_stat = tdat_.c.fill(0)  idmax_stat = tdat_.c.fill(0)
	if (pc.nhost > 1) {
		pc.context("poststat()\n")
		for i=0, pc.nhost-2 {
			pc.take("poststat", &id, tdat)
			tavg_stat.add(tdat)
			for j = 0, tdat_.size-1 {
				if (tdat.x[j] > tmax_stat.x[j]) {
					idmax_stat.x[j] = id
					tmax_stat.x[j] = tdat.x[j]
				}
				if (tdat.x[j] < tmin_stat.x[j]) {
					idmin_stat.x[j] = id
					tmin_stat.x[j] = tdat.x[j]
				}
			}
		}
	}
	tavg_stat.div(pc.nhost)
}

objref spstat_
proc postspstat() {local i
	spstat_ = new Vector()
	cvode.spike_stat(spstat_)
	i = spstat_.size
	spstat_.resize(spstat_.size + 4)
	spstat_.x[i] = pc.spike_statistics(&spstat_.x[i+1], &spstat_.x[i+2],\
		&spstat_.x[i+3])
	pc.post("postspstat", pc.id, spstat_)
}
proc print_spike_stat_info() {local i, j, id  localobj spstat, sum, min, max, idmin, idmax, label
	spstat = new Vector()
	spstat_ = new Vector()
	cvode.spike_stat(spstat_)
	i = spstat_.size
	spstat_.resize(spstat_.size + 4)
	spstat_.x[i] = pc.spike_statistics(&spstat_.x[i+1], &spstat_.x[i+2],\
		&spstat_.x[i+3])
	sum = spstat_.c
	min = spstat_.c
	max = spstat_.c
	idmin = spstat_.c.fill(0)
	idmax = spstat_.c.fill(0)
	if (pc.nhost > 1) {
		pc.context("postspstat()\n")
		for i=0, pc.nhost-2 {
			pc.take("postspstat", &id, spstat)
			sum.add(spstat)
			for j=0, spstat.size-1 {
				if (spstat.x[j] > max.x[j]) {
					idmax.x[j] = id
					max.x[j] = spstat.x[j]
				}
				if (spstat.x[j] < min.x[j]) {
					idmin.x[j] = id
					min.x[j] = spstat.x[j]
				}
			}
		}
	}
	label = new List()
	label.append(new String("eqn"))
	label.append(new String("NetCon"))
	label.append(new String("deliver"))
	label.append(new String("NC deliv"))
	label.append(new String("PS send"))
	label.append(new String("S deliv"))
	label.append(new String("S send"))
	label.append(new String("S move"))
	label.append(new String("Q insert"))
	label.append(new String("Q move"))
	label.append(new String("Q remove"))
	label.append(new String("max sent"))
	label.append(new String("sent"))
	label.append(new String("received"))
	label.append(new String("used"))

	printf("%10s %13s %10s %10s    %5s   %5s\n",\
		"", "total", "min", "max", "idmin", "idmax")
	for i=0, spstat_.size-1 {
		printf("%-10s %13.0lf %10d %10d    %5d   %5d\n",\
label.object(i).s, sum.x[i], min.x[i], max.x[i], idmin.x[i], idmax.x[i])
	}

	printf("\n%-10s %-10s %-10s %-10s %-10s %-10s %-10s %-10s %-10s\n",\
		"setup", "run", "avgspkxfr", "avgcomp", "avgx2q", "avgvxfr", "avgsplit", "avgcx", "avgactcx")
	printf("%-10.4g %-10.4g", setuptime, runtime)
	for i=0, tdat_.size-1 { printf(" %-10.4g", tavg_stat.x[i]) }

	printf("\n\n%5s %-15s %-15s %-15s %-15s %-15s %-15s %-15s\n", \
		"", "id   spkxfr", "id   com", "id   x2q", "id   vxfr", "id   split", "id   cx", "id   actcx")
	printf("%-5s", "min")
	for i=0, tdat_.size-1 { printf(" %-4d %-10.4g", idmin_stat.x[i], tmin_stat.x[i]) }
	printf("\n%-5s", "max")
	for i=0, tdat_.size-1 { printf(" %-4d %-10.4g", idmax_stat.x[i], tmax_stat.x[i]) }
	printf("\n")
}

proc savestate() {local i  localobj s, ss, f, rl
	s = new String()
	sprint(s.s, "svst.%04d", pnm.myid)
	f = new File(s.s)
	ss = new SaveState()
	ss.save()
	ss.fwrite(f, 0)

	rl = new List("Random")
	f.printf("Random %d\n", rl.count)
	for i=0, rl.count-1 {
		f.printf("%d\n", rl.object(i).seq())
	}
	f.close
}

proc restorestate() {local i  localobj s, ss, f, rl
	s = new String()
	sprint(s.s, "svst.%04d", pnm.myid)
	f = new File(s.s)
	ss = new SaveState()
	ss.fread(f, 0)
	rl = new List("Random")
	if (f.scanvar() != rl.count) {
		execerror("Random count unexpected", "")
	}
	for i=0, rl.count-1 {
		rl.object(i).seq(f.scanvar())
	}
	f.close
	ss.restore()
}