I was trying to figure out how to set the initial voltage of a simulation. I believe this is the h.v_init variable in python. I tried using the simConfig.hParams command to change this but the initial voltage stayed at -65 mV. I tried these to lines of code:

NEURON itself allows considerable user-specified control over initialization, which can be easily implemented with the FInitializeClass. I imagine it would be relatively straightforward to offer users a declarative way to customize initialization. Are you sure there isn't something about initialization in NetPyNE's documentation?

Hi all,
I find it difficult to find how to set the initial voltage for all sections in one cell.
In the documentation is explained how to do it for a single section.
"e.g. cellRule['secs']['soma']['vinit'] = -72"

A common theme is emerging in these posts: many things that are easy to do with plain vanilla NEURON are either no longer available or require specialized syntax if one uses NetPyNE. For example, in the case of a model specified with hoc (or Python), assigning a value to v_init (h.v_init for Python) would take care of the initial membrane potential question.

Is it not possible to simply assign a value to v_init? Or does using NetPyNE have the effect of hiding

NetPyNE is intended as a declarative language where all specifications can potentially be stored in json format, that's why it uses a different syntax from the procedural NEURON language. In many cases, especially for complex network models, the amount of code required will be less in NetPyNE.

For example, when you set the 'vinit' property of a section, NetPyNE takes care of calling h.FInitializeHandler() to set that voltage. There is no explicit method to set the v_init voltages of all sections in a cell (either in NetPyNE or NEURON), but you can simplify your code as follows:

thanks for the quick and clear response.
I realise now that my question was addressing a more general issue than simply setting the v_init of a section.
As a consequence of this I realise only now that I should have opened a new post rather than posting my question as a follow up of this post on v_init.

The point I intended to address is:
How do we change a parameter in all sections of an imported cell template?