The major components of relax

Each of the boxes in Figure 13.1 represents a different grouping of code.

The top level module. This initialises the entire program, tests the dependencies, sets up the multi-processor framework and specific processor fabric, and prints the program's introduction message.
Command line arguments:
This code processes the arguments supplied to the program and decides whether to print the help message, initialise the prompt, execute a script, initialise a different UI, run the program in test mode, or run the program as a slave thread.
The main user interface consisting of a Python prompt. The namespace of the interpreter contains the various user functions which are front ends to the generic code. The user functions are simply Python functions which test the supplied arguments to make sure they are of the correct type (string, integer, list, or any other type) before sending the values to the generic code. The code for the prompt is located in the directory prompt/.
If a script is supplied on the command line or executed within another user interface it will be run in the same namespace as that of the prompt. Hence the script has access to all the user functions available at the relax prompt. This allows commands which are typed at the prompt to be pasted directly and unmodified into a text file to be run as a script.
The graphical user interface code base is located in the gui directory.
Other interfaces:
Any number of interfaces (for example a web-based interface or an ncurses interface) could be added to relax without modification of the current sources. This must be, without question, developed within the relax source code repository otherwise the code will not be maintainable in the future and will be almost impossible back into relax later on.
Generic code:
This code includes classes and functions which are independent of the UI and not specific to a certain data pipe type, for example not being involved in model-free analysis, relaxation curve-fitting, the NOE calculation, and reduced spectral density mapping. All this code is located in the directory pipe_control/.
Specific setup:
This code implements the internal interface between the generic and specific code. The generic code calls the specific setup asking for a specific function for the given data pipe type. For example by asking for the minimise function when the data pipe type is model-free analysis the model-free specific minimise() method is returned. Although the generic code accesses the specific code solely through this interface the specific code can access the generic code directly. The code is located in the file specific_fns/
Specific code:
This is the code which is specific to the data pipe type - model-free analysis, relaxation curve-fitting, reduced spectral density mapping, and the NOE calculation. Each type is located in a separate file in the directory specific_fns/.
Mathematical functions:
This is reserved for CPU intensive code involved in calculations. The code may be written in Python however C code can be used to significantly increase the speed of the calculations. For optimisation the code can include function evaluations, calculation of gradients, and calculation of Hessians. These functions are located in the directory maths_fns/.
The program state stored in the relax data store singleton object. This class contains all the program data and is accessed by the generic and specific code. The mathematical functions may also access this data but this is not recommended. The structure is initialised by the file data/

The relax user manual (PDF), created 2016-10-28.