def install(version):

        if not JNeuroMLEngine.is_installed(None):
            JNeuroMLEngine.install(None)
            inform("%s installed JNeuroML..." % JNeuroMLNetPyNEEngine.name,
                   indent=2,
                   verbosity=1)
        if not NetPyNEEngine.is_installed(None):
            NetPyNEEngine.install(None)
            inform("%s installed NetPyNE (& NEURON)..." %
                   JNeuroMLNetPyNEEngine.name,
                   indent=2,
                   verbosity=1)

        environment_vars_nrn, path_nrn = NeuronEngine.get_nrn_environment()

        JNeuroMLNetPyNEEngine.path = JNeuroMLEngine.path + ":" + path_nrn
        JNeuroMLNetPyNEEngine.environment_vars = {}
        JNeuroMLNetPyNEEngine.environment_vars.update(
            JNeuroMLEngine.environment_vars)
        JNeuroMLNetPyNEEngine.environment_vars.update(
            NetPyNEEngine.environment_vars)
        JNeuroMLNetPyNEEngine.environment_vars.update(environment_vars_nrn)
        inform("PATH: " + JNeuroMLNetPyNEEngine.path)
        inform("Env vars: %s" % JNeuroMLNetPyNEEngine.environment_vars)
    def install(version):
        if not NeuronEngine.is_installed(None):
            NeuronEngine.install(None)
            inform("%s installed NEURON..." % PyNNNRNEngine.name, indent=2, verbosity =1)
        if not PyNNEngine.is_installed(None):
            PyNNEngine.install(None)
            inform("%s installed PyNN..." % PyNNNRNEngine.name, indent=2, verbosity =1)

        PyNNNRNEngine.path = PyNNEngine.path + \
            ":" + NeuronEngine.path
        PyNNNRNEngine.environment_vars = {}
        PyNNNRNEngine.environment_vars.update(
            PyNNEngine.environment_vars)
        PyNNNRNEngine.environment_vars.update(
            NeuronEngine.environment_vars)
        inform("PATH: " + PyNNNRNEngine.path, indent=2, verbosity =1)
        inform("Env vars: %s" % PyNNNRNEngine.environment_vars, indent=2, verbosity =1)
        
        pynn_loc = sp.check_output(['python -c "import pyNN,os; print(os.path.dirname(pyNN.__file__))"'], shell=True,stderr=sp.STDOUT).strip()
        pynn_mod_dir = '%s/neuron/nmodl/'%pynn_loc
        
        inform("Attempting to compile PyNN mod files for standard models in %s..."%pynn_mod_dir, indent=2, verbosity =1)
        
        print(check_output(['ls', pynn_mod_dir], cwd=pynn_mod_dir))
        
        environment_vars, path = NeuronEngine.get_nrn_environment()
        inform("Using NEURON with env %s at %s..."%(environment_vars, path), indent=2, verbosity =1)
        
        print(check_output([environment_vars['NEURON_HOME']+'/bin/nrnivmodl'], cwd=pynn_mod_dir))
Exemplo n.º 3
0
    def install(version):
        if not NeuronEngine.is_installed(None):
            NeuronEngine.install(version)    # interpret version as version of NEURON!
            inform("%s installed NEURON..." % PyNRNEngine.name, indent=2, verbosity =1)

        environment_vars_nrn, path_nrn = NeuronEngine.get_nrn_environment()
        
        PyNRNEngine.path = path_nrn
        PyNRNEngine.environment_vars = {}
        PyNRNEngine.environment_vars.update(environment_vars_nrn)
            
        inform("PATH: " + PyNRNEngine.path, indent=2, verbosity =1)
        inform("Env vars: %s" % PyNRNEngine.environment_vars, indent=2, verbosity =1)
    def install(version):
        if not NeuronEngine.is_installed(None):
            NeuronEngine.install(version)    # interpret version as version of NEURON!
            inform("%s installed NEURON..." % PyNRNEngine.name, indent=2, verbosity =1)

        environment_vars_nrn, path_nrn = NeuronEngine.get_nrn_environment()
        
        PyNRNEngine.path = path_nrn
        PyNRNEngine.environment_vars = {}
        PyNRNEngine.environment_vars.update(environment_vars_nrn)
            
        inform("PATH: " + PyNRNEngine.path, indent=2, verbosity =1)
        inform("Env vars: %s" % PyNRNEngine.environment_vars, indent=2, verbosity =1)
    def install(version):

        if not JNeuroMLEngine.is_installed(None):
            JNeuroMLEngine.install(None)
        if not NeuronEngine.is_installed(None):
            NeuronEngine.install(None)

        environment_vars_nrn, path_nrn = NeuronEngine.get_nrn_environment()

        JNeuroMLNRNEngine.path = JNeuroMLEngine.path + \
            ":" + path_nrn
        JNeuroMLNRNEngine.environment_vars = {}
        JNeuroMLNRNEngine.environment_vars.update(
            JNeuroMLEngine.environment_vars)
        JNeuroMLNRNEngine.environment_vars.update(environment_vars_nrn)
        inform("PATH: " + JNeuroMLNRNEngine.path)
        inform("Env vars: %s" % JNeuroMLNRNEngine.environment_vars)
    def install(version):

        if not JNeuroMLEngine.is_installed(None):
            JNeuroMLEngine.install(None)
            inform("%s installed JNeuroML..." % JNeuroMLNetPyNEEngine.name, indent=2, verbosity =1)
        if not NetPyNEEngine.is_installed(None):
            NetPyNEEngine.install(None)
            inform("%s installed NetPyNE (& NEURON)..." % JNeuroMLNetPyNEEngine.name, indent=2, verbosity =1)
            
        environment_vars_nrn, path_nrn = NeuronEngine.get_nrn_environment()

        JNeuroMLNetPyNEEngine.path = JNeuroMLEngine.path+":"+path_nrn
        JNeuroMLNetPyNEEngine.environment_vars = {}
        JNeuroMLNetPyNEEngine.environment_vars.update(JNeuroMLEngine.environment_vars)
        JNeuroMLNetPyNEEngine.environment_vars.update(NetPyNEEngine.environment_vars)
        JNeuroMLNetPyNEEngine.environment_vars.update(environment_vars_nrn)
        inform("PATH: " + JNeuroMLNetPyNEEngine.path)
        inform("Env vars: %s" % JNeuroMLNetPyNEEngine.environment_vars)
    def install(version):

        if not JNeuroMLEngine.is_installed(None):
            JNeuroMLEngine.install(None)
        if not NeuronEngine.is_installed(None):
            NeuronEngine.install(None)
            
        environment_vars_nrn, path_nrn = NeuronEngine.get_nrn_environment()

        JNeuroMLNRNEngine.path = JNeuroMLEngine.path + \
            ":" + path_nrn
        JNeuroMLNRNEngine.environment_vars = {}
        JNeuroMLNRNEngine.environment_vars.update(
            JNeuroMLEngine.environment_vars)
        JNeuroMLNRNEngine.environment_vars.update(
            environment_vars_nrn)
        inform("PATH: " + JNeuroMLNRNEngine.path)
        inform("Env vars: %s" % JNeuroMLNRNEngine.environment_vars)
    def get_jnmlnrnenv():

        environment_vars_nrn, path_nrn = NeuronEngine.get_nrn_environment()

        JNeuroMLNRNEngine.path = JNeuroMLEngine.path + \
            ":" + path_nrn
        JNeuroMLNRNEngine.environment_vars = {}
        JNeuroMLNRNEngine.environment_vars.update(
            JNeuroMLEngine.environment_vars)
        JNeuroMLNRNEngine.environment_vars.update(environment_vars_nrn)

        JNeuroMLNRNEngine.environment_vars.update(
            JNeuroMLEngine.get_environment())

        inform("PATH: " + JNeuroMLNRNEngine.path)
        inform("Env vars: %s" % JNeuroMLNRNEngine.environment_vars)
        del JNeuroMLNRNEngine.environment_vars['PYTHONPATH']

        return JNeuroMLNRNEngine.environment_vars
    def install(version):
        if not NeuronEngine.is_installed(None):
            NeuronEngine.install(None)
            inform("%s installed NEURON..." % PyNNNRNEngine.name,
                   indent=2,
                   verbosity=1)
        if not PyNNEngine.is_installed(None):
            PyNNEngine.install(None)
            inform("%s installed PyNN..." % PyNNNRNEngine.name,
                   indent=2,
                   verbosity=1)

        PyNNNRNEngine.path = PyNNEngine.path + \
            ":" + NeuronEngine.path
        PyNNNRNEngine.environment_vars = {}
        PyNNNRNEngine.environment_vars.update(PyNNEngine.environment_vars)
        PyNNNRNEngine.environment_vars.update(NeuronEngine.environment_vars)
        inform("PATH: " + PyNNNRNEngine.path, indent=2, verbosity=1)
        inform("Env vars: %s" % PyNNNRNEngine.environment_vars,
               indent=2,
               verbosity=1)
        import pyNN
        pynn_mod_dir = os.path.dirname(pyNN.__file__) + '/neuron/nmodl/'
        inform(
            "Attempting to compile PyNN mod files for standard models in %s..."
            % pynn_mod_dir,
            indent=2,
            verbosity=1)

        print(check_output(['ls', pynn_mod_dir], cwd=pynn_mod_dir))

        environment_vars, path = NeuronEngine.get_nrn_environment()
        inform("Using NEURON with env %s at %s..." % (environment_vars, path),
               indent=2,
               verbosity=1)

        print(
            check_output([environment_vars['NEURON_HOME'] + '/bin/nrnivmodl'],
                         cwd=pynn_mod_dir))