-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add bb5-tests * remove gitlab-ci.yml * remove duplicate mod files for bb5-tests and merge them into the 'tests' folder * mod files info * add license header * update Makefile * update readme
- Loading branch information
Showing
150 changed files
with
53,673 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,26 @@ | ||
#!/bin/sh | ||
|
||
# Copyright 2012-2024 Blue Brain Project / EPFL | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
|
||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -e | ||
|
||
INSTALL_DIR=$1 | ||
MOD_DIR=$2 | ||
|
||
cd ${INSTALL_DIR} | ||
|
||
echo "Building mod files" | ||
rm -rf x86_64 | ||
nrnivmodl ${MOD_DIR} >nrnivmodl.log 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
|
||
# Copyright 2024 Blue Brain Project / EPFL | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
|
||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -e | ||
|
||
INSTALL_DIR=$1 | ||
MOD_DIR=$2 | ||
|
||
cd ${INSTALL_DIR} | ||
|
||
echo "Building mod files" | ||
rm -rf x86_64 | ||
nrnivmodl ${MOD_DIR} >nrnivmodl.log 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
*.nrndat | ||
bin | ||
lib | ||
share | ||
.pytest_cache | ||
.tox-info.json | ||
.tox | ||
.neurodamus | ||
__pycache__ | ||
x86_64 | ||
nrnivmodl.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Variables | ||
PIP_INDEX_URL := https://pypi.python.org/simple | ||
NEURON_MODULE_OPTIONS := '-nogui' | ||
TESTS_DIR := tests | ||
MECHANISMS_DIR := ./../tests/mechanisms/ | ||
PYTEST_OPTS := --numprocesses=auto --timeout=600 -vsx --forked | ||
|
||
# Default rule (similar to 'testenv' in tox) | ||
default: install_deps compile_mod run_lint run_tests | ||
|
||
# Rule for installing dependencies (similar to 'deps' in tox) | ||
install_deps: | ||
python -m pip install --index-url $(PIP_INDEX_URL) -r test_requirements.txt | ||
|
||
# Rule for compiling mod (similar to the first 'commands' in tox) | ||
compile_mod: | ||
chmod +x ./.compile_mod.sh | ||
./.compile_mod.sh . $(MECHANISMS_DIR) | ||
|
||
# Rule for running tests (similar to the second 'commands' in tox) | ||
run_tests: | ||
NEURON_MODULE_OPTIONS=$(NEURON_MODULE_OPTIONS) pytest $(TESTS_DIR) $(PYTEST_OPTS) | ||
|
||
run_lint: | ||
ruff check $(TESTS_DIR) | ||
mypy $(TESTS_DIR) --ignore-missing-imports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# bluecellulab-bb5-tests | ||
|
||
## Description | ||
|
||
This folder contains tests for bluecellulab on the large circuits located on bb5. Please note that these tests are not directly usable as they are, due to dependencies. | ||
|
||
## How to run locally | ||
|
||
Simply clone the repository, install tox and type `tox` in the root directory of the repository. | ||
|
||
## Continous Integration | ||
|
||
This module will continue to be part of the continuous integration (CI) pipeline on GitLab until the end of the year. The scheduled CI tasks will run the tests for this module periodically until 2024.12.31. After this date, the tests will no longer be included in the CI pipeline. | ||
|
||
## Mechanisms | ||
|
||
The mechanisms for these tests have been merged into the [tests/mechanisms/](./../tests/mechanisms/) folder. Here is the list of mechanisms used for these tests. The original list is provided below, and files marked with an asterisk (*) were added to the tests folder as they were not already present: | ||
- `Ca.mod` | ||
- `CaDynamics_DC0.mod` | ||
- `CaDynamics_E2.mod` | ||
- `Ca_HVA.mod` | ||
- `Ca_HVA2.mod` | ||
- `Ca_LVAst.mod` | ||
- `DetAMPANMDA.mod` | ||
- `DetGABAAB.mod` | ||
- `GluSynapse.mod` | ||
- *`IN_Ih_Halnes2011.mod` | ||
- *`IN_iT.mod` | ||
- `Ih.mod` | ||
- `Im.mod` | ||
- `K_Pst.mod` | ||
- `K_Tst.mod` | ||
- `KdShu2007.mod` | ||
- `NaTa_t.mod` | ||
- `NaTg.mod` | ||
- `NaTs2_t.mod` | ||
- `Nap_Et2.mod` | ||
- `ProbAMPANMDA_EMS.mod` | ||
- `ProbGABAAB_EMS.mod` | ||
- *`RC_IT_Des92.mod` | ||
- `SK_E2.mod` | ||
- `SKv3_1.mod` | ||
- `StochKv.mod` | ||
- `StochKv3.mod` | ||
- *`TC_HH.mod` | ||
- *`TC_ITGHK_Des98.mod` | ||
- *`TC_Ih_Bud97.mod` | ||
- *`TC_Ih_CaMod.mod` | ||
- *`TC_Kleak.mod` | ||
- *`TC_Naleak.mod` | ||
- *`TC_Nap_Et2.mod` | ||
- *`TC_cadecay.mod` | ||
- *`TC_iA.mod` | ||
- *`TC_iL.mod` | ||
- *`TC_kir_Con15.mod` | ||
- `TTXDynamicsSwitch.mod` | ||
- `VecStim.mod` | ||
- `gap.mod` | ||
- *`ican.mod` | ||
- `netstim_inhpoisson.mod` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[pytest] | ||
markers = | ||
v5: tests on the neocortex circuit version 5. | ||
v6: tests on the neocortex circuit version 6. | ||
thal: tests on the thalamus circuit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
home = /gpfs/bbp.cscs.ch/ssd/apps/bsd/2022-01-10/stage_externals/install_gcc-11.2.0-skylake/python-3.9.7-yj5alh/bin | ||
implementation = CPython | ||
version_info = 3.9.7.final.0 | ||
virtualenv = 20.17.1 | ||
include-system-site-packages = false | ||
base-prefix = /gpfs/bbp.cscs.ch/ssd/apps/bsd/2022-01-10/stage_externals/install_gcc-11.2.0-skylake/python-3.9.7-yj5alh | ||
base-exec-prefix = /gpfs/bbp.cscs.ch/ssd/apps/bsd/2022-01-10/stage_externals/install_gcc-11.2.0-skylake/python-3.9.7-yj5alh | ||
base-executable = /gpfs/bbp.cscs.ch/ssd/apps/bsd/2022-01-10/stage_externals/install_gcc-11.2.0-skylake/python-3.9.7-yj5alh/bin/python3.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
bluepy-configfile>=0.1.18 | ||
bluepy[bbp]>=2.5.0 | ||
pytest | ||
pytest-timeout | ||
pytest-xdist | ||
pytest-forked | ||
ruff>=0.0.40 | ||
mypy>=1.2.0 |
14 changes: 14 additions & 0 deletions
14
bluecellulab-bb5-tests/tests/examples/circuit_twocell_example1/CircuitConfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Run Default | ||
{ | ||
|
||
MorphologyPath /bgscratch/bbp/l5/release/2012.07.23/morphologies/h5 | ||
METypePath ../circuit_twocell_example1/ccells/ | ||
MeshPath /bgscratch/bbp/l5/release/2012.07.23/meshes | ||
CircuitPath ../circuit_twocell_example1 | ||
nrnPath ../circuit_twocell_example1/ncsFunctionalAllRecipePathways | ||
TargetFile /bgscratch/bbp/l5/release/2012.07.23/circuit/SomatosensoryCxS1-v4.lowerCellDensity.r151/O1/merged_circuit/default_user.target | ||
BioName SomatosensoryCxS1-v4.lowerCellDensity.r151 | ||
CentralHyperColumn 2 | ||
|
||
} | ||
|
128 changes: 128 additions & 0 deletions
128
...L1_6_dend-tkb060530a2_ch1_ct_n_ab_100x_1_axon-tkb060123a1_ch1_ct_b_hw_60x_1_-_Clone_1.hoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
begintemplate cADpyr231_L6_TPC_L1_6_dend_tkb060530a2_ch1_ct_n_ab_100x_1_axon_tkb060123a1_ch1_ct_b_hw_60x_1___Clone_1 | ||
public init, printInfo, delete_axon, getCell, init_biophys, insertChannel | ||
public gid, CellRef, getThreshold, geom_nseg, gmechdistribute, biophys | ||
objref this, CellRef, gmechdistribute | ||
|
||
proc init() { local ind localobj strMorphName, strTmp, sf | ||
strMorphName = new String("dend-tkb060530a2_ch1_ct_n_ab_100x_1_axon-tkb060123a1_ch1_ct_b_hw_60x_1_-_Clone_1.asc") | ||
strTmp = new String() | ||
sf = new StringFunctions() | ||
if(numarg() == 2){ | ||
sscanf($s2, "%s", strTmp.s) | ||
ind = sf.substr(strTmp.s, ".asc") | ||
if((ind>0) && (ind == (sf.len(strTmp.s)-4))){ | ||
CellRef = new Cell($1, $s2) | ||
}else{ | ||
sprint(strMorphName.s, "%s/%s", $s2, strMorphName.s) | ||
CellRef = new Cell($1, strMorphName.s) | ||
} | ||
} | ||
gmechdistribute = new TDistFunc() | ||
CellRef.setCCell(this) | ||
gid = CellRef.gid | ||
geom_nseg() //This function is called to have count of actual axon sections | ||
delete_axon() | ||
insertChannel() | ||
init_biophys() | ||
biophys() | ||
} | ||
|
||
func getThreshold() { return 0.073042 } | ||
|
||
proc geom_nseg() { | ||
CellRef.geom_nseg_fixed(40) | ||
CellRef.geom_nsec() //To count all sections | ||
} | ||
|
||
obfunc getCell(){ | ||
return CellRef | ||
} | ||
|
||
proc delete_axon(){ | ||
CellRef.delete_axon() | ||
} | ||
|
||
proc init_biophys() { | ||
forsec CellRef.all { cm = 1.0 } | ||
forsec CellRef.all { Ra = 100.0 } | ||
|
||
CellRef.soma[0] distance() | ||
} | ||
|
||
proc insertChannel() { | ||
|
||
} | ||
|
||
proc biophys() { | ||
CellRef.insertChannel("axonal","NaTa_t") | ||
CellRef.insertChannel("axonal","Nap_Et2") | ||
CellRef.insertChannel("axonal","K_Pst") | ||
CellRef.insertChannel("axonal","K_Tst") | ||
CellRef.insertChannel("axonal","SK_E2") | ||
CellRef.insertChannel("axonal","SKv3_1") | ||
CellRef.insertChannel("axonal","CaDynamics_E2") | ||
CellRef.insertChannel("axonal","Ca_HVA") | ||
CellRef.insertChannel("axonal","Ca_LVAst") | ||
CellRef.insertChannel("somatic","NaTs2_t") | ||
CellRef.insertChannel("somatic","SKv3_1") | ||
CellRef.insertChannel("somatic","SK_E2") | ||
CellRef.insertChannel("somatic","CaDynamics_E2") | ||
CellRef.insertChannel("somatic","Ca_HVA") | ||
CellRef.insertChannel("somatic","Ca_LVAst") | ||
CellRef.insertChannel("apical","NaTs2_t") | ||
CellRef.insertChannel("apical","SKv3_1") | ||
CellRef.insertChannel("apical","Im") | ||
CellRef.insertChannel("apical","Ih") | ||
CellRef.insertChannel("basal","Ih") | ||
CellRef.insertChannel("apical","Ih") | ||
CellRef.insertChannel("somatic","Ih") | ||
CellRef.insertChannel("all","pas") | ||
|
||
{ CellRef.soma[0] distance() } | ||
{ forsec CellRef.all { e_pas = -75 } } | ||
{ forsec CellRef.all { g_pas = 3e-5 } } | ||
{ forsec CellRef.all { cm = 1 } } | ||
{ forsec CellRef.all { Ra = 100 } } | ||
{ forsec CellRef.somatic { ek = -85 } } | ||
{ forsec CellRef.somatic { ena = 50 } } | ||
{ forsec CellRef.axonal { ek = -85 } } | ||
{ forsec CellRef.axonal { ena = 50 } } | ||
{ forsec CellRef.apical { ek = -85 } } | ||
{ forsec CellRef.apical { ena = 50 } } | ||
{ forsec CellRef.apical { cm = 2 } } | ||
{ forsec CellRef.basal { cm = 2 } } | ||
{ forsec CellRef.apical { cm = 2 } } | ||
gmechdistribute.distribute(CellRef.axonal,"gNaTa_tbar_NaTa_t","( 0.000000 * %g + 1.000000 ) * 3.288755",1) | ||
gmechdistribute.distribute(CellRef.axonal,"gNap_Et2bar_Nap_Et2","( 0.000000 * %g + 1.000000 ) * 0.000671",1) | ||
gmechdistribute.distribute(CellRef.axonal,"gK_Pstbar_K_Pst","( 0.000000 * %g + 1.000000 ) * 0.957198",1) | ||
gmechdistribute.distribute(CellRef.axonal,"gK_Tstbar_K_Tst","( 0.000000 * %g + 1.000000 ) * 0.029456",1) | ||
gmechdistribute.distribute(CellRef.axonal,"gSK_E2bar_SK_E2","( 0.000000 * %g + 1.000000 ) * 0.098377",1) | ||
gmechdistribute.distribute(CellRef.axonal,"gSKv3_1bar_SKv3_1","( 0.000000 * %g + 1.000000 ) * 1.936176",1) | ||
gmechdistribute.distribute(CellRef.axonal,"gCa_HVAbar_Ca_HVA","( 0.000000 * %g + 1.000000 ) * 0.000684",1) | ||
gmechdistribute.distribute(CellRef.axonal,"gCa_LVAstbar_Ca_LVAst","( 0.000000 * %g + 1.000000 ) * 0.000007",1) | ||
gmechdistribute.distribute(CellRef.axonal,"gamma_CaDynamics_E2","( 0.000000 * %g + 1.000000 ) * 0.001734",1) | ||
gmechdistribute.distribute(CellRef.axonal,"decay_CaDynamics_E2","( 0.000000 * %g + 1.000000 ) * 103.091390",1) | ||
gmechdistribute.distribute(CellRef.somatic,"gNaTs2_tbar_NaTs2_t","( 0.000000 * %g + 1.000000 ) * 0.976885",1) | ||
gmechdistribute.distribute(CellRef.somatic,"gSKv3_1bar_SKv3_1","( 0.000000 * %g + 1.000000 ) * 0.072929",1) | ||
gmechdistribute.distribute(CellRef.somatic,"gSK_E2bar_SK_E2","( 0.000000 * %g + 1.000000 ) * 0.003869",1) | ||
gmechdistribute.distribute(CellRef.somatic,"gCa_HVAbar_Ca_HVA","( 0.000000 * %g + 1.000000 ) * 0.000459",1) | ||
gmechdistribute.distribute(CellRef.somatic,"gCa_LVAstbar_Ca_LVAst","( 0.000000 * %g + 1.000000 ) * 0.005592",1) | ||
gmechdistribute.distribute(CellRef.somatic,"gamma_CaDynamics_E2","( 0.000000 * %g + 1.000000 ) * 0.000996",1) | ||
gmechdistribute.distribute(CellRef.somatic,"decay_CaDynamics_E2","( 0.000000 * %g + 1.000000 ) * 873.498863",1) | ||
gmechdistribute.distribute(CellRef.apical,"gNaTs2_tbar_NaTs2_t","( 0.000000 * %g + 1.000000 ) * 0.025690",1) | ||
gmechdistribute.distribute(CellRef.apical,"gSKv3_1bar_SKv3_1","( 0.000000 * %g + 1.000000 ) * 0.039763",1) | ||
gmechdistribute.distribute(CellRef.apical,"gImbar_Im","( 0.000000 * %g + 1.000000 ) * 0.001000",1) | ||
gmechdistribute.distribute(CellRef.apical,"gIhbar_Ih","(-0.869600 + 2.087000*exp((%g - 0.000000) * 0.003100)) * 0.000080",1) | ||
gmechdistribute.distribute(CellRef.somatic,"gIhbar_Ih","( 0.000000 * %g + 1.000000 ) * 0.000080",1) | ||
gmechdistribute.distribute(CellRef.basal,"gIhbar_Ih","( 0.000000 * %g + 1.000000 ) * 0.000080",1) | ||
gmechdistribute.distribute(CellRef.apical,"gIhbar_Ih","( 0.000000 * %g + 1.000000 ) * 0.000080",1) | ||
|
||
|
||
|
||
} | ||
|
||
public getHypAmp | ||
|
||
func getHypAmp(){return (-0.019897) } | ||
|
||
endtemplate cADpyr231_L6_TPC_L1_6_dend_tkb060530a2_ch1_ct_n_ab_100x_1_axon_tkb060123a1_ch1_ct_b_hw_60x_1___Clone_1 |
Oops, something went wrong.