diff --git a/README.md b/README.md index 44fc8f683..9105f2cde 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/setup.py b/setup.py index 751569bd3..131875d7e 100755 --- a/setup.py +++ b/setup.py @@ -95,6 +95,11 @@ def setup_pepytools(): name="qml", + install_requires=[ + "numpy", + "scipy" + ], + # metadata version=__version__, author=__author__,