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

Commit efa7889

Browse files
authored
Merge pull request #3 from andersx/master
Updated installation instructions and setup.py
2 parents a9b17e1 + d54776c commit efa7889

File tree

2 files changed

+36
-18
lines changed

2 files changed

+36
-18
lines changed

README.md

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,57 @@
1-
# QML: Quantum Machine Learning
1+
# QML: A Python Toolking for Quantum Machine Learning
22

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

55
Current author list:
66
* Anders S. Christensen (University of Basel)
77
* Felix Faber (University of Basel)
8+
* Bing Huang (University of Basel)
89
* O. Anatole von Lilienfeld (University of Basel)
910

1011
## 1) Installation
1112

12-
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:
13+
Installing prerequisite modules (for most Linux systems):
1314

14-
sudo apt-get install libblas-dev liblapack-dev
15+
```bash
16+
sudo apt-get install python-pip gfortran libblas-dev liblapack-dev
1517

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

19-
First you clone this repository:
2021

21-
git clone https://github.com/qmlcode/qml.git
22+
### 1.1) Installing via `pip`:
2223

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

25-
make
26+
```bash
27+
pip install git+https://github.com/qmlcode/qml --user --upgrade
28+
```
2629

27-
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`.
30+
Additionally you can use `pip2 install ...` or `pip3 install ...` to get the Python2 or Python3 versions explicitly. QML supports both flavors.
2831

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

31-
export PYTHONPATH=/path/to/installation/qml:$PYTHONPATH
34+
```bash
35+
pip uninstall qml
36+
```
3237

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

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

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

38-
### 1.3) Installing via `setup.py` with Intel compiler:
46+
### 1.3) Note on Apple/Mac support:
47+
48+
Install QML requires a Fortran compiler. On Darwin you can install it using `brew`:
49+
50+
```bash
51+
brew install gcc
52+
```
3953

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

4356

4457
## 2) Representations of compounds:

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ def setup_pepytools():
9595

9696
name="qml",
9797

98+
install_requires=[
99+
"numpy",
100+
"scipy"
101+
],
102+
98103
# metadata
99104
version=__version__,
100105
author=__author__,

0 commit comments

Comments
 (0)