Place and grid cells in a loop (Rennó-Costa & Tort 2017)

 Download zip file 
Help downloading and running models
Accession:241932
This model implements a loop circuit between place and grid cells. The model was used to explain place cell remapping and grid cell realignment. Grid cell model as a continuous attractor network. Place cells have recurrent attractor network. Rate models implemented with E%-MAX winner-take-all network dynamics, with gamma cycle time-step.
Reference:
1 . Rennó-Costa C, Tort ABL (2017) Place and Grid Cells in a Loop: Implications for Memory Function and Spatial Coding. J Neurosci 37:8062-8076 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Connectionist Network; Neuron or other electrically excitable cell;
Brain Region(s)/Organism: Hippocampus; Entorhinal cortex;
Cell Type(s): Hippocampus CA1 pyramidal GLU cell;
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: Python;
Model Concept(s): Gamma oscillations; Rate-coding model neurons; Winner-take-all; Place cell/field; Pattern Separation; Synaptic Plasticity;
Implementer(s): Rennó-Costa, César [rennocosta at neuro.ufrn.br];
Search NeuronDB for information about:  Hippocampus CA1 pyramidal GLU cell;
# -*- coding: utf-8 -*-
"""
Created on Thu Mar  5 12:55:44 2015

@author: rennocosta
"""

import os
import errno

class remappingFileNames:

#cluster

    def __init__(self,simMode = r"default"):
                
        if (simMode == "default"):
            self.pathRoot = r"./"
            self.pathData = r"DATA/" 
            self.pathRemapping = r"Remapping/"
            self.pathSimulation = r"Simulation_{0:02d}/"
            #self.pathRun = r"Run_{0:02d}/"
            self.bar = r""
            self.bar2 = r"/"
            
        if (simMode == "cluster"):
            self.pathRoot = r"/home/cluster/"
            self.pathData = r"DATA/" 
            self.pathRemapping = r"Remapping/"
            self.pathSimulation = r"Simulation_{0:02d}/"
            #self.pathRun = r"Run_{0:02d}/"
            self.bar = r""
            self.bar2 = r"/"
			
       
        self.filenameRun = r"run"
        self.filenameParam = r"param"
            
        self.extensionPickle = r".pkl"
        self.extensionMat = r".mat"


    def prepareSimulation(self,listofvalues,simulation=0):
        try:
            os.makedirs(self.pathRoot)
        except OSError as exception:
            if exception.errno != errno.EEXIST:
                raise
        try:
            os.makedirs(self.pathRoot + self.pathData)
        except OSError as exception:
            if exception.errno != errno.EEXIST:
                raise
        try:
            os.makedirs(self.pathRoot+ self.pathData+self.pathSimulation.format(simulation+1))
        except OSError as exception:
            if exception.errno != errno.EEXIST:
                raise
        #try:
        #    os.makedirs(self.pathRoot+ self.pathData+self.pathSimulation.format(simulation+1)+ self.pathRun.format(run+1))
        #except OSError as exception:
        #    if exception.errno != errno.EEXIST:
        #        raise

        try:
            nanana = self.pathRoot + self.pathData + self.pathSimulation.format(simulation+1) + self.bar + self.filenameParam
            for ii in listofvalues:
                nanana = nanana + (r"_{0:04d}").format(ii)
            nanana = nanana + self.bar2  
            os.makedirs(nanana)
        except OSError as exception:
            print("whats now?")
            if exception.errno != errno.EEXIST:
                raise        


    def fileRunPickle(self,listofvalues,simulation=0,run=0):
        nanana = self.pathRoot + self.pathData + self.pathSimulation.format(simulation+1) + self.bar + self.filenameParam
        for ii in listofvalues:
            nanana = nanana + (r"_{0:04d}").format(ii)
        return nanana + self.bar2 + self.bar + self.filenameRun + (r"_{0:04d}").format(run) + self.extensionPickle
            
      
      #  nanana =  self.pathRoot + self.pathData + self.pathSimulation.format(simulation+1) + self.pathRun.format(run+1) + self.bar + self.filenameRun
      #  for ii in listofvalues:
      #      nanana = nanana + (r"_{0:04d}").format(ii)
      #  return nanana + self.extensionPickle
            

Loading data, please wait...