The source code for pylada can be obtained from github.
cmake: software tool to configure and create the makefiles. Any version 2.8 and larger should work. This program is often available on supercomputers via module load cmake.
Boost: A set of high-performance C++ libraries. Most of these libraries contain only header files. Hence, they can be installed rather easily. However, Pylada does require as many as two compiled package: python, and the math package when compiling Pylada’s Ewald functional. PyLada uses the following header-only libraries: mpl, enable if, type traits, preprocessor, bind, ref, static assert, exceptions. Most Linux distributions will contain Boost in some rpm of deb package. It is often not available on supercomputers and will need to be installed there.
Note
Pylada also uses boost.mpi in some of its default configuration scripts. It is a python package which interface with the MPI library. It is not strictly required and other MPI package could replace it in the relevant config files.
Eigen: An efficient C++ numerical library. This is a header-only library which is fairly easy to install with CMake. Versions 2 and 3 are supported.
Python: programming language with which to interface with Pylada. Should be between version 2.6.4 included and 3.0 excluded. Python is likely available by default on any unix system.
Numpy: a Python package for numerical calculations. It is available on all Linux distributions. It is often time available by default on supercomputers. If not, it can be installed via easy_install or pip.
quantities: A Python package which implements physical dimensions and units, such as length, weight, etc. It works well with Numpy. It is unlikely to be installed by default on any system. It can be installed easily with easy_install or pip.
IPython: an interactive shell for Python. It forms the basis of Pylada’s user-interface. It must be version 0.13 or higher. It can be installed in its simplest form without any of its optional dependencies. This package will not likely to be found installed by default. It can be installed easily with easy_install or pip.
Scipy: It is only required to relax structures with the Valence Force Field functional. In that case, version 0.11 or higher is required. A Python package for scientific computing. It is available on all Linux distributions. It is often time available by default on supercomputers. If not, it can be installed via easy_install or pip.
sphinx: Only required to create the documentation. Can be installed via easy_install or pip.
ctest: Only required to run the test suite. It is distributed with cmake.
The following assumes the required packages listed above are installed. It also assumes that the source code for Pylada has extracted to some directory.
> cd directory/with/pylada/source
> mkdir build
> cd build
> cmake ..
The code above will create a directory where all compilation objects will be stored. It moves to that directory and runs cmake once. At this point we have a configured system.
To enable different Pylada sub-packages and to fine tune the configuration, do:
> ccmake ..
This will load up a somewhat graphical interface to cmake. You can navigate using the down and up arrows, edit a line using [ENTER] (and the left/right arrows, [TAB], ...), search for specific term using [/]...
It is recommended to set:
- CMAKE_BUILD_TYPE: Release
- CMAKE_INSTALL_PREFIX: /some/path/where/to/install/lada
Pylada’s subpackages (VASP wrapper, ipython interface,...) can be enabled using ccmake. Once you have modified the two variables above and chosen which sub-package to enable, hit [c] to configure, and then [g] to generate the resulting makefiles. You may need to hit [c] and [g] multiple times. Eventually, it will drop you to the bash prompt.
> make
> make install
The last two lines should see you through the installation.
In a python shell, try importing pylada:
>>> import pylada
If you have an error, then python does not know how to find the directory where Pylada was installed. Make sure that python is is set up correctly to include this directory. In general, it is defined by CMAKE_INSTALL_PREFIX and CMAKE_PYINSTALL_PREFIX.
Once the above works:
> cd path/to/pylad/source
> cd build
> make test
This will run Pylada’s unit-tests. It may take some time. Hopefully, most tests will run. Note that some tests for VASP, CRYSTAL, and such, will require that Pylada be configure first, e.g., told how to find the relevant programs.
This documentation is generated using sphinx. Assuming that python can find the Pylada installation, the documentation can be generated with:
> cd path/to/pylada/source
> cd sphinx-doc
> make html
This will create a directory “build/html” with an “index.html” file. View it with your favorite browser and voilà!
Note
Virtualenv users will want to do pip install sphinx to make sure that sphinx is started using the virtualenv python.
Unices with gnu compiler, intel compiler, but not Portland compiler (eigen does not compile). Known to work on Mac OS/X.