Run relax at

From relax wiki
Jump to: navigation, search

Try relax at

This tutorial shows how to get relax running at is optimal for

  • fully functional linux and python environment
  • online accessibility
  • rapid installation of relax
  • testing purposes
  • teaching is not the optimal for

  • long-time calculations stretching over several days
  • multiple CPU's (above 4 CPU's )


The meanings are

  • Member hosting: This lets you move a project to a members-only server, which has much less load. If you have 16 of these, you can move 16 projects. You can change which projects you move at any time, though it can take a little while to move a project (depending on load).
  • Network access:' This makes it so your project has 100% access to the whole internet, so you can connect to any external website. Otherwise, there is a small whitelist of sites (e.g., pypi, github) that a project may connect to.
  • Idle timeout You can allocate time between projects so that if you just shut your browser and come back (or aren't active), the project will continue running your code instead of just shutting down. By default, projects top running after 1 hour of not being actively used through a web browser.
  • CPU shares: This allows you to increase your priority relative to other users on the same computer. So if the system is loaded, your code will run a bit faster than other users.

Sign-up and ssh to account

Do the following

  • Go to
  • Sign-up for account. Note, you don't even need a "working e-mail", as no confirmation mail is send. It just works.

Establish file access over SSH

At your own computer, create a SSH-keypair.

tlinnet@linmac:.ssh$ ssh-keygen

Then load your key and copy the content the public-key to clipboard

tlinnet@linmac:~$ ssh-add $HOME/.ssh/id_sage
tlinnet@linmac:~$ ssh-add -l

Then copy the content of the public key to clipboard

cat $HOME/.ssh/
# On a mac, one can copy directly to the the clipboard of the computer
cat $HOME/.ssh/ | pbcopy
# On linux

Then create a project at

  • Click at the project, and click then on the settings wrench.
  • Under the info box Project control, there is a button to >_ SSH into your project...
  • Then click on the link to ~/.ssh/authorized_keys,
  • In the next window, paste in the line from before of cat $HOME/.ssh/
  • Save and close the tab of ~/.ssh/authorized_keys, .
  • Click again on the settings wrench.
  • Again under the info box Project control, there is a button to >_ SSH into your project...
  • Here comes the USER@HOST info you need

It could look like this: 

From you own terminal at your computer, try


To make things easier, you can but this in your SSH config file

cat <<EOF >> $HOME/.ssh/config
Host sage
Compression yes
ForwardX11 no
Port 22
cat $HOME/.ssh/config

Then try the connection

ssh sage


When ssh connected to your project, try some of the following commands:

htop -u `whoami`

Upload files to the server

We download the latest version of relax and upload from your personal computer to the server.
NOTE, you should have a webbrowser open where you are logged in to the project. The IDLE time of 1 hour could have closed the connection.

mkdir -p $CDIR
cd $CDIR
curl$v.GNU-Linux.x86_64.tar.bz2 -o relax-$v.GNU-Linux.x86_64.tar.bz2

Then copy it to the server, using SSH and the config file prepared before with the hostname sage

#First fast check
touch test.txt
scp test.txt sage:
ssh sage
# Upload of approx 100 MB file
scp relax-4.0.3.GNU-Linux.x86_64.tar.bz2 sage:
ssh sage
# Or use rsync
rsync --progress -avzhe ssh $CDIR sage:
ssh sage

Unpack relax and run

ssh sage
mkdir -p $HOME/bin
tar xvjf relax-4.0.3.GNU-Linux.x86_64.tar.bz2
rm relax-4.0.3.GNU-Linux.x86_64.tar.bz2
ln -s $HOME/relax-4.0.3/relax $HOME/bin
# See version and test
relax -i
relax --time -u
relax --time -s

Install trunk of relax

ssh sage
git clone git:// relax
# Build
cd relax
# Link to executable
cd $HOME
mkdir -p $HOME/bin
ln -s $HOME/relax/relax $HOME/bin/relax
# See relax info
relax -i

install Minfx

See Minfx

mkdir -p $HOME/Downloads
cd $HOME/Downloads
curl$v.tar.gz -o minfx-$v.tar.gz
tar -xzf minfx-$v.tar.gz
cd minfx-$v
pip install .
cd $HOME
# Test relax
relax_trunk -i

install Bmrblib

See Bmrblib

mkdir -p $HOME/Downloads
cd $HOME/Downloads
curl$v.tar.gz -o bmrblib-$v.tar.gz
tar -xzf bmrblib-$v.tar.gz
cd bmrblib-$v
pip install .
cd $HOME
# Test relax
relax_trunk -i

Use of relax trunk

Systemtests of relax trunk

# Test relax
relax_trunk -i
relax_trunk --time -u
relax_trunk --time -s Relax_disp.test_repeat_cpmg
relax_trunk --time -s Relax_disp
relax_trunk --time -s

See also