NetOfNetLSBM
"Fluctuations of local synchrony lead to resting-state alpha band envelop
connectivity in a parsimonious large-scale brain model"
Data and Code to reproduce the results
Installation & Settings:
Linux cluster: CentOS Linux 7 (Core)
Modules/version
GCCcore/6.4.0
binutils/2.28-GCCcore-6.4.0
icc/2018.1.163-GCC-6.4.0-2.28
ifort/2018.1.163-GCC-6.4.0-2.28
iccifort/2018.1.163-GCC-6.4.0-2.28
impi/2018.1.163-iccifort-2018.1.163-GCC-6.4.0-2.28
iimpi/2018a
imkl/2018.1.163-iimpi-2018a
intel/2018a
bzip2/1.0.6-GCCcore-6.4.0
zlib/1.2.11-GCCcore-6.4.0
ncurses/6.0-GCCcore-6.4.0
libreadline/7.0-GCCcore-6.4.0
Tcl/8.6.8-GCCcore-6.4.0
SQLite/3.21.0-GCCcore-6.4.0
GMP/6.1.2-GCCcore-6.4.0
libffi/3.2.1-GCCcore-6.4.0
Python/3.6.4-intel-2018a
Python dependencies
numpy 1.14
scipy 1.0.0
pygmo 2.7
numba 0.42.1
mpi4py 3.0.0
matplotlib 2.1.1
Data & Paths
Download the data and the files on the same floder.
Paths are hard coded. Paths are assumed relative to the folder where the files are located and they should be run from this folder.
Compressed files in folders /data/trFCglobals/
and data/trFClocals
should be unzipped on the same foleders before visulizing the figures.
To run a single model with given set of paramters
import modelKAO as lsbm
m = lsbm.oneModel()
m.localC = np.float32(2.0) # or 2 * np.ones(68,dtype=np.float32)
m.globalC = np.float32(2.0)
m.velocity = np.float32(5.0)
simulatedData, fitness = m.runModel()
Simulations
To run an optimization
The optimization of parameters is implemented to run in a Linux cluster with several nodes. The number of nodes determines the number of models with different initial conditions. The bach files make use of a slurm scheduler, but it might not be needed. Nodes communicate via MPI. Each node requires of 8 CPUs. The number of nodes and the CPUs can be configured on the batch files that launch the optimization.
Optimize global parameters (heterogenous ensembles)
Optimization with Diferential Evolution
./jobDEmpiEvoGlobals.sh
Optimization with Particle Swarm Optimization
./jobDEmpiEvoGlobals.sh
Optimize local parameters (homogenous ensembles)
Optimization with Diferential Evolution
./jobDEmpiEvoLocals.sh
Optimization with Particle Swarm Optimization
./jobPSOmpiEvoLocals.sh
Compute Time-resolved Functional Connectivity
It caluclates the similiarity between simulated and MEG time-resolved functional connectivity within the best range of paramteters found the the optimizers. It runs 321-second simulations to compute time-resolved FC. Each model requires of one node with 8 processes. Models are parallelized over a computing cluster with slurm scheduler
tr-FC with homogenous ensembles
./jobRecurrenceGlobal.sh
tr-FC with heterogenous ensembles
./jobRecurrenceNodes.sh
To compute once tr-FC with given paramters
import modelKAO as lsbm
m = lsbm.recurrenceKeepKAO()
m.localC = np.float32(2.0) # or 2*np.ones(68)
m.globalC = np.float32(2.0)
m.velocity = np.float32(5.0)
m.nSj = 1 # number of models run with different intial conditions, each models is like a subject
m.runModelrecurrenceFC() ## See comments within this function for relevant output variables
Figures
First, unzip the .tar
files data/trFCglobals/trFCglobals.tar.gz
and data/trFClocals/traFClocals.tar.gz
in the folders where they are.
Figure X,
Run .py
files with figure names