-
Notifications
You must be signed in to change notification settings - Fork 31
Frequently Asked Questions
-
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
- To prevent recompiles when using
-
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)'; dsPlot(dsSimulate(eqns));
- 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
- Use
-
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]);
- see issue #113 discussion. One way is to add code like this to the startup.m file:
-
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 ondevbranch as of 8/24/18).
- Store data in the 'userdata' option in dsSimulate call. The data is stored
-
How to create refractory periods?
- Refractory periods can be implemented using the reserved variable "tspike" (which is a buffer containing the spike times for the previous two spikes); tspike is recorded any time that spikes are monitored
LIF={ 'dV/dt=(-70-V+R*I)/10; V(0)=reset' 'if(any(t<tspike+tabs,1))(V=reset)' % <-- hold V=reset throughout the absolute refractory period. 'monitor V.spikes(thresh)' 'tabs=10; thresh=-55; reset=-75; R=9; I=10' }; data=dsSimulate(LIF);
- Refractory periods can be implemented using the reserved variable "tspike" (which is a buffer containing the spike times for the previous two spikes); tspike is recorded any time that spikes are monitored
-
How do I automate logging into the cluster?
- Use expect in BASH:
- http://sharadchhetri.com/2010/12/07/how-to-use-expect-in-bash-script/
- http://stackoverflow.com/questions/4780893/use-expect-in-bash-script-to-provide-password-to-ssh-command
- KDE users can benefit from
ksshaskpass, which uses KDE'skwalletto encrypt the user-password combination
- Use expect in BASH:
-
How do I set my Matlab or Octave version on the cluster?
-
Edit your bash profile
~/.bash_profilein 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
- For Matlab add:
-
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
arrayandarray_one_file, see issue #249).
- The way to access centos7 nodes manually is by adding the directive