In the ChemChains directory there is a folder called Plugins, within this folder is a file called config.txt, which contains a list of all plugins to be executed by ChemChains. The source for a plugin called 'Extension' would be in '/ChemChains/Plugins/Extension' and the library that will be loaded will be '/ChemChains/Plugins/Extension/Extension.so'. The abstract class Plugin in Plugin.hpp functions as an API from which plugins inherit. 

Throughout a simulation ChemChains will be calling different functions on the plugin, here is a breakdown of what will happen:

1.Initialize
The initialize() function is called

2.Pre Simulation Activities, called before each Simulation
		ChemChains will populate the variables listed in Plugin with their setters.
		The function preSim() is called. 
		The function bool nSpecs() is called.
		If true was returned from bool nSpecs the function string getSpecs() will be called .
		The function nLogic() is called.
		If true was returned from bool nLogic the function string getLogic() will be called.
	
3.Mid Simulation Activities, called on every iteration
The variable t will be updated to the current step.
		The function string retrieveNodeLevel() will be called.
		If a string was returned from retrieveNodeLevel() the current level of the boolean node with that name will be sent to sendNodeLevel(string, int)
		The function midSim() will be called.
		The function pair<string, int> setInputNodeLevel() will be called until it returns a blank string.

4.Post Simulation Activities, called after each Simulation
The function postSim() will be called.

5.After all of the Simulations are finished
		The function close() will be called.

	When running multiple simulations the order of these activities would be;
			1, 2, 3, 3, 3, ..., 4, 2, 3, 3, 3, ..., 4, 5 

More information about the expected behaviors and purposes of these functions can be found in the example plugin.
