16 #include <unordered_map>
19 #include <bbp/sonata/edges.h>
20 #include <bbp/sonata/nodes.h>
21 #include <bbp/sonata/optional.hpp>
24 #include "optional.hpp"
25 #include "variant.hpp"
231 std::string morphologiesDir;
232 std::unordered_map<std::string, std::string> alternateMorphologiesDir;
233 std::string biophysicalNeuronModelsDir;
246 std::string _expandedJSON;
249 ConfigStatus _status = ConfigStatus::complete;
252 std::string _nodeSetsFile;
255 std::unordered_map<std::string, NodePopulationProperties> _nodePopulationProperties;
258 std::unordered_map<std::string, EdgePopulationProperties> _edgePopulationProperties;
271 enum class IntegrationMethod { invalid = -1, euler, crank_nicolson, crank_nicolson_ion };
273 static constexpr
double DEFAULT_spikeThreshold = -30.0;
274 static constexpr IntegrationMethod DEFAULT_IntegrationMethod = IntegrationMethod::euler;
275 static constexpr
int DEFAULT_stimulusSeed = 0;
276 static constexpr
int DEFAULT_ionchannelSeed = 0;
277 static constexpr
int DEFAULT_minisSeed = 0;
278 static constexpr
int DEFAULT_synapseSeed = 0;
287 double spikeThreshold = DEFAULT_spikeThreshold;
290 IntegrationMethod integrationMethod = DEFAULT_IntegrationMethod;
293 int stimulusSeed = DEFAULT_stimulusSeed;
295 int ionchannelSeed = DEFAULT_ionchannelSeed;
298 int minisSeed = DEFAULT_minisSeed;
300 int synapseSeed = DEFAULT_synapseSeed;
308 enum class SpikesSortOrder { invalid = -1, none, by_id, by_time };
310 static constexpr
char DEFAULT_outputDir[] =
"output";
311 static constexpr
char DEFAULT_logFile[] =
"";
312 static constexpr
char DEFAULT_spikesFile[] =
"out.h5";
313 static constexpr SpikesSortOrder DEFAULT_sortOrder = SpikesSortOrder::by_time;
316 std::string outputDir = DEFAULT_outputDir;
318 std::string logFile = DEFAULT_logFile;
320 std::string spikesFile = DEFAULT_spikesFile;
322 SpikesSortOrder sortOrder = DEFAULT_sortOrder;
326 enum class ModificationType { invalid = -1, TTX, ConfigureAllSections };
352 enum class SpikeLocation { invalid = -1, soma, AIS };
353 static constexpr
double DEFAULT_celsius = 34.0;
354 static constexpr
double DEFAULT_vInit = -80.0;
355 static constexpr SpikeLocation DEFAULT_spikeLocation = SpikeLocation::soma;
356 static constexpr
bool DEFAULT_randomizeGabaRiseTime =
false;
359 double celsius = DEFAULT_celsius;
361 double vInit = DEFAULT_vInit;
363 SpikeLocation spikeLocation = DEFAULT_spikeLocation;
369 bool randomizeGabaRiseTime = DEFAULT_randomizeGabaRiseTime;
373 std::unordered_map<std::string, std::unordered_map<std::string, variantValueType>>
384 enum class Sections { invalid = -1, soma, axon, dend, apic, all };
385 enum class Type { invalid = -1, compartment, lfp, summation, synapse };
386 enum class Scaling { invalid = -1, none, area };
387 enum class Compartments { invalid = -1, center, all };
419 using ReportMap = std::unordered_map<std::string, Report>;
437 relative_ornstein_uhlenbeck
440 enum class InputType {
443 extracellular_stimulation,
467 bool representsPhysicalElectrode =
false;
472 double percentStart{};
476 bool representsPhysicalElectrode =
false;
487 bool representsPhysicalElectrode =
false;
498 bool representsPhysicalElectrode =
false;
503 double percentLess{};
505 bool representsPhysicalElectrode =
false;
510 bool representsPhysicalElectrode =
false;
522 double seriesResistance{};
534 bool representsPhysicalElectrode =
false;
556 bool representsPhysicalElectrode =
false;
572 double meanPercent{};
577 bool representsPhysicalElectrode =
false;
581 double relativeSkew{};
600 bool representsPhysicalElectrode =
false;
604 double relativeSkew{};
621 bool representsPhysicalElectrode =
false;
635 double meanPercent{};
640 bool representsPhysicalElectrode =
false;
658 using InputMap = std::unordered_map<std::string, Input>;
695 enum class SimulatorType { invalid = -1, NEURON, CORENEURON };
725 const std::
string& getJSON() const noexcept;
730 const std::
string& getNetwork() const noexcept;
735 const
Run& getRun() const noexcept;
740 const
Output& getOutput() const noexcept;
750 std::set<std::
string> listReportNames() const;
758 const
Report& getReport(const std::
string& name) const;
763 std::set<std::
string> listInputNames() const;
770 const
Input& getInput(const std::
string& name) const;
788 const std::
string& getNodeSetsFile() const noexcept;
793 const std::
string& getCompartmentSetsFile() const noexcept;
798 const nonstd::optional<std::
string>& getNodeSet() const noexcept;
815 const std::
string& getExpandedJSON() const;
819 std::
string _expandedJSON;
821 std::
string _basePath;
832 std::
string _network;
838 SimulatorType _targetSimulator;
840 std::
string _nodeSetsFile;
842 std::
string _compartmentSetsFile;
844 nonstd::optional<std::
string> _nodeSet{nonstd::nullopt};
846 std::unordered_map<std::string, variantValueType> _metaData;
848 std::unordered_map<std::string, variantValueType> _betaFeatures;
CircuitConfig(const std::string &contents, const std::string &basePath)
ConfigStatus getCircuitConfigStatus() const
EdgePopulation getEdgePopulation(const std::string &name, const Hdf5Reader &hdf5_reader) const
ConfigStatus
Definition: config.h:123
NodePopulation getNodePopulation(const std::string &name, const Hdf5Reader &hdf5_reader) const
const std::string & getCompartmentSetsPath() const
EdgePopulationProperties getEdgePopulationProperties(const std::string &name) const
std::set< std::string > listEdgePopulations() const
const std::string & getExpandedJSON() const
static CircuitConfig fromFile(const std::string &path)
const std::string & getNodeSetsPath() const
NodePopulationProperties getNodePopulationProperties(const std::string &name) const
std::set< std::string > listNodePopulations() const
Definition: hdf5_reader.h:122
static SimulationConfig fromFile(const std::string &path)
const std::string & getBasePath() const noexcept
SimulationConfig(const std::string &content, const std::string &basePath)
class optional
Definition: optional.hpp:847
Definition: variant.hpp:1679
std::string morphologiesDir
Definition: config.h:61
std::string type
Definition: config.h:37
std::string elementsPath
Definition: config.h:44
std::string typesPath
Definition: config.h:51
std::unordered_map< std::string, std::string > alternateMorphologyFormats
Definition: config.h:66
std::string biophysicalNeuronModelsDir
Definition: config.h:56
std::string spatialSynapseIndexDir
Definition: config.h:104
std::string spatialSegmentIndexDir
Definition: config.h:76
const std::vector< Modification > & getModifications() const noexcept
Method to return the full list of modifications in the Conditions section.
std::vector< Modification > modifications
List of modifications that mimics experimental manipulations to the circuit.
Definition: config.h:376
std::unordered_map< std::string, std::unordered_map< std::string, variantValueType > > mechanisms
Definition: config.h:374
std::string target
node_set specifying postsynaptic nodes
Definition: config.h:670
std::string name
the name of the connection override
Definition: config.h:666
std::string source
node_set specifying presynaptic nodes
Definition: config.h:668
std::string nodeSet
Node set which receives the manipulation.
Definition: config.h:329
std::string name
Name of the modification setting.
Definition: config.h:333
ModificationType type
Name of the manipulation. Supported values are “TTX” and “ConfigureAllSections”.
Definition: config.h:331
Sections sections
Sections on which to report. Default value: "soma".
Definition: config.h:392
std::string variableName
Definition: config.h:404
std::string unit
Descriptive text of the unit recorded. Not validated for correctness.
Definition: config.h:406
Scaling scaling
Definition: config.h:397
Type type
Report type.
Definition: config.h:394
std::string cells
Node sets on which to report.
Definition: config.h:390
Compartments compartments
Definition: config.h:400
std::string fileName
Report filename. Default is "<report name>.h5".
Definition: config.h:414
std::string electrodesFile
Filename that contains the weights for the LFP calculation.
Definition: config.h:302