relax: dynamics analysis, model-free analysis, relaxation data, R1 and R2 exponential curve-fitting, steady-state NOE calculation, reduced spectral density mapping, relaxation dispersion, N-state model, frame order dynamics theories, stereochemistry, conformational analysis, organic molecules, proteins, RNA, DNA, sugars, and other biomolecules.

relax - Molecular dynamics by NMR data analysis

Analysis software for: Model-free, NMR relaxation (R1, R2, NOE), reduced spectral density mapping, relaxation dispersion, N-state models, frame order theory.

MS Windows development platform

By installing the following software, you will be able to compile relax's C modules, compile the LaTeX manual, generate relax distribution packages, check out source code from the relax repository, cleanly edit relax's source code, and GPG sign files for security.

1. SCons

1.1 Why install?

The SCons build system was chosen over other build systems including 'make' as it is a cross-platform build system which can be used in Unix, GNU/Linux, Mac OS X, and MS Windows. Various components of the program relax can be created using the SCons utility. This includes C module compilation, creation of the relax LaTeX manual, creation of the distribution packages, and cleaning up and removing certain files. The file 'sconstruct' in the base relax directory, which consists of Python code, directs the operation of SCons for the various functions. For example to compile the C modules, in the relax base directory type:

> scons

To compile the relax LaTeX manual as a PDF file, type:

> scons user_manual_pdf

This requires the installation of LaTeX. To create the pre-compiled distribution packages for your platform (for MS Windows this requires the installation of MS Visual Studio, LaTeX, and GnuPG), type:

> scons binary_dist

For additional uses of the SCons system, see the section of the relax manual titled 'The SCons build system' (PDF version).

1.2 Download

The current version of SCons can be downloaded from here.

1.3 Installation

After double clicking on the installation EXE file, follow the instructions in the installation wizard. The installation should automatically find the Python installation directory and install SCons there.

2. MS Visual Studio (MSVS) Express

2.1 Why install?

Setting up this software will enable compilation of the relax C modules. The compilation using the SCons cross platform compilation tool is described both above and on the download page.

2.2 Download

The Express edition of MS Visual Studio is a cost-free download from the Microsoft website. You will need to choose the version suitable for your operating system. The download size for MS Visual Studio Express is anywhere between 500 Mb to 2 Gb, depending on the options selected, and can be installed by two methods. The first is to download and run the installation executable file and then install the Microsoft Platform SDK. The second method is to download and burn a CD or ISO image containing all the software. No additional software is required if installing from the CD image. The following is a list of links for downloading the different files for various MSVS versions, in English, directly from the Microsoft website:

Express edition Installation executable ISO image
MS Visual Studio 2005 Express
MS Visual Studio 2008 Express (SP1)
MS Visual Studio 2010 Express
MS Visual Studio 2012 Express for Windows Desktop

2.3 Installation

If the ISO image has been downloaded and burnt onto CD, inserting the CD will commence the installation process. The installation wizard is relatively straight forward and the software can be installed anywhere. You can also use the ISO image directly without burning it to disk, if you know how.

2.4 relax module compilation problems

2.4.1 Python issues

After typing scons from the relax base directory to compile the C modules, the following error may occur:

c:\python24\include\pyconfig.h(130) : fatal error C1083: cannot open include file: 'basetsd.h': No such file or directory

If you encounter this problem, the solution is straightforward. Simply change line 130 of the file 'include\pyconfig.h' (the line number might be different for newer Python versions), located in the base Python installation directory, from

#include <basetsdh>


/* #include <basetsdh> */

2.4.2 SCons issues (cannot find the MSVS compiler)

For very old SCons versions (< 0.96.92) the following error may occur:

'cl' is not recognized as an internal or external command, operable program or batch file.

To fix the problem edit the file 'scons-version\SCons\Tool\' in the Python installation directory, where version is the installed SCons version. Within the function 'get_msvs_install_dirs()' (at line 1319), change the lines:

  • K = 'Software\\Microsoft\\VisualStudio\\' + str(version_num)
  • if (version_num >= 8.0):
    • try:
      • SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE, K )
    • except SCons.Util.RegError:
      • K = 'Software\\Microsoft\\VCExpress\\' + str(version_num)


  • K = 'Software\\Microsoft\\VisualStudio\\' + str(version_num)
  • if (version_num >= 8.0):
    • K = 'Software\\Microsoft\\VCExpress\\' + str(version_num)

2.4.3 SCons issues (32-bit MSVS compiler on 64-bit MS Windows)

A similar error message is seen if you use the 32-bit MSVS compiler on 64-bit MS Windows. This is for all SCons versions <= 2.3.0. After typing 'scons', you will see the error:

'cl' is not recognized as an internal or external command, operable program or batch file.

This is caused by a bug in the SCons program. The fix is quite simple, just find the 'Tools\MSCommon\' or 'Tool\MSCommon\' file in your installed SCons version. Find the 'msvc_find_valid_batch_script()' function in that file. Then change the line:

  • if not req_target_platform and target_platform in ('amd64','x86_64'):


  • if target_platform in ('amd64','x86_64'):

However the best option is to upgrade to SCons version 2.3.1 or higher.

3. Git

3.1 Why install?

The relax source code is kept within the relax git repository. After installing git, you are then able to obtain the code directly from the repository by typing:

> git clone git:// relax

3.2 Download and installation

The MS Windows installation files can be downloaded from

4. Code editors

4.1 Vim

4.1.1 Why install?

Vim is a powerful text editor which can be used to edit the relax source code. The programs Notepad or Wordpad should not be used to edit the relax source code as tabs are not translated into 4 spaces. Blocks of Python code should be indented using four spaces (the Python convention). The combination of tabs and spaces will cause relax to fail.

Vim's graphical interface is accessible through the gvim program (this is installed with the rest of Vim). If you have never used Vim or the vi programs before, understanding how the program works can take a while. A tutorial is installed together with the program and is available through the program vimtutor.

4.1.2 Download

The current version of Vim, as of October 2006, is 7.0. The MS Windows installation file is gvim70.exe. Please visit the Vim download site for newer versions.

4.1.3 Installation

After double clicking on the installation EXE file, follow the instructions in the installation wizard.

4.1.4 Post-install

The Vim configuration file should be modified prior to editing relax's source code. The configuration file for MS Windows is called '_vimrc' and is located in the Vim installation directory (which in the default setup is 'C:\Program Files\Vim\_vimrc'). To the end of this file, add the following lines:

  • set nobackup
  • set tabstop=4
  • set shiftwidth=4
  • set expandtab
  • set lbr

The nobackup command stops gvim from creating backup files (files ending in ~). The tabstop, shiftwidth, and expandtab commands are for setting up the correct indentation for the relax source code. The command lbr enables word wrap in the program.

5. LaTeX

5.1 Why install?

Installing LaTeX will enable the relax manual to be compiled. As the distribution packages all contain the relax PDF manual, this ability is only required if you are a relax developer.

5.2 Download

The LaTeX distribution for MS Windows is called ProTeXt. This free software can be downloaded from one of the CTAN mirrors from the directory 'CTAN:systems/windows/protext'.

For version 1.3 (protext-1.3.exe), the size of the ProTeXt download is 407 Mb. This file is a WinRAR self-extracting archive. After installation following the instructions below, the total size of the files on disk is ~880 Mb.

5.3 Installation

5.3.1 File extraction and the PDF file

Double click on the file 'protext-1.3.exe' to extract the files to disk. As the instructions below are for a minimal installation, these files should be installed in a directory such as 'C:\ProTeXt' and left on the system. To commence the installation, double click on the file 'Setup.exe' which is located in this directory. This will open a PDF file from which the software can be installed.

5.3.2 LaTeX installation

To launch the LaTeX installation wizard, click on the link called 'Click here to install MiKTeX' located within the PDF file (which is opened after executing the 'Setup.exe' file). Then follow these step:

  • Select 'Install MiKTeX on my hard-disk'.
  • Select the 'Small' package set. If the full package set is installed, then the original files extracted from the WinRAR archive can be deleted. Otherwise when asked to select the the 'local repository' when running LaTeX, point the program to the MiKTeX directory which was extracted from the archive (for example 'C:\ProTeXt\MiKTeX\' if the files were extracted to 'C:\ProTeXt\').
  • Select 'Install MiKTeX for everyone' if you are the computer administrator.
  • To avoid problems in running LaTeX, leave the installation directories at the default locations (see the PDF file for details).
  • Select 'Don't integrate existing TEXMF trees'.
  • Check the installation options.
  • Select 'Finish' to complete the installation.

5.3.3 Ghostscript installation

Ghostscript is required to convert LaTeX compiled device independent file (.dvi) into the final PDF file through the commands dvips and ps2pdf. To launch the Ghostscript installation wizard, click on the link called 'Click here to install Ghostscript' from within the PDF file. Installation is relatively straight forward.

5.3.4 GSView installation

The intermediate postscript file (and PDF file if Adobe Acrobat Reader is not installed) can be viewed using the GSView program. This program is not essential though. To launch the GSView installation wizard, click on the link called 'Click here to install GSView' from the PDF file. Installation is again relatively straight forward, just click on 'Next' a number of times followed by 'Finish'.

6. GnuPG

6.1 Why install?

The GnuPG program or GPG allows you to sign files for security. This is currently only used by the Project Administrator for signing the distribution packages. GPG signing may be used more widely in the future, especially for securely transferring files.

6.2 Download

The GnuPG web page is located here. For Microsoft Windows the gpg4win distribution should be used. The installation file, as of October 2006, is gpg4win-1.0.6.exe.

6.3 Installation

The installation of gpg4win is straight forward. Just follow the instructions given by the installation wizard after double clicking on the installation EXE file.

6.4 Post-install

Once the installation is complete, the GnuPG installation directory will need to be added to the system path.

7. Modifying the system path

The system path is a list of directories which is searched through by Windows for executable files. By adding the directory in which an executable file is located to the system path, that program can then be executed from any directory within the command prompt or dos box without typing it's full path (C:\Program Files\...). The list of directories are kept in the system variable called PATH.

7.1 The MS Windows XP system path

The directories in the Windows XP system path are separated by the character ';'. To modify the system path in Microsoft Windows XP, use the following steps:

  • Right click on 'My Computer'.
  • Go to 'Properties'.
  • Select the 'Advanced' tab.
  • Click on the 'Environmental Variables' button.
  • Find the 'Path' in the System Variables.
  • Click on 'Edit'.
  • To the end of the variable value add the directory containing the executable file (commencing with a semi colon). For example add the text ';C:\Program Files\Python24'.