# Coding structure
COSMOSS is a Matlab based program. The Graphic User Interfaces(GUI) end can be break down in to three parts:
- Structure model generation (model_GUIs)
- Spectral simulations (main_GUI)
- Spectral analysis (tool_GUIs)
<!--  -->
```mermaid
graph LR
subgraph Summary of GUIs
A1(Two-coupled oscillators) -->B
A2(PDB AmideI) -->B
A3(2D grid from Gaussian 09) -->B
A4(Ideal betasheet AmideI) -->B
A5(Previously saved)-->B
A6(Combination of any two models) --> B
B((COSMOSS))
B --> C1(Transition strength)
B --> C2(Orientation analysis)
B --> C3(Response visulization)
B --> C4(2D Cut)
end
subgraph Data transfer framework
AF(structure model GUI)
-- Structure Data--> BF((main GUI))
--Spectral Data--> CF(tool GUI)
end
```
The simulation procedure end can be summarized in the flow chart:
<!--  -->
```mermaid
graph TD
A(Choose structure model) -->|subGUIs| B(constructe model)
B --> |Export2Parent| F(choose simulation model)
F --> |FTIR, SFG, 2DIR, 2DSFG|G(ensemble average?)
G --> |yes| H(update parameters)
H --> J(append spectra)
J --> K(reach loop end?)
K --> |yes| L(draw specta)
K --> |No| H
G --> |No| L
```
###### tags: `COSMOSS` `code`