Installation

Note

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

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, 3.6 and 3.7 and the other packages are available inside the conda-forge channel.

Install pyiron package

As pyiron is written in Python 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.

Stable version – for jupyter lab

conda install -c conda-forge nodejs nglview
jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
jupyter labextension install nglview-js-widgets

Simulation code: Lammps

pyiron supports the simulation codes VASP for DFT calculation and Lammps for molecular dynamics calculation. While VASP requires a separate license and therefore has to be configured by the user, Lammps is available as opensource code and can be installed from anaconda.

For Linux and Mac Os X (for Python 2.7, 3.5, 3.6 and 3.7):

conda install -c conda-forge lammps

For windows:

conda install -c pyiron lammps

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
> pyiron.install()
>>> 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 "source /srv/conda/envs/notebook/bin/activate; jupyter notebook --notebook-dir=/home/pyiron/ --ip='*' --port=8888"

Docker image with jupyter lab (beta)

docker pull pyiron/pyiron:latest
docker run -i -t -p 8888:8888 pyiron/pyiron /bin/bash -c "source /srv/conda/envs/notebook/bin/activate; jupyter lab --notebook-dir=/home/pyiron/ --ip='*' --port=8888"

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.