> For the complete documentation index, see [llms.txt](https://elishai.gitbook.io/retinal-stimulation-modeling-environment/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elishai.gitbook.io/retinal-stimulation-modeling-environment/preliminaries/rsme-and-model-initialization.md).

# RSME and Model initialization

### RSME

RSME is comprised of few main Python files:

* **Functions.py**\
  Comprises the many functions used by RSME for model building and simulation
* **SimParameters.py**\
  includes the XML parsing engine (described next, in the "model specification" chapter) and various model-specific functions (e.g., synapse dynamics)
* **Simulation.py**\
  The main RSME wrapper
* **Stimuli\_visual\_pattern.py**\
  A library containing a set of visual stimulation (e.g., rings of light, drifting bars)

Importantly:

* RSME generates results and logs in a dedicated Results folder
* RSME models are specified in hierarchical XML files (described later)
* RSME uses HOC morphology files (described later)
* RSME can use precompiled data to accelerate simulation, given as pickle files (described later)
* RSME uses a short NEURON script named: fixnseg.hoc, used to correct the segment number within each morphological section. You can download the file at the link below.

{% file src="/files/-MlQcKb3EWv3y9U\_b50Y" %}

### Model Initialization

To initialize a model you need to import three libraries: NEURON (described earlier), SimParameters, and Simulation:

```
from neuron import h
from SimParameters import SimulationParameters
from Simulation import Simulation
```

Following the description of model specification, we showcase various models and simulations.
