Table Of Contents

Previous topic

Introduction

Next topic

Tutorial and Example

Installation

Note

SrRietveld is written in Python and is a cross platform program. Users can install and use SrRietveld on Windows, Linux/Unix, and Mac, on both 32-bit and 64-bit systems.

Install GSAS and FullProf

GSAS and FullProf have to be installed since SrRietveld uses them as backend refinement engines. SrRietveld runs with either engine; however for the greatest functionality we recommend you install both programs.

If you already have them installed you can use your existing installation. Otherwise you they can be separately downloaded and installed by going to the respective download websites. Follow the instructions on the following websites for a standard installation of FullProf and GSAS:

Please make sure GSAS and FullProf can run correctly on your computer. For example, under Linux, tcsh is needed to run the gsas command. On Ubuntu/Debian system, the tcsh shell can be installed with the following command:

sudo apt-get install tcsh

GSAS requires the libg2c.so.0 shared library, which may not be included with the recent system version. This library can be obtained from a previous Ubuntu release at http://packages.ubuntu.com/hardy/libg2c0/.

More details about the GSAS installation can be found here.

Installation and Setup on Windows

Windows users can install SrRietveld with a binary installer SrRietveld-VERSION.exe. Double click the file and follow the steps in the installation wizard.

The SrRietveld program short cut icon will be placed on the desktop after the installation is finished. Double click the desktop icon the SrRietveld program should start. SrRietveld may prompt a setup dialog to initialize the setups, such as the GSAS / FullProf installation paths.

As mentioned before, to start a refinement with SrRietveld, users have to specify the paths of refinement engines (GSAS or FullProf) in SrRietveld. SrRietveld will try to find the GSAS and FullProf executables in the computer, but user can always go to the menu Edit->Settings dialog to specify another location.

Note

During the installation, the Microsoft Virtual C++ Redistributable package will also be installed to provide the necessary dynamic-link libraries.

Installation and Setup on Linux, Mac, and Unix

Install SrRietveld

SrRietveld is distributed in a source archive SrRietveld-VERSION.tar.gz.

SrRietveld requires a number of dependencies (other programs) to run. Many of these are bundled with common Linux distributions such as Ubuntu. However, you will have to verify that you have the dependencies installed before SrRietveld can run. The dependencies are described in dependencies. SrRietveld can be run with GSAS and/or FullProf as the refinement engine. Either one or the other must be installed; however it is recommended to instal both.

Note

Please make sure all the dependencies are installed before proceeding further.

SrRietveld can be installed with the following steps:

  1. Unpack the source archive file

    tar -zxf SrRietveld-VERSION.tar.gz
  2. Change to the extracted distribution directory

    cd SrRietveld-VERSION
  3. Run the included installation script

    sudo ./install_srrietveld.py

    This checks for required Python libraries and if present, it installs SrRietveld to default system location. This requires root privileges as granted by the sudo command. If sudo is not available, you can install to the user-writable directories by passing --prefix or --install-dir options to the installation script.

    Note

    With the --prefix=PREFIXDIR option one needs to create directories for programs and Python files under the PREFIXDIR and add them to the PATH and PYTHONPATH environment variables. These directories can be created as:

    mkdir -p PREFIXDIR/bin
    mkdir -p PREFIXDIR/lib/pythonX.Y/site-packages

    where X.Y must be replaced with the actual Python version, for example 2.6 for Python 2.6.

    The directories need to be added to the appropriate environment variables by adding the following lines to the .bashrc (or .profile, .zshenv as appropriate for your system shell):

    export PATH="PREFIXDIR/bin:${PATH}"
    export PYTHONPATH="PREFIXDIR/lib/pythonX.Y/site-packages:${PYTHONPATH}"

    After all changes to the shell setup file are made, open a new terminal, if you work in the same termial, run the command:

    source ~/.bashrc

    which will take the environment changes into effect.

  4. Test you installation by running

    srrietveld
    

    If it is correctly installed then the SrRietveld GUI window should open. If the program fails to run, a detailed error message will appear which may help solve the problem. You may also look for information from other users at, or post your error message to, our support group at srrietveld-dev to ask for help.

    Please note that GSAS and FullProf have to be installed before SrRietveld can run any refinement. Details of how to use SrRietveld can be found in the Tutorial section.

Dependencies

SrRietveld require some dependencies when running on Linux/Mac. Most of these dependencies come in many standard Linux installations such as Ubuntu. Please check if they are pre-installed in your computer.

Otherwise, they can be easily installed by going to the listed websites, downloading and following the installation instructions. If your Linux installation is Ubuntu, see the note below to rapidly download and install all the dependencies.

Python 2.6 or later
Python is installed by default on most Linux systems and can be also fetched from http://www.python.org/download/.
Python development files
Headers and other files for building Python extensions with C. This is usually available as python-dev package in the system package repository.
setuptools
Utility for installing other Python packages. Available as python-setuptools or python-distribute system package. Also available at http://pypi.python.org/pypi/distribute/.
NumPy 1.1 or later
functions for scientific computing in Python. Available as python-numpy system package or from http://www.numpy.org/.
Matplotlib 0.90 or later
Python plotting library. Available as python-matplotlib system package or from http://matplotlib.org/.
wxPython 2.8
graphical user interface toolkit in Python. Available as python-wxtools system package or from http://wxpython.org/.
tables 1.6.8 or later
library for manipulating hierarchical data in HDF5 format. Available as python-tables system package or from http://www.pytables.org/.

On Ubuntu Linux the required dependencies can be all installed with a single command

sudo apt-get install \
   python-dev python-distribute python-numpy \
   python-matplotlib python-wxtools python-tables

On a Fedora Linux the dependencies could be installed with

sudo yum install \
   python-devel python-setuptools numpy \
   python-matplotlib-wx wxPython python-tables

Other Linux distributions may use different software management tools, but the package names should be similar to those above.