-*- mode: org -*-

This directory contains port of Single column thalamocortical model by
Traub et al (2005). The subdirectory `py` contains pymoose version of
the model. Subdirectory `nrn` contains scripts to simulate individual
components of the model to generate data for comparison. To run any
script in the `nrn` directory you need to download the NEURON model
from [[http://senselab.med.yale.edu/modeldb/showmodel.asp?model=82894]]
and unzip the contents and copy all the contents of the `nrntraub`
directory (generated by unzipping) into the `nrn` subdirectory and
finally build the mechanisms by running `nrnivmodl mod/` (this is
described in detail in the readme of the NEURON model).


* Unit tests
  For each ion channel `chan`, there is a hoc file called
  `test_chan.hoc`. Running this file will create Channel_Vm.dat and
  Channel_Gk.dat wehere `Channel` is the camelcased name of the channel
  (used in MOOSE).
  
  For [Ca2+ ] object we have test_cad.hoc in nrn directory and
  test_capool.py in py directory.
  
  The channel names in MOOSE do not always match the NEURON names, but
  the data files generated are consistent between the two
  versions. Already the reference data is provided in gzipped form in
  nrn/data directory. If you want to update this data by rerunning the
  NEURON tests, run `gzip *.dat` to compress them as MOOSE tests expect
  the reference data to be in this form (with extension .gz).

  To run all the MOOSE tests, do: `python -m unittest -v test_nachans
  test_kchans test_cachans test_archan test_capool` from the
  commandline.
  
  The standard test is apply 1 pA current injection from 50 to 150 ms,
  then apply a -1 pA current injection from 200 to 300 ms.

  The test_{celltype} files have step current injection test for each
  celltype.

* Using single cell models
  The single cell classes can be used to create new copies of the
  prototype cell. The signature is:

  cellclass(targetpath)

  for example, to create a DeepBasket cell with path '/model/db', you
  will call:

  db = DeepBasket('/model/db')

  Look at cell_test_utils.py:setup_current_step_model function to see
  how a single step current injection is setup for any specified cell
  class.
