Graphic User Interface (GUI) Tutorial¶
0. Introduction¶
This tutorial will guide you through using the GUI for creating input files for a NERDSS simulation using a simple reaction of: A+B–>C (A.B complex)
1. Importing ioNERDSS and running the GUI¶
Must have ioNERDSS python package installed before running the GUI. IoNERDSS can be installed using “pip install ioNERDSS” in the command line.
[ ]:
import ionerdss as io
io.gui()
After running the code as shown above, a window pops up with the Parameters tab being the first tab:
For more information on all of the user-specific inputs and what they mean, view the ioNERDSS User Guide here.
Since this is a simple tutorial, all of the inputs will be whole numbers. Feel free to change up the numbers to test how it affects the simulation.
The next tab is then the Boundaries screen as shown here:
The third tab is the Molecules tab:
After entering all of the information for the molecule, click “Add Molecule” and if the molecule was successfully added, a window will pop up that says: “___.mol has been successfully generated” and the molecule name and copy number/concentration should pop up in the box below.
For each reactant, a new molecule needs to be added. Therefore, all of this information needs to be input for the second reactant, B, as shown below:
Again, after entering this information, click “Add Molecule” and a window should pop up stating that the .mol file was successfully generated. **Do not click “Generate .inp File” yet, instead go to the Reactions tab as shown below.
Then click “Add Reaction”, a window should pop up stating “Reaction added” if the reaction was successfully added. If this window does not pop up, the reaction has not been added and there may be an issue with chosen parameters.
After adding all molecules and reactions necessary, the “Generate .inp file” button should be clicked. This should save all mol files and the inp file within the working directory. To check working directory:
[5]:
import os
os.getcwd()
[5]:
'/Users/hannahroscom/Desktop/GUI Tutorial'
The working directory will then be shown, and the files should be found in that directory.
The parms.inp file that is generated should look like this if the molecules and reactions were successfully added:
All of the information the user input is compiled into this parameters file that the NERDSS software uses to run the simulation.
To run a simulation with these files, simply put the .mol and the .parms files in a folder with the NERDSS executable, then change directory to that folder using the terminal/command line, and run NERDSS using “./nerdss -f parms.inp” in the terminal/command line. These instructions will only work if all of the steps to make/get NERDSS has been followed from the NERDSS User Guide.
2. Analyzing Output Files from a NERDSS Simulation¶
There are many different python functions within ioNERDSS to assist with analyzing and visualizing data from a NERDSS simulation. For tutorials for the different types of analysis, there is a tutorials folder for ioNERDSS that contains many tutorials based off of what type of reaction is being simulated.
An example of a visualization/analysis of the data would be the 3D histogram function as shown below:
[3]:
multi_species=io.MultiHistogram(FileName="histogram_complexes_time.dat", FileNum=1, InitialTime=0.0,FinalTime=1.0,SpeciesList=["A","B"])
result = multi_species.hist_3D_complex_dist(xAxis = 'A', yAxis = 'B', xBarSize = 1, yBarSize = 1)
There are many functions to visualize and analyze the data from a NERDSS run, feel free to try them out with any reaction created within the GUI!