emodelrunner.create_hoc

Creates .hoc from cell.

Functions

copy_features_hoc(config)

Copy features hoc file into cell directory.

get_hoc(config)

Return the hoc scripts as strings.

write_hoc(hoc_dir, hoc_file_name, hoc)

Write hoc file.

write_hocs(hoc_paths, cell_hoc, simul_hoc, ...)

Write hoc files.

emodelrunner.create_hoc.copy_features_hoc(config)[source]

Copy features hoc file into cell directory.

emodelrunner.create_hoc.get_hoc(config)[source]

Return the hoc scripts as strings.

Parameters

config (configparser.ConfigParser) – configuration

Raises

KeyError – If no voltage_base feature is found for Rin in feature file

Returns

cell_hoc, syn_hoc, simul_hoc, run_hoc

the hoc scripts for the cell, the synapses, the simulation and the run_launcher. syn_hoc is None if the synapses were not added

Return type

(str, str, str, str)

emodelrunner.create_hoc.write_hoc(hoc_dir, hoc_file_name, hoc)[source]

Write hoc file.

Parameters
  • hoc_dir (str) – directory to write the file in

  • hoc_file_name (str) – name to give to the file

  • hoc (str) – content of the file

emodelrunner.create_hoc.write_hocs(hoc_paths, cell_hoc, simul_hoc, run_hoc, syn_hoc=None, main_protocol_hoc=None)[source]

Write hoc files.

Parameters
  • hoc_paths (HocPaths) – contains paths of the hoc files to be created

  • cell_hoc (str) – content of the cell hoc file

  • simul_hoc (str) – content of the ‘create simulation’ hoc file

  • run_hoc (str) – content of the hoc file meant to run the simulation

  • syn_hoc (str) – content of the synapses hoc file

  • main_protocol_hoc (str) – content of the main protocol hoc file