== Source code ==
Relax is available at
# https://sourceforge.net/projects/nmr-relax/
# https://github.com/nmr-relax/relax
# https://gitlab.com/nmr-relax/relax
== Install on Redhat 7.3 or mac ==
We will install relax on Red Hat Enterprise Linux Workstation release 7.3<br>
# Check version
python -c "import matplotlib;print matplotlib.__version__"
</syntaxhighlight>
Install mpi4py
<syntaxhighlight lang="bash">
# https://anaconda.org/anaconda/mpi4py
conda install -c anaconda mpi4py
# Check version
python -c "import mpi4py;print mpi4py.__version__"
</syntaxhighlight>
# Clone relax
git clone https://git.code.sf.net/p/nmr-relax/code nmr-relax-code
# OR
git clone https://github.com/nmr-relax/relax.git nmr-relax-code
cd nmr-relax-code
scons
# Test installationSee version and package details./relax -i # The "main" branch is the developing branch. It can contain bugs and be unstable.#You can also "check-out" the last "working version" of relax with# This will show tags used for the numberinggit tag -l '[0-9]*' -n # If the latest version is 4.0.3git checkout tags/4.0.3
# See version and package details
./relax -i
# If you want to use the main branch
git branch --list
git checkout master
# Run unittest
./relax -u
# Try open GUI
./relax -g
# On a mac, if you get this error:
## This program needs access to the screen.
## Please run with a Framework build of python, and only when you are
## logged in on the main display of your Mac.
# Then you should use "pythonw" instead of "python"
pythonw ./relax -g
# Run system tests
./relax -s --time
</syntaxhighlight>
=== Make a an alias to relax===
<syntaxhighlight lang="bash">
cd $HOME/Downloads
mkdir -p $HOME/software
mv nmr-relax-code $HOME/software
echo '# nmr-relax' >> ${HOME}/.cshrc
echo "'alias relax ${PWDHOME}/software/nmr-relax-code/relax" ' >> ${HOME}/.cshrc
</syntaxhighlight>
If you are using mac and BASH, then in $HOME/.bash_profile it should be with
'pythonw'.
<syntaxhighlight lang="bash">
alias relax="pythonw $HOME/software/nmr-relax-code/relax"
</syntaxhighlight>
Restart terminal to take effect
== See also ==
[[Category:Installation]]