Skip to content

Instantly share code, notes, and snippets.

View lkoelman's full-sized avatar

Lucas lkoelman

View GitHub Profile
# For install via Yale packaged version: see http://www.neuron.yale.edu/ftp/neuron/nrn_mac_install.pdf
# For install via Brew prackage manager: see https://bbp.epfl.ch/nmc-portal/tools
# Set environment variables automatically:
/Applications/NEURON-7.5/nrn/x86_64/bin/nrnpyenv.sh
# Or do it manually by adding following to ~/.bash_profile
nrn_installdir=/path/to/NEURON/installdir # for example /Applications/NEURON-7.5
my_anaconda_path=/path/to/anaconda/dir # for example /Users/me/anaconda
@lkoelman
lkoelman / convert_morphology.sh
Created February 8, 2018 17:41
Convert neuron morphology file using NLMorphologyConverter via WINE on Linux
wine start installer.msi # install the program
cd '~/.wine/drive_c/Program Files (x86)/Neuronland/NLMorphologyConverter'
wine NLMorphologyConverter.exe --help
# you can pass file paths in UNIX format to windows executables run via 'wine' command: they will be converted automatically
wine NLMorphologyConverter.exe /home/me/mymorph.p /home/me/mymorph.swc SWC
### NEURON Installation from source ###
# Based on documentation at:
# https://www.neuron.yale.edu/neuron/download/compile_linux
# http://www.davison.webfactional.com/notes/installation-neuron-python/
# http://pub.ist.ac.at/~jguzman/doc/neuron/index.html
# Install C/C++ Development tools (compiler etc.)
sudo apt install build-essential
# Install InterView dependencies
# -*- coding: utf-8 -*-
r"""
Run a parallel ring network of ball-and-stick cells and write the spike times
to a file.
To execute with MPI across 2 processors::
$ mpiexec -n 2 python ringnet_mpi.py
To modify any simulation parameters, specify individual variables encased in
@lkoelman
lkoelman / fsl_fedora_install.md
Last active August 4, 2019 10:20
Install FSL on Fedora Linux

Download the FSL installer (python script) from https://fsl.fmrib.ox.ac.uk/fsldownloads_registration.

Type following commands in a Python interpreter:

from fslinstaller import *
manifest = get_web_manifest(Settings.mirror)
import json
with open('~/manifest.json', 'w') as fp:
 json.dump(manifest, fp)
@lkoelman
lkoelman / GENESIS_fedora_install.md
Last active October 16, 2018 11:11
How to install GENESIS 2.4 on Fedora linux
#!/bin/bash
# Based on 'scripts and utilities' in Duplicacy user guide: https://forum.duplicacy.com/t/duplicacy-user-guide/1197
################################################################################
# HOWTO
# - Follow steps 1-3 in https://forum.duplicacy.com/t/how-to-run-duplicacy-as-a-cron-job-on-linux/1611
# 1. initialize backup repositories
# 2. save password in preferences
@lkoelman
lkoelman / NEURON_UCD-Sonic-old_install.sh
Last active July 18, 2019 09:52
Installation of NEURON with Python support on the UCD Sonic cluster (old pre-Q2 2019 cluster hardware)
# Load modules required for NEURON Python install
module purge
module load gcc intel-mpi anaconda
# Create local Python environment
conda create -n localpy27 python=2 anaconda
source activate localpy27
# Install Python MPI support
# (must install using pip/setup.py when linking to system libraries rather than conda packaged libraries)
@lkoelman
lkoelman / NEURON_UCD-Sonic-new_install.sh
Last active July 30, 2019 20:51
Installation of NEURON with Python support on the UCD Sonic cluster (new post-Q2 2019 cluster hardware)
# Load modules required for NEURON Python install
module purge
module load anaconda
# For GCC toolchain load following modules:
module load gcc openmpi/3.1.6
# For Intel toolchain load following instead of gcc and openmpi:
# export FI_PROVIDER=verbs
# module load intel/intel-cc
# module load intel/intel-mkl
@lkoelman
lkoelman / install_arbor_ubuntu.sh
Last active March 31, 2020 11:09
Installing Arbor simulator on Ubuntu with Python 3 and MPI support
# Based on following sources:
# - https://arbor.readthedocs.io/en/latest/install.html
# - https://github.com/arbor-sim/arbor/blob/master/scripts/travis/build.sh
# Create python 3 environment with MPI support
conda create -n py3arbor python=3
conda activate py3arbor
# Install an mpi distribution and compile python module mpi4py with it
sudo apt install openmpi-bin openmpi-common libopenmpi2 libopenmpi-dev
pip install mpi4py