Access to the internals of relax

To enable advanced Python scripting and control, many parts of relax have been designed in an object oriented fashion. If you would like to play with internals of the program the entirety of relax is accessible by importation. For example all data is contained within the object called the relax data store which, to be able to access it, needs be imported by typing:

relax> from data_store import Relax_data_store; ds = Relax_data_store()

The ds object is a dictionary type which contains the multiple data pipes. All of relax's packages, modules, functions, and classes are also accessible by import statements. For example to create a rotation matrix from three Euler angles in the z-y-z notation, type:

relax> alpha = 0.1342
relax> beta = 1.0134
relax> gamma = 2.4747
relax> from lib.geometry.rotations import euler_to_R_zyz
relax> from numpy import float64, zeros
relax> R = zeros((3,3), float64)
relax> euler_to_R_zyz(alpha, beta, gamma, R)
relax> print(R)
[[-0.494666415429033 -0.557373756841289 -0.666813041737502]
 [ 0.219125193028791 -0.822460914570202  0.524921131013452]
 [-0.84100492699311   0.113545317776532  0.528978424497956]]

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