- The UI design of this project is based on Tkinter / ttkbootstrap
- The core module of this project is based on brainpy
- Make sure you have the correct python environment
- Execute instructions
Pyinstaller -F pysim.py # or Pyinstaller -F -w pysim.py # Packaging without console Pyinstaller -F -w -i XXX.ico pysim.py # Pack and specify exe icon packaging
run pysim.exe:
- On the initial screen, enter the MEA size (default 8 x 8)
- We can get the following main interface:
- Digital Twin Model:
- Clik
Digital Twin Modeland choosedata/2.1.1/2.1.1.mat - Clik
Presetand choosedata/2.1.1/args.yaml - Click the
Runbutton at the top of the interface - We can get the results in
logs/outputs:
- Clik
The simulator page mainly includes 6 components:
-
Mode selection: including Digital Twin Model and Virtual Experiment
- Digital Twin Model: Fitting digital twin models with real biological data
Preset: load existing parameters (.yamlfile) - Virtual Experiment: Use existing digital twin models to conduct different virtual experiments
Comp: Load real data to compare with virtual experiments (.matfile)
- Digital Twin Model: Fitting digital twin models with real biological data
-
Build stimulation paradigm: control which electrode emit stimulation
load: Loading an existing MEA stimulation format (.txtfile)clear: Clear the existing stimulation paradigm -
Core parameters (must be selected): select neuron type, synapse type, long-term plasticity model
-
Run parameters
-
Topology
-
Other parameters
-
Limited by
brainpyandjax, onlycpucan be used; Because of the use ofcpu, the speed is slow and takes about 1~2 minutes; -
Due to jax, the packaging fails. Here is a simple code comment of the problem jax-ml/jax#17705
File "jax\_src\interpreters\mlir.py", line 711, in lower_jaxpr_to_module jaxlib.mlir._mlir_libs._site_initialize.<locals>.MLIRError: Verification failed -
As the number of neurons and synapses increases, more randomness is created; excellent results require more attempts under the same parameters
-
Each data directory contains three files:
.matraw pulse data file.txtstimulation paradigm file, 8x8; can be loaded with the UI interface load tool.yamlparameter configuration file, containing a set of fine-tuned parameters; can be loaded with the UI interface Preset tool.pkltopology organization file, mainly used for simulationoutputsstores related simulation results