Skip to content

Commit df94fc5

Browse files
authored
Merge pull request #661 from UWB-Biocomputing/issue-652-update-neural-docs
[ISSUE 652] Update Neural Docs
2 parents 8c38b5f + 761df91 commit df94fc5

File tree

5 files changed

+319
-41
lines changed

5 files changed

+319
-41
lines changed
File renamed without changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# GraphML Generation
2+
3+
Recently we changed our configuration structure through introducing GraphML as the file that holds the details regarding the initial structure of Neual simulations. As the initial structure of the simulations get larger and more complex, there came a need to have a tool to generate the GraphML files. This tool is a simple python script that uses [networkx](https://networkx.org/documentation/latest/tutorial.html). The script helps define the vertices of the graph and 3 of their attributes: the (x, y) location, the type of neuron (excitatory or inhibitory), and the activeness (whether endogenously active or not) of the neuron.
4+
5+
# Script Details
6+
7+
Currently, the neurons in the simulation are placed in a grid format, meaning that there are `n x n` neurons in a square grid, with each neuron's (x, y) location being a whole number. Therefore, the script defines a `height` variable to determine the size of the grid and the number of neurons.
8+
9+
Afterwards, there are two lists: `ActiveNList` and `InhibitoryNList`. `ActiveNList` defines which neurons are endogenously active (uses a boolean), while `InhibitoryNList` defines which neurons are inhibitory (uses a string); any neuron that isn't in `InhibitoryNList` is defined as excitatory.
10+
11+
To generate the GraphML file, first open the python script and edit the variable and two lists mentioned above. After that, edit the string `example.graphml` to your desired file name (leave the `.graphml` part). Finally, run the python file in the command line to generate the file.
12+
13+
Note: You might have noticed that the `node[active]` attributed is set to either 0 or 1 instead of `True` and `False`. This is because the GraphML file stores them as python booleans, which the c++ code can't parse.
14+
15+
# Important Note Regarding `attr.type`
16+
17+
When you create the file, you may see any boolean key you have created has a different data type than what you intended.
18+
19+
![image](https://github.com/UWB-Biocomputing/Graphitti/assets/125625083/16367b4f-7a0a-4642-bf7b-c139aabf0b9a)
20+
21+
This could be a problem as there will be a data type mismatch, which will break the simulation. You will need to edit the GraphML file so that it the attribute data type is correct.
22+
23+
![image](https://github.com/UWB-Biocomputing/Graphitti/assets/125625083/ba6f866f-df1c-41a4-b29b-c2c910242b06)
24+

configfiles/test-large-long.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<BGSimParams>
33
<SimInfoParams name="SimInfoParams">
4-
<graphmlFile name="graphmlFile">../configfiles/graphs/test-large.graphml</graphmlFile> <SimParams name="SimParams">
4+
<graphmlFile name="graphmlFile">../configfiles/graphs/test-large.graphml</graphmlFile>
5+
<SimParams name="SimParams">
56
<epochDuration name="epochDuration">100.0</epochDuration>
67
<numEpochs name="numEpochs">10</numEpochs>
78
</SimParams>

docs/Developer/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Students, use this [quickstart guide](StudentSetup.md) to help setup, use, and d
4545
- [Performing Analyses](PerformingAnalyses.md)
4646
- [Neuro Implementation](NeuroImplementation.md)
4747
- [GraphManager and InputManager classes](GraphAndEventInputs.md)
48+
- [Configuration](../User/configuration.md)
4849

4950

5051
---------

0 commit comments

Comments
 (0)