Skip to content

Frequently Asked Questions

Erik A. Roberts edited this page Aug 24, 2018 · 12 revisions


General FAQ

  • How to do voltage clamp mode?
    • Set the capacitance to infinity and control the clamped voltage by adjusting the initial voltage value
  • How to vary population size?
    • vary = {'popName','size',[1 10 100]};
  • How to vary inclusion of mechanisms without changing model qualitatively (e.g., for use with compilation)?
    • To prevent recompiles when using compile_flag=1, include all mechanisms and vary the conductance from 0
  • How to change a parameter midway through a simulation?
    • The way to achieve this is to define the parameter as a function of time.
    • Example: (leak current turns on at t=50ms)
      eqns='dV/dt=10+@current+gl(t)*(V+65); {iNa,iK}; gl(t)=0*(t<50)+.8*(t>50)';
    • see issue #62
  • How to vary a specific mechanism's parameter when the parameter name is shared by multiple mechanisms?
    • Use {'popX.mechY','param',values} in the vary cell array
  • How to change default figure size?
    • see issue #113 discussion. One way is to add code like this to the startup.m file:
      w = 800;
      h = 600;
      monitors = get(0,'MonitorPositions');
      x = 0.5*(monitors(1,3)-w);
      y = 0.5*(monitors(1,4)-h);
      set(0, 'DefaultFigurePosition',[x y w h]);
  • How to get data from the calculation functions called by the plot functions (e.g. peak frequency from peak power)?
    • All calc functions used in the plot function can be independently called to get results stored in the desired fields
    • Analysis results should be obtained using the calc functions (i.e., not the plot functions)
    • If the calc function is called first and the fields are present in data, then dsPlot() uses the values in the field without re-analyzing the data.
    • see issue #56
  • How to monitor spikes?
    • DynaSim now records the previous 2 spike times whenever the spike monitor is on (e.g., using: monitor V.spikes(thresh)). Spike times can be accessed using the reserved variables "tspike" for the parent population, "tspike_pre" for presynaptic spike times, and "tspike_post" for postsynaptic spike times (equivalent to "tspike" in this case). tspike has dimensions [buffer_size x num_cells]; therefore, operations like summation can be performed on functions of spike times like this: sum(f(t-tspike)) where f is some function that, in this case, has a single argument that is the elapsed time since the previous spike.
    monitor VAR.spikes(#)
    monitor VAR.spikes(threshold)
    monitor VAR.spikes(threshold,#)
    monitor VAR.spikes(#,#)
    monitor VAR.spikes(threshold,buffer_size)
  • How to store user data?
    • Store data in the 'userdata' option in dsSimulate call. The data is stored studyinfo.base_simulator_options.userdata (available on dev branch as of 8/24/18).

High Performance Computing (HPC) Linux Cluster FAQ

  • How do I automate logging into the cluster?

  • How do I set my Matlab or Octave version on the cluster?

    • Edit your bash profile ~/.bash_profile in the SCC (all nodes will see that environment):

      • For Matlab add: module load matlab/2017b (example for using Matlab 2017b, adjust it to your preference!)
      • For Octave (current stable version, Octave 4.2.1, requires centos7 nodes) add:
      module use /share/module/centos7
      module load octave/4.2.1
    • Note: These tips are for the Boston University cluster but are likely applicable to many Linux clusters.

    • For more help, see the online BU SCC cluster support

  • How do I access persistent nodes (i.e. not a login node)?

    • The way to access centos7 nodes manually is by adding the directive -l centos7=TRUE, so you can connect to a node like this: qrsh -l centos7=TRUE
    • DynaSim manages that for you transparently when submitting loop batches (although it remains to be ported to array and array_one_file, see issue #249).
You can’t perform that action at this time.