Olfactory bulb microcircuits model with dual-layer inhibition (Gilra & Bhalla 2015)

 Download zip file 
Help downloading and running models
Accession:153574
A detailed network model of the dual-layer dendro-dendritic inhibitory microcircuits in the rat olfactory bulb comprising compartmental mitral, granule and PG cells developed by Aditya Gilra, Upinder S. Bhalla (2015). All cell morphologies and network connections are in NeuroML v1.8.0. PG and granule cell channels and synapses are also in NeuroML v1.8.0. Mitral cell channels and synapses are in native python.
Reference:
1 . Gilra A, Bhalla US (2015) Bulbar microcircuit model predicts connectivity and roles of interneurons in odor coding. PLoS One 10:e0098045 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism: Olfactory bulb;
Cell Type(s): Olfactory bulb main mitral GLU cell; Olfactory bulb main interneuron periglomerular GABA cell; Olfactory bulb main interneuron granule MC GABA cell;
Channel(s): I A; I h; I K,Ca; I Sodium; I Calcium; I Potassium;
Gap Junctions:
Receptor(s): AMPA; NMDA; Gaba;
Gene(s):
Transmitter(s): Gaba; Glutamate;
Simulation Environment: Python; MOOSE/PyMOOSE;
Model Concept(s): Sensory processing; Sensory coding; Markov-type model; Olfaction;
Implementer(s): Bhalla, Upinder S [bhalla at ncbs.res.in]; Gilra, Aditya [aditya_gilra -at- yahoo -period- com];
Search NeuronDB for information about:  Olfactory bulb main mitral GLU cell; Olfactory bulb main interneuron periglomerular GABA cell; Olfactory bulb main interneuron granule MC GABA cell; AMPA; NMDA; Gaba; I A; I h; I K,Ca; I Sodium; I Calcium; I Potassium; Gaba; Glutamate;
import time
import portalocker # lock files between processes by Jonathan Feinberg

def portalock_open(myfilename):
    myfile = open(myfilename,'r+') # open in rw mode, never write mode
    ## both LOCK_EX and LOCK_SH wait indefinitely for lock to get acquired
    ## i.e. if other process has locked file, wait indefinitely
    ## till lock is released by other process
    portalocker.lock(myfile,portalocker.LOCK_EX) # try to acquire lock
    return myfile

## the problem with writing to a file (mylock below) is that in case:
## one program crashes while files are locked,
## the other program will remain blocked from accessing files!
## can catch exceptions, but portalocker seems fine with one file,
## multiple files seem to be an issue with portalocker.
## go with portalocker and one master lockfile: on process exit, lock ends.
## ensure that you have 'clear\n' in locksimfile.txt if running this process first
def mylock(myfilename,lockstr):
    while True:
        lock_file = portalock_open(myfilename)
        if 'clear' in lock_file.read():
            lock_file.seek(0) # imp: since truncate() removes only from current posn
            lock_file.truncate()
            lock_file.write(lockstr)
            lock_file.flush()
            portalocker.unlock(lock_file)
            lock_file.close()
            break
        portalocker.unlock(lock_file)
        lock_file.close()
        time.sleep(1.0) # don't check too often, wait a second

def myunlock(myfilename):
    lock_file = portalock_open(myfilename)
    lock_file.truncate()
    lock_file.write('clear\n')
    lock_file.flush()
    portalocker.unlock(lock_file)
    lock_file.close()