Installation

Note

Before you install: We provide various levels of environments to test pyiron:

  • Local Installation (recommeded): for Windows, Linux or Mac OS X workstation (interface for local VASP executable, support for the latest jupyterlab based GUI)
  • Mybinder.org (beta): test pyiron directly in your browser (no VASP license, no visualization, only temporary data storage)
  • Docker (for demonstration): requires docker installation (no VASP license, only temporary data storage)

Workstation Installation (recommeded)

Requirements

When you start to develop your own simulation protocols we recommend a local installation. Inside the pyiron anaconda repository we provide precompiled executables for Linux, Mac OS X and Windows with Python 2.7, 3.5 and 3.6 and the other packages are available inside the conda-forge channel.

Install pyiron package

You can install pyiron either via anaconda (recommended) or via pip.

Install via pip:

pip is installed on Linux and Mac Os X by default and is included in most Python distributions. To install pyiron via pip type:

pip install pyiron

While the anaconda installation already includes the lammps executable, the pip installation requires the user to include a lammps executable named lmp_serial for Linux and Mac Os X or lmp_serial.exe for windows in their PATH.

Visualization

In addition to the pyiron package we recommend installing the NGLview visualization framework.

Test version 1.1.2 – for jupyter lab

conda install ipywidgets=7.1.2 nodejs -c conda-forge
pip install nglview==1.1.2
nglview enable
conda install jupyterlab=0.31.12 -y -c conda-forge
jupyter-labextension install @jupyter-widgets/jupyterlab-manager@0.33.2
jupyter-labextension install nglview-js-widgets@1.1.2

Configuration

After the installation of pyiron we need to configure pyiron. The default configuration can be generated automatically. In the terminal, start a new Python session and import pyiron:

> import pyiron
>>> It appears that pyiron is not yet configured, do you want to create a default start configuration (recommended: yes). [yes/no]:
> yes
> exit()

The configuration does the following steps in the background:

  • Create an ~/.pyiron config file – with the default settings (for simple installations)
  • Create an ~/pyiron/projects directory – pyiron can only execute calculation within this project directory to prevent any interference, with other tools or simulation management solutions.
  • Create an ~/pyiron/resources directory – this directory includes the link to the executables and potentials, sorted by code. The potentials for lammps are inside pyiron_lammps and those for vasp can be placed in pyiron_vasp.

First calculation

After the successful configuration you can start your first pyiron calculation. Navigate to the the projects directory and start a jupyter notebook or jupyter lab session correspondingly:

cd ~/pyiron/projects
jupyter notebook

or

cd ~/pyiron/projects
jupyter lab

Open a new jupyter notebook and inside the notebook you can now validate your pyiron calculation by creating a test project, setting up an initial structure of bcc Fe and visualize it using NGLview.

from pyiron import Project
pr = Project('test')
basis = pr.create_structure('Fe', 'bcc', 2.78)
basis.plot3d()

Finally a first lammps calculation can be executed by:

ham = pr.create_job(pr.job_type.Lammps, 'lammpstestjob')
ham.structure = basis
ham.potential = ham.list_potentials()[0]
ham.run()

Next step

To get a better overview of all the available functionality inside pyiron we recommend the examples provided in the examples section - Tutorials.

Computer Cluster (HPC)

While the local Installation is designed to scale beyond a single workstation, further multi user extensions are required like:

  • Jupyterhub for managing multiple Jupyter Sessions.
  • PostgreSQL database for scalability.
  • Queuing system for job management.
  • Access Control lists for sharing files between users.

For further details please open a support request.

Mybinder.org (beta)

Warning

Mybinder.org is currently in beta stage, it should not take longer than a minute to load. We are sorry for the inconvenience.

You can test pyiron on Mybinder.org (beta), without the need of a local installation. This installation comes with the following limitations:

  • No VASP license, DFT calculation can be imported and loaded but the execution is disabled.
  • No visualization of atomistic structures using NGLview.
  • Only temporary data storage, when you leave your session on Mybinder.org (beta) the environment is reset.

The Mybinder service is the most flexible way to test pyiron and get a first impression. Start pyiron on MyBinder.org to test your first pyiron examples.

Docker (for demonstration)

Commonly it is easier to install pyiron directly using anaconda following the Local Installation (Workstation) instead of installing Docker. If you already setup Docker on your system, you might still be interested in downloading the pyiron container. While Mybinder.org (beta) is based on a similar Docker image, running the Docker image locally enables more flexibility. In particular the graphical user interface is fully supported in this version. Still the following limitations remain:

  • No VASP license, DFT calculation can be imported and loaded but the execution is disabled.
  • Only temporary data storage, when you shutdown your Docker instance the environment is reset.

This installation of pyiron is most suitable for presentations. After the local installation of Docker there are two versions to choose from stable version based on jupyter notebooks and the latest beta version based on jupyter lab. For both versions the first command downloads the image from Dockerhub and the second command executes it locally.

Docker image with jupyter notebook (stable)

docker pull pyiron/pyiron:latest
docker run -i -t -p 8888:8888 pyiron/pyiron /bin/bash -c "/opt/conda/bin/jupyter notebook --notebook-dir=/home/pyiron/pyiron/projects --ip='*' --port=8888 --allow-root"

Docker image with jupyter lab (beta)

docker pull pyiron/pyiron:lab
docker run -i -t -p 8888:8888 pyiron/pyiron:lab /bin/bash -c "/opt/conda/bin/jupyter lab --notebook-dir=/home/pyiron/pyiron/projects --ip='*' --port=8888 --allow-root"

Connect

After the run command the following line is displayed: Copy/paste this URL into your browser when you connect for the first time, to login with a token:

http://localhost:8888/?token=<your_token>

Open the link with your personal jupyter token <your_token> in the browser of your choice. Just like the Binder image also the Docker image comes with the examples preinstalled.