This version of the code generates all figures from the paper (Simulation code for Aberra, A., Wang, B., Grill, W. M., and Peterchev, A. V. (2019). Simulation of transcranial magnetic stimulation in head model with morphologically-realistic cortical neurons. Brain Stimul. In press.) and allows both single-cell simulations of TMS thresholds and full population simulations on a local computer or Linux cluster (example SLURM code included)