본문 바로가기

Science/Computational Neuroscience

[NEURON] VS Code에서 실행하기 위한 Task 만들

지금은 사실 Python이랑 통합되서 이렇게 실행할 일은 없지만, 워드프레스 정리하는 김에 같이 티스토리에도 옮겨둔다.

 

Python 비통합 버전으로 compile + run (nrniv) 하기 위한 task 코드

우분투 기준임.

 {
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        { 
            "label": "Compile NEURON",
            "type":"shell",
            "command": "rm -rf ./x86_64; cd ./mods; nrnivmodl; mv -f ./x86_64 ../x86_64",
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": false,
                "panel": "shared",
                "showReuseMessage": false,
                "clear": false
            }
        },
        {
            "label": "Run NEURON",
            "type": "shell",
            "command": "nrniv ${file}",
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": false,
                "panel": "shared",
                "showReuseMessage": false,
                "clear": false
            }
        },
        {
            "label": "Compile & Run NEURON",
            "dependsOrder":"sequence",
            "dependsOn":["Compile NEURON","Run NEURON"]            
        }
    ]
}