Note
Before you install: We provide various levels of environments to test pyiron:
Local Installation (recommeded) <InstallLocal>
: for Windows, Linux or Mac OS X workstation (interface for local VASP executable, support for the latest jupyterlab based GUI)Mybinder.org (beta) <InstallBinder>
: test pyiron directly in your browser (no VASP license, only temporary data storage)Docker (for demonstration) <InstallDocker>
: requires docker installation (no VASP license, only temporary data storage)
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.
As pyiron is written in Python you can install pyiron either via anaconda (recommended) or via pip.
To install anaconda you can download the anaconda distribution. Following the installation update to the latest version of conda from conda-forge.
conda update -c conda-forge conda
After the update of the anaconda environment you can install pyiron using:
conda install -c conda-forge pyiron
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
.
In addition to the pyiron package we recommend installing the NGLview visualization framework.
conda install -c conda-forge nglview
jupyter nbextension install nglview --py --sys-prefix
jupyter nbextension enable nglview --py --sys-prefix
conda install -c conda-forge nodejs nglview
jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
jupyter labextension install nglview-js-widgets
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
conda install -c pyiron lammps
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 insidepyiron_lammps
and those for vasp can be placed inpyiron_vasp
.
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()
To get a better overview of all the available functionality inside pyiron we recommend the examples provided in the examples section - examples
.
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.
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.
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 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 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"
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.
:maxdepth:2