Difference between revisions of "Installation linux"

From relax wiki
Jump to navigation Jump to search
(Switched to the {{relax source}} template for repository links, and removed all SVN references.)
 
(59 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
__TOC__
 +
 
== Installing the relax dependencies ==
 
== Installing the relax dependencies ==
 +
 +
The python-devel and scons packages are only required if the C modules need to be compiled for your system. <br>
 +
 +
* [http://plasma-gate.weizmann.ac.il/Grace/ Grace] software is used for visualisation of 2D data sets.
 +
* '''subversion''' is only if you wan't to checkout the source code.
 +
* matplotlib is not a necessity, but is likely to be implemented later for extended plotting.
  
 
=== RHEL 5 and compatible distributions ===
 
=== RHEL 5 and compatible distributions ===
Line 9: Line 17:
 
yum install numpy
 
yum install numpy
 
yum install scipy
 
yum install scipy
yum install python-matplotlib
 
 
yum install scons
 
yum install scons
 
yum install wxPython
 
yum install wxPython
 
yum install grace
 
yum install grace
</source>
+
yum install subversion
 +
yum install python-matplotlib
  
If you do not have root access but are in the sudo group, you can type:
+
# We can manage python package installations with pip
<source lang="bash">
+
sudo easy_install pip
sudo yum install python
 
sudo yum install python-devel
 
sudo yum install numpy
 
sudo yum install scipy
 
sudo yum install python-matplotlib
 
sudo yum install scons
 
sudo yum install wxPython
 
sudo yum install grace
 
 
</source>
 
</source>
  
The python-devel and scons packages are only required if the C modules need to be compiled for your system.  The [http://plasma-gate.weizmann.ac.il/Grace/ Grace] software is used for visualisation of 2D data sets.
+
If you do not have root access but are in the '''sudo''' group, then add a '''sudo''' before each of the above commands.
  
 
== Minfx and Bmrblib ==
 
== Minfx and Bmrblib ==
  
Remember to check, if there are newer versions of [http://download.gna.org/minfx minfx] and [http://download.gna.org/bmrblib bmrblib]. <br>
+
# [[Minfx#Install | Minfx]]
The [https://gna.org/projects/minfx/ minfx] and [https://gna.org/projects/bmrblib/ bmrblib] libraries can be installed on all Linux systems by typing:
+
# [[Bmrblib#Install | Bmrblib]]
<source lang="bash">
+
# [[mpi4py#Install | mpi4py]]
wget http://download.gna.org/minfx/minfx-1.0.5.tar.gz
 
tar -xzf minfx-1.0.5.tar.gz
 
cd minfx-1.0.5
 
python setup.py install
 
cd ..
 
 
 
wget http://download.gna.org/bmrblib/bmrblib-1.0.3.tar.gz
 
tar -xzf bmrblib-1.0.3.tar.gz
 
cd bmrblib-1.0.3
 
python setup.py install
 
cd ..
 
</source>
 
  
 
== Testing the Python installation ==
 
== Testing the Python installation ==
  
 
Before installing relax, it is best to be sure that the Python modules are functional by importing them:
 
Before installing relax, it is best to be sure that the Python modules are functional by importing them:
<source lang="python">
+
 
 +
{{collapsible script
 +
| type  = Python commands
 +
| title  = Testing modules by importing them.
 +
| lang   = python
 +
| script =
 
$ python
 
$ python
 
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48)
 
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48)
Line 66: Line 59:
 
>>> minfx.__file__
 
>>> minfx.__file__
 
'...'
 
'...'
</source>
+
 
 +
>>> import mpi4py
 +
>>> mpi4py.__file__
 +
'...'
 +
}}
  
 
== Checking out a relax branch ==
 
== Checking out a relax branch ==
  
If you would like to play with relax branch rather than the main [http://www.nmr-relax.com/download.html relax downloads], the [http://subversion.tigris.org/ Subversion] program should first be installed. First the relax sources can be checked out of the source code repository and the C modules compiled:
+
If you would like to play with relax branch rather than the main [http://www.nmr-relax.com/download.html relax downloads], the [https://git-scm.com/ Git] program should first be installed. <br>
 +
You can see the different branches {{relax source|text=here}}. <br>
 +
First the relax sources can be checked out of the source code repository and the C modules compiled:
 +
 
 +
=== Using git ===
 +
To check out the relax trunk using the git client, simply type:
 +
{{#tag:source|
 +
{{relax clone}}
 +
| lang="bash"
 +
}}
 +
 
 +
=== Compilation of the C modules ===
 +
 
 +
For the {{:R1}} and {{:R2}} and relaxation dispersion analyses, the relax C modules must be compiled.  This is done using the scons program, by simply typing:
 
<source lang="bash">
 
<source lang="bash">
svn co svn://svn.gna.org/svn/relax/branches/relax_disp relax_disp
+
cd relax_trunk
cd relax_disp
 
 
scons
 
scons
 +
</source>
  
# Optional building of the user manual, if a LaTeX installation is available.
+
You must be in the base relax directory for this to work.
scons user_manual_pdf
 
</source>
 
  
If the svn command does not work, try:
+
In addition, if you would like to compile the relax user manual via LaTeX, you can also use scons. See the wiki page [[manual]].:
<source lang="bash">
 
svn co http://svn.gna.org/svn/relax/branches/relax_disp relax_disp
 
</source>
 
  
 
=== Add to path - C_shell / Tcsh ===
 
=== Add to path - C_shell / Tcsh ===
 +
 
<source lang="bash">
 
<source lang="bash">
cd relax_disp
+
cd relax_trunk
 
echo "setenv PATH $PWD"':$PATH' >> $HOME/.cshrc
 
echo "setenv PATH $PWD"':$PATH' >> $HOME/.cshrc
 
</source>
 
</source>
 
Restart the terminal, to load the new variables.
 
Restart the terminal, to load the new variables.
  
Start relax in GUI mode
+
== Start relax ==
 +
=== Normal ===
 
<source lang="bash">
 
<source lang="bash">
 +
# Normal
 +
relax
 +
# See help
 +
relax -h
 +
# In GUI mode
 +
relax -g
 +
# Execute script
 
relax -g
 
relax -g
 
</source>
 
</source>
 +
 +
== Test installation ==
 +
{{caution|After an installation you should really run an [[Installation_test]].}}
 +
 +
== Trouble shooting ==
 +
=== The menu icons are missing in Linux. ===
 +
On some Linux systems, the icons for the menu items are not shown. This was a decision taken by the Gnome developers at some point to keep the GUI minimal, though in recent versions this behaviour has been reverted. <br>
 +
If you suffer from this problem, to reactive the icons simply type in the shell:
 +
gconftool-2 --get /desktop/gnome/interface/menus_have_icons
 +
gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true
 +
 +
For GNOME 3
 +
# Get schemas
 +
gsettings list-schemas
 +
gsettings list-schemas | grep org.gnome.desktop
 +
gsettings list-schemas | grep org.gnome.desktop.interface
 +
 +
# Get keys
 +
gsettings list-keys org.gnome.desktop.interface
 +
gsettings list-keys org.gnome.desktop.interface | grep icon
 +
gsettings list-keys org.gnome.desktop.interface | grep desktop
 +
 +
# Get value
 +
gsettings get org.gnome.desktop.interface icon-theme
 +
 +
# https://wiki.archlinux.org/index.php/GNOME/Tips_and_tricks#Enable_button_and_menu_icons
 +
# Since GTK+ 3.10, the GSettings key 'menus-have-icons' has been deprecated. Icons in buttons and menus can still be enabled by setting the following overrides:
 +
gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/ButtonImages': <1>, 'Gtk/MenuImages': <1>}"
 +
 +
# Check
 +
gsettings list-keys org.gnome.settings-daemon.plugins.xsettings
 +
gsettings get org.gnome.settings-daemon.plugins.xsettings overrides
  
 
== See also ==
 
== See also ==
 
[[Category:Installation]]
 
[[Category:Installation]]

Latest revision as of 20:42, 27 October 2017

Installing the relax dependencies

The python-devel and scons packages are only required if the C modules need to be compiled for your system.

  • Grace software is used for visualisation of 2D data sets.
  • subversion is only if you wan't to checkout the source code.
  • matplotlib is not a necessity, but is likely to be implemented later for extended plotting.

RHEL 5 and compatible distributions

For RPM-based Linux distributions with access to the YUM installer, first install the relax dependencies with:

yum install python
yum install python-devel
yum install numpy
yum install scipy
yum install scons
yum install wxPython
yum install grace
yum install subversion
yum install python-matplotlib

# We can manage python package installations with pip
sudo easy_install pip

If you do not have root access but are in the sudo group, then add a sudo before each of the above commands.

Minfx and Bmrblib

  1. Minfx
  2. Bmrblib
  3. mpi4py

Testing the Python installation

Before installing relax, it is best to be sure that the Python modules are functional by importing them:

Checking out a relax branch

If you would like to play with relax branch rather than the main relax downloads, the Git program should first be installed.
You can see the different branches here.
First the relax sources can be checked out of the source code repository and the C modules compiled:

Using git

To check out the relax trunk using the git client, simply type:

git clone git://git.code.sf.net/p/nmr-relax/code/ relax

Compilation of the C modules

For the R1 and R2 and relaxation dispersion analyses, the relax C modules must be compiled. This is done using the scons program, by simply typing:

cd relax_trunk
scons

You must be in the base relax directory for this to work.

In addition, if you would like to compile the relax user manual via LaTeX, you can also use scons. See the wiki page manual.:

Add to path - C_shell / Tcsh

cd relax_trunk
echo "setenv PATH $PWD"':$PATH' >> $HOME/.cshrc

Restart the terminal, to load the new variables.

Start relax

Normal

# Normal
relax
# See help
relax -h
# In GUI mode
relax -g
# Execute script
relax -g

Test installation

Caution  After an installation you should really run an Installation_test.

Trouble shooting

The menu icons are missing in Linux.

On some Linux systems, the icons for the menu items are not shown. This was a decision taken by the Gnome developers at some point to keep the GUI minimal, though in recent versions this behaviour has been reverted.
If you suffer from this problem, to reactive the icons simply type in the shell:

gconftool-2 --get /desktop/gnome/interface/menus_have_icons
gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true

For GNOME 3

# Get schemas
gsettings list-schemas
gsettings list-schemas | grep org.gnome.desktop
gsettings list-schemas | grep org.gnome.desktop.interface
# Get keys
gsettings list-keys org.gnome.desktop.interface 
gsettings list-keys org.gnome.desktop.interface | grep icon
gsettings list-keys org.gnome.desktop.interface | grep desktop
# Get value
gsettings get org.gnome.desktop.interface icon-theme
# https://wiki.archlinux.org/index.php/GNOME/Tips_and_tricks#Enable_button_and_menu_icons
# Since GTK+ 3.10, the GSettings key 'menus-have-icons' has been deprecated. Icons in buttons and menus can still be enabled by setting the following overrides: 
gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/ButtonImages': <1>, 'Gtk/MenuImages': <1>}"
# Check
gsettings list-keys org.gnome.settings-daemon.plugins.xsettings
gsettings get org.gnome.settings-daemon.plugins.xsettings overrides

See also