Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from andersx/master
Browse files Browse the repository at this point in the history
Updated installation instructions and setup.py
  • Loading branch information
andersx authored May 30, 2017
2 parents a9b17e1 + d54776c commit efa7889
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 18 deletions.
49 changes: 31 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,57 @@
# QML: Quantum Machine Learning
# QML: A Python Toolking for Quantum Machine Learning

A toolkit for representation learning of molecules and solids.
A Python2/3 toolkit for representation learning of molecules and solids.

Current author list:
* Anders S. Christensen (University of Basel)
* Felix Faber (University of Basel)
* Bing Huang (University of Basel)
* O. Anatole von Lilienfeld (University of Basel)

## 1) Installation

By default FML compiles with GCC's gfortran and your system's standard BLAS+LAPACK libraries (-lblas -llapack). I recommend you switch to MKL for the math libraries, but the difference between ifort and gfortran shouldn't be to significant. BLAS and LAPACK implementations are the only libraries required for FML. Additionally you need a functional Python 2.x interpreter and NumPy (with F2PY) installed. Most Linux systems can install BLAS and LAPACK like this:
Installing prerequisite modules (for most Linux systems):

sudo apt-get install libblas-dev liblapack-dev
```bash
sudo apt-get install python-pip gfortran libblas-dev liblapack-dev

### 1.1) Installing via the `Makefile` (will be removed):
Ok, on to the installation instructions:
```
These should already be installed on most systems. Alternatively the Intel compilers and MKL math-libraries are supported as well (see section 1.3).

First you clone this repository:

git clone https://github.com/qmlcode/qml.git
### 1.1) Installing via `pip`:

Then you simply compile by typing make in the fml folder:
The easiest way to install is using the official, built-in Python package manager, `pip`:

make
```bash
pip install git+https://github.com/qmlcode/qml --user --upgrade
```

Note: If you access to the Intel compilers, you can replace the default `Makefile` with a different `Makefile.*` from the `makefiles/` folder. E.g. `Makefile.intel` will compile the F2PY interface with `ifort` and link to MKL. The default `Makefile` is identical to `Makefile.gnu`.
Additionally you can use `pip2 install ...` or `pip3 install ...` to get the Python2 or Python3 versions explicitly. QML supports both flavors.

To make everything accessible to your Python export the fml root-folder to your PYTHONPATH.
To uninstall simply use `pip` again.

export PYTHONPATH=/path/to/installation/qml:$PYTHONPATH
```bash
pip uninstall qml
```

### 1.2) Installing via `setup.py` with Intel compiler:

### 1.2) Installing via `pip`:
If you have Intel compilers installed, you can compile QML with ifort/MKL using the following options:

pip2 install git+https://github.com/andersx/qml@pip --user
```bash
pip install git+https://github.com/qmlcode/qml.git --user --upgrade --global-option="build" --global-option="--compiler=intelem" --global-option="--fcompiler=intelem"
```

### 1.3) Installing via `setup.py` with Intel compiler:
### 1.3) Note on Apple/Mac support:

Install QML requires a Fortran compiler. On Darwin you can install it using `brew`:

```bash
brew install gcc
```

python2 setup.py build --compiler=intelem --fcompiler=intelem
python2 setup.py install --prefix=/home/$USER/lib/qml
Note: the Clang Fortran compiler in brew does currently not support OpenMP, so this disables parallelism in QML.


## 2) Representations of compounds:
Expand Down
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ def setup_pepytools():

name="qml",

install_requires=[
"numpy",
"scipy"
],

# metadata
version=__version__,
author=__author__,
Expand Down

0 comments on commit efa7889

Please sign in to comment.