ModelDB Help for preparing a NEURON simulator archive

How to prepare a zip file for automatic download and run

Web browsers can use NEURON as a "viewer" that automatically runs NEURON models downloaded from ModelDB.

For this to work, the model source code must be properly "packaged." The following procedure is special to NEURON models..

  1. Create a directory that contains all the necessary neuron model files and subdirectories.
  2. In the same directory, put a file (called readme.txt, README, readme.html, or index.html) that contains specific information and instructions on how to use the model. This is the file that ModelDB will display by default in the Model Files window of the model description page (ShowModel).
  3. In order to run the program from the web, this directory must also contain a mosinit.hoc file. mosinit.hoc should contain a command such as load_file("init.hoc") where init.hoc starts the neuron modeling session. Invariably the command load_file("nrngui.hoc") is included near the top of the mosinit.hoc file to display the NEURON main menu and also to load frequently used libraries. If additional mod files are included in a subfolder, named for example mod_files, then a command to compile these mod files
    //moddir mod_files
    must be the first command in the mosinit.hoc file.
  4. Zip up the directory. On macOS (do not use the method of right-clicking to select Compress "Folder" because it makes an archive which contains extra folders __MACOSX and files only used by the mac operating system) and unix/linux systems an appropriate terminal window command for creating a zip file called from a directory ca1nrn would be
    zip -r ca1nrn
    On MSWin systems create your zip file by right clicking in the Windows Explorer dialog box on the background of the right part of the screen where your model files top level folder is displayed. Select "Send to" and then mouse off to the side to select "compressed (zipped) folder" from the pop-up menu. If desired, change the name of the newly created zip file making sure you retain the ".zip" file extension.
  5. The zip file is now ready to be uploaded to ModelDB.
This website requires cookies and limited processing of your personal data in order to function. By continuing to browse or otherwise use this site, you are agreeing to this use. See our Privacy policy and how to cite and terms of use.