Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import kinetics block into nineml.extensions.kinetics #31

Open
tclose opened this issue Mar 4, 2015 · 2 comments
Open

Import kinetics block into nineml.extensions.kinetics #31

tclose opened this issue Mar 4, 2015 · 2 comments

Comments

@tclose
Copy link
Contributor

tclose commented Mar 4, 2015

In the files pype9.importer.neuron.nmodl.py I have included a NotImplementedError in the get_component_class method that should be expanded to output a KineticsClass object using the parsed kinetics structure (see commented out line)

@russelljjarvis
Copy link
Contributor

I think it is appropriate for me to comment out or delete the line:
raise NotImplementedError,

uncomment the lines:
for name, (bidirectional, incoming, outgoing,
constraints, compartments) in self.kinetics.iteritems():

So it looks like this:
else:
for name, (bidirectional, incoming, outgoing,
constraints, compartments) in self.kinetics.iteritems():

And then I have to provide an appropriate body to the for loop.

So I should the test the get_component_class method in nmodl.py by attempting to import an NMODL file that contains a Kinetics block like Golgi_SK2.mod. I have located the file: /pype9/test/unittests/test_neuron_import.py which converts all of the files in:
/home/russell/git/pype9/test/data/nmodl, including the file Golgi_SK2.mod

The default argument to get_component_class is flatten_kinetics=False. So when I try to import the NMODL file, the unflattened version should be tested by default.

Then I would try to resolve any errors in the python implementation that result from doing this.

@russelljjarvis
Copy link
Contributor

Regarding the recent code I pushed to the open pull request.

I forgot to mention: In line 200 of nmodl.py, there is probably a more eloquent way of unpacking the value I am indexing as cst[0][0], but I am still trying to figure that out.
cst[0][0] is the first state in the constraint list. If the file was specified in 9ML as opposed to NMODL it would be a user defined value subsituted to make an elimination in the kinetics equation, so I just assume here that its okay to automatically take the first state. Perhaps its not?

cst = Constraint(cst[0][0],ks[0].name)

@tclose tclose added the importer label Jul 7, 2016
@tclose tclose modified the milestone: v0.2 Jul 8, 2016
@tclose tclose modified the milestones: v0.4, Long Term Jan 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants