mean_scaling,
                                                              variance_scaling)
            # delete all existing synaptic connections and associated information
            project.generatedNetworkConnections.reset()
            project.morphNetworkConnectionsInfo.deleteAllNetConns()
            # generate connections according to graph
            utils.nC_generate_gj_network_from_graph(project,
                                                    sim_config,
                                                    gj_graph,
                                                    'Golgi_network_reduced',
                                                    'GJGolgi_Reduced',
                                                    ['GCL', 'ML1', 'ML2', 'ML3'],
                                                    'Golgi_gap_2010')
            # export generated network structure to graphml for debugging
            utils.nC_network_to_graphml(project, '/home/ucbtepi/thesis/data/GoC_net_structures/graph_' + sim_ref + '.graphml')
            if simulate:
                # generate, compile and run NEURON files
                remote_sim_refs = utils.nC_generate_NEURON_and_submit(pm,
                                                                      project,
                                                                      sim_config,
                                                                      sim_ref,
                                                                      remote_sim_refs,
                                                                      run_time=14)

if remote_sim_refs:
    utils.wait_and_pull_remote(remote_sim_refs, sleep_time=0.5)  

print('timestamp ' + timestamp)
System.exit(0)

        for cell_type in ['Vervaeke', 'reduced']:
            stim = project.elecInputInfo.getStim('network_' + cell_type + '_' +
                                                 stim_source + '_AMPAonly')
            stim.setRate(NumberGenerator(rate_in_kHz))
            project.elecInputInfo.updateStim(stim)
        # generate and compile neuron files
        print "Generating NEURON scripts..."
        project.neuronFileManager.setSuggestedRemoteRunTime(30)
        simulator_seed = random.getrandbits(32)
        project.neuronFileManager.generateTheNeuronFiles(sim_config, None, NeuronFileManager.RUN_HOC,simulator_seed)
        compile_process = ProcessManager(project.neuronFileManager.getMainHocFile())
        compile_success = compile_process.compileFileWithNeuron(0,0)
        # simulate
        if compile_success:
            print "Submitting simulation reference " + sim_ref
            pm.doRunNeuron(sim_config)
            time.sleep(5) # Wait for sim to be kicked off
            if not sim_config.getMpiConf().isRemotelyExecuted():
                # if running locally, never have more than one sim running
                # at the same time
                print('Simulating on the local machine.')
                timefile_path = sim_path + '/time.dat'
                while not os.path.exists(timefile_path):
                    time.sleep(5)

if sim_config.getMpiConf().isRemotelyExecuted():
    wait_and_pull_remote(sim_refs)

print('batch reference net_' + timestamp)
System.exit(0)
示例#3
0
    project.simulationParameters.setReference(sim_ref)
    # create gap junction graph object
    gj_graph = utils.random_graph_heterogeneous_synapses(cell_positions)
    # delete all existing synaptic connections and associated information
    project.generatedNetworkConnections.reset()
    project.morphNetworkConnectionsInfo.deleteAllNetConns()
    # generate connections according to graph
    utils.nC_generate_gj_network_from_graph(project, sim_config, gj_graph,
                                            'Golgi_network_reduced',
                                            'GJGolgi_Reduced',
                                            ['GCL', 'ML1', 'ML2', 'ML3'],
                                            'Golgi_gap_2010')
    # export generated network structure to graphml for debugging
    utils.nC_network_to_graphml(
        project, '/home/ucbtepi/thesis/data/GoC_net_structures/graph_' +
        sim_ref + '.graphml')
    if simulate:
        # generate, compile and run NEURON files
        remote_sim_refs = utils.nC_generate_NEURON_and_submit(pm,
                                                              project,
                                                              sim_config,
                                                              sim_ref,
                                                              remote_sim_refs,
                                                              run_time=14)

if remote_sim_refs:
    utils.wait_and_pull_remote(remote_sim_refs, sleep_time=0.5)

print('timestamp ' + timestamp)
System.exit(0)
                                                 stim_source + '_AMPAonly')
            stim.setRate(NumberGenerator(rate_in_kHz))
            project.elecInputInfo.updateStim(stim)
        # generate and compile neuron files
        print "Generating NEURON scripts..."
        project.neuronFileManager.setSuggestedRemoteRunTime(30)
        simulator_seed = random.getrandbits(32)
        project.neuronFileManager.generateTheNeuronFiles(
            sim_config, None, NeuronFileManager.RUN_HOC, simulator_seed)
        compile_process = ProcessManager(
            project.neuronFileManager.getMainHocFile())
        compile_success = compile_process.compileFileWithNeuron(0, 0)
        # simulate
        if compile_success:
            print "Submitting simulation reference " + sim_ref
            pm.doRunNeuron(sim_config)
            time.sleep(5)  # Wait for sim to be kicked off
            if not sim_config.getMpiConf().isRemotelyExecuted():
                # if running locally, never have more than one sim running
                # at the same time
                print('Simulating on the local machine.')
                timefile_path = sim_path + '/time.dat'
                while not os.path.exists(timefile_path):
                    time.sleep(5)

if sim_config.getMpiConf().isRemotelyExecuted():
    wait_and_pull_remote(sim_refs)

print('batch reference net_' + timestamp)
System.exit(0)
                                                     cell_type)
                stim.setAmp(NumberGenerator(amplitude_in_nA))
                project.elecInputInfo.updateStim(stim)
            # generate and compile neuron files
            print "Generating NEURON scripts..."
            project.neuronFileManager.setSuggestedRemoteRunTime(10)
            simulator_seed = random.getrandbits(32)
            project.neuronFileManager.generateTheNeuronFiles(
                sim_config, None, NeuronFileManager.RUN_HOC, simulator_seed)
            compile_process = ProcessManager(
                project.neuronFileManager.getMainHocFile())
            compile_success = compile_process.compileFileWithNeuron(0, 0)
            # simulate
            if compile_success:
                print "Submitting simulation reference " + sim_ref
                pm.doRunNeuron(sim_config)
                time.sleep(2)  # Wait for sim to be kicked off
                if not sim_config.getMpiConf().isRemotelyExecuted():
                    # if running locally, never have more than one sim running
                    # at the same time
                    print('Simulating on the local machine.')
                    timefile_path = sim_path + '/time.dat'
                    while not os.path.exists(timefile_path):
                        time.sleep(5)

if sim_config.getMpiConf().isRemotelyExecuted():
    utils.wait_and_pull_remote(sim_refs, sleep_time=5)

print('batch reference ' + timestamp_prefix + timestamp)
System.exit(0)
	    amplitude_in_nA = amplitude/1000.
	    for cell_type in ['Vervaeke', 'reduced']:
		stim = project.elecInputInfo.getStim('cclamp_network_' + cell_type)
		stim.setAmp(NumberGenerator(amplitude_in_nA))
		project.elecInputInfo.updateStim(stim)
	    # generate and compile neuron files
	    print "Generating NEURON scripts..."
	    project.neuronFileManager.setSuggestedRemoteRunTime(10)
	    simulator_seed = random.getrandbits(32)
	    project.neuronFileManager.generateTheNeuronFiles(sim_config, None, NeuronFileManager.RUN_HOC,simulator_seed)
	    compile_process = ProcessManager(project.neuronFileManager.getMainHocFile())
	    compile_success = compile_process.compileFileWithNeuron(0,0)
	    # simulate
	    if compile_success:
		print "Submitting simulation reference " + sim_ref
		pm.doRunNeuron(sim_config)
		time.sleep(2) # Wait for sim to be kicked off
		if not sim_config.getMpiConf().isRemotelyExecuted():
		    # if running locally, never have more than one sim running
		    # at the same time
		    print('Simulating on the local machine.')
		    timefile_path = sim_path + '/time.dat'
		    while not os.path.exists(timefile_path):
			time.sleep(5)

if sim_config.getMpiConf().isRemotelyExecuted():
    utils.wait_and_pull_remote(sim_refs, sleep_time=5)

print('batch reference ' + timestamp_prefix + timestamp)
System.exit(0)