Skip to content

Installation on Linux and Mac

Bigginlab edited this page Jun 12, 2018 · 4 revisions

This page should help with installation of LINTools and all its dependencies on a Linux computer.

=== Miniconda ===

Conda is a cross-platform package manager that can easily install various open-source packages. The quickest way to obtain conda is through installation of miniconda - this will contain just conda, its dependencies and Python.

It can be downloaded from [http://conda.pydata.org/miniconda.html here]. Make sure you go for the Python v2.7. Once that is done:

bash Miniconda2-latest-Linux-x86_64.sh

Close and open your terminal for changes to take place. Then check whether the installation has proceeded correctly by updating conda

conda update conda

More information on [ http://conda.pydata.org/docs/install/quick.html miniconda]

=== LINTools dependencies ===

LINTools depends on several other libraries to create the data. All of these can be obtained through conda.

The trickiest one to install is rdkit. Generally, the best way to install it, is to install it in its own conda environment.

conda create -c https://conda.anaconda.org/rdkit -n my-rdkit-env rdkit=2016.03.4

conda install -y -n my-rdkit-env matplotlib geos shapely scipy numpy pip nose cython git
source activate my-rdkit-env
pip install MDAnalysis==0.16.1 mdtraj==1.8.0 pyyaml


#For Mac (OSX)
conda install -c omnia openbabel=2015.09 
#For Linux
sudo apt-get install openbabel

=== LINTools from source ===

If you like more control over what you are building, you can build it from the source.

cd /home/my_software/   #go to a directory where you want to install lintools
git clone https://github.com/bigginlab/lintools.git
cd lintools
python setup.py build
python setup.py install

After these steps, you can check whether everything has ran smoothly by importing lintools in python.

>  import lintools

If you log out of this terminal session, next time you want to use lintools, you will have to activate the rdkit environment again

source activate my-rdkit-env

It can also be very useful to add a similar line to your .bashrc file

alias lintools="python /home/my_software/lintools/lintools/lintools.py"

If you have both Python 3.* and 2.* it can be useful to add this line instead, specifying the Python version.

alias lintools="python2.7 /home/my_software/lintools/lintools/lintools.py"

This will allow to call lintools easily from anywhere in your filesystem.

Clone this wiki locally