Skip to content

Nmodltext#177

Merged
nrnhines merged 5 commits into
masterfrom
nmodltext
Apr 1, 2019
Merged

Nmodltext#177
nrnhines merged 5 commits into
masterfrom
nmodltext

Conversation

@nrnhines

@nrnhines nrnhines commented Apr 1, 2019

Copy link
Copy Markdown
Member

No description provided.

nrnhines and others added 5 commits February 20, 2019 11:41
… mechanism.

If there is no mod file for the implementation, returns "".
Note the first line of the code is the name of the modfile.
>>> from neuron import h
>>> s = h.Section(name='s')
>>> mt = h.MechanismType(0)
>>> dir(mt)
['__bool__', '__call__', '__class__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__module__', '__ne__', '__new__', '__next__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', 'action', 'baseattr', 'code', 'count', 'file', 'has_net_event', 'hname', 'hocobjptr', 'internal_type', 'is_artificial', 'is_netcon_target', 'make', 'menu', 'pp_begin', 'pp_next', 'remove', 'same', 'select', 'selected']
>>> mt.select('hh')
0.0
>>> mt.file()
'hh.mod'
>>> print('\n'.join(mt.code().split('\n')[:4]))
TITLE hh.mod   squid sodium, potassium, and leak channels

COMMENT
 This is the original Hodgkin-Huxley treatment for the set of sodium,
a ::: commented full path line if realpath available,
inserts the text of the INCLUDE file,
and closes the text with a ::: commented "end INCLUDE fname" line.
@nrnhines nrnhines merged commit 09f4512 into master Apr 1, 2019
@nrnhines nrnhines deleted the nmodltext branch October 5, 2019 08:22
olupton pushed a commit that referenced this pull request Dec 7, 2022
  - old notes / docs NOTES.md and CodeGen.md removed
  - removed examples from test/input and added new mod files
     under share/example
  - install examples under share/example
  - add python api nmodl.example_dir (useful for tutorial)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants