Page 1 of 1

Loading a Linear Circuit Mechanism in Python

Posted: Fri Jun 07, 2024 2:26 pm
by swienbar
Hi! I am trying to load a linear circuit into python. I designed a circuit in the GUI using the linear circuit builder that has a reference to a part of my cell. I have the linear circuit saved as a class file (with a .hoc extension).
The mechanism is a series of resistors connected to a section of the cell (in my case iseg(0)) with the label 'Vm'. I kept the default name for the class 'LM' that the class generation uses.
I load in the class at the top of my python file by calling:

Code: Select all

h.load_file(root + r'addOS\OSClass_SRW2.hoc')
But then I am not sure how to actually generate my linear mechanism and ensure that it is attached at the correct connection point in my cell (iseg(0)) using python. Do you have any advice on using linear circuit mechanisms in python? Thank you so much!

Re: Loading a Linear Circuit Mechanism in Python

Posted: Fri Jun 14, 2024 10:24 am
by ted
This example of how to develop and use a Linear Circuit implementation of a gap junction via Python https://www.neuron.yale.edu/ftp/ted/neu ... cirgap.zip might provide some useful hints.