Introduction to pyiron modules: pyiron_base

Here, a brief introduction to pyiron_base and its components is presented. In the answers/comments to this post, you can ask any questions about pyiron_base, or discuss new desirable features which you think should be added to this module.

Pyiron modular structure

Pyiron is known as an IDE for material science workflows. It facilitates various types of simulation and analysis workflows across multiple scales such as DFT simulations using VASP/SPHInX, molecular dynamics simulation using LAMMPS, continuum simulation using DAMASK or FEniCS, analyzing STEM images using pySTEM library, … .

To support such multiscale/multi-purpose workflows, pyiron includes the necessary functionalities within its modular structure. The modularity is ensured via pyiron conda packages: pyiron_base, pyiron_atomistics, pyiron_continuum, pyiron_experimental, pyiron_gui, and pyiron_contrib. This structure of pyiron allows the users to obtain the required functionalities without the need to install unnecessary packages.

The objective of pyiron_base

pyiron_base provides the basic components of pyiron packages to manage a generic workflow. It provides a hierarchical storage interface based on HDF5 files, support for HPC computing clusters, a user interface integrated in the Jupyter environment, and an interface to a central database.

All other pyiron packages are built on top of pyiron_base. The base package, as all the other pyiron packages, is developed in object-oriented python, therefore each component can be treated as building blocks which can be brought together to manage a workflow.

Components and building blocks

The top level components

To offer the generic functionalities for various workflow types, pyiron_base has multiple components as its classes:

Components Description
database The database object, which stores the general metadata of each job (simulation/analyses) and their corresponding project.
Project Generic Project object can be described as a frame on top of which multiple jobs (simulation/analyses) is created and managed
Generic Jobs Generic Job classes, which includes the generic attributes to interact with HDF5 files, central database, and the executable. Additionally, pyiron_base offers generic job classes for interactive jobs, master/child jobs.
hdf5 files interface The results of each job are serialized in a hierarchical format within hDF5 files. pyiron_base offers the interface between the jobs and HDF5 files. Additionally pyiron projects can also store relevant data to the whole project in HDF5 files.
Setting the setting object takes care of configuration of pyiron so that the interface between each component function as planned.
HPC connection interface Pyiron_base provides via its server object the required setting and configuration to submit/return jobs from computational nodes of a cluster.

Normally the objects defined in other pyiron modules are defined based on the inheritance from the generic classes in pyiron_base.

Other generic components and functionalities

Components Description
pack and unpack In order to share a pyiron project, pyiron can pack a project in its latest stage (with all the results and data in HDF5 files and database) to be shared. The unpacking can import a packed project to a new pyiron environment.
DataContainer a pyiron object for storing sequential python variables, like list, dictionary, arrays, etc. It also offers to read in various input file formats.
GUI object The GUI object provides a graphical interface to explore the result of the jobs within a project.
pyiron table table object is the data mining tool inside pyiron which gather the desirable data from a series of jobs by connecting the metadata from the database and job results from HDF5 files.

Installation and testing

You can install pyiron_base from conda-forge channel via,


conda install -c conda-forge pyiron_base

For an out-of-the-box experience, you can use our docker images as,


docker run -p 8888:8888 --name pyiron_base_container pyiron/base:latest

Source

The source of pyiron_base is available on GitHub via https://github.com/pyiron/pyiron_base.
Though you can contribute directly to pyiron_base, it is recommended that the users’ contributions are introduced first in pyiron_contrib package, via GitHub - pyiron/pyiron_contrib: User developments to extend and modify core pyiron functionality.

Documentation

The documentation and tutorial for all pyiron packages can be found under https://pyiron.org.

More video tutorials are available via:

2 Like