NEURON NMODL/MOD File Cheat Sheet

Compile .mod files with with (specify path after to compile specific mod files): nrnivmodl Check units with (nrnivmodl does not check unit consistency): modlunit file.mod Meaning of various NMODL keywords RANGE - varies with position (0-1) on a section. Read/set with section.var or section(0.5).var. If section.nseg > 1:section(0.5).var can have a different value than section(0 … Continue reading NEURON NMODL/MOD File Cheat Sheet

Tools for editing SWC files (neuron morphology)

I have recently found myself having to pour over 100's of reconstructions of neurons from http://NeuroMorpho.org and make small changes before I can analyze them further. I needed a free tool that could: a) let me quickly preview the contents and b) make changes to the SWC files (e.g. move some branches around, set/change node … Continue reading Tools for editing SWC files (neuron morphology)

We will probably simulate volcanic eruptions to offset global warming

Spraying volcanic-like particles in the upper atmosphere would cost a fraction of today's wildfire and hurricane costs, and a fraction of fossil fuel company profits Why band-aid-like, simulated volcano eruptions (a.k.a. Stratospheric Aerosol Injections) will probably be the most cost-effective way to lower global temperatures while our civilization phases out the use of fossil fuels … Continue reading We will probably simulate volcanic eruptions to offset global warming

JavaScript Cheat Sheet

Clear an array array.length = 0 linq.js example Enumerable    .from(some_array)    .where(i => i.prop == test_value)    .select(i => {"a":i.a_val, "b":i.b_val})    .distinct(s => s["a"])    .toArray(); jQuery create new element, attach an event, and add it to the list of elements of a parent element jQuery("<span id='test'>Some text</span>")    .on("click", function() { alert(this.id … Continue reading JavaScript Cheat Sheet

Tutorial: Making NEURON Vector.play() + SaveState.restore() + CVODE work

Here is a working example of running a NEURON simulation of a cell to steady state, saving that state, restoring it in a new simulation, and using the Vector.play method to stimulate the cell with an arbitrary waveform. All this while using the variable integration method CVODE. First, build the cell, and run it to … Continue reading Tutorial: Making NEURON Vector.play() + SaveState.restore() + CVODE work