Data mining using pyiron tables#

In this example, the data mining capabilities of pyiron using the PyironTables class is demonstrated by computing and contrasting the ground state properties of fcc-Al using various force fields.

from pyiron_atomistics import Project
import numpy as np
pr = Project("potential_scan")

Creating a dummy job to get list of potentials#

In order to get the list of available LAMMPS potentials, a dummy job with an Al bulk structure is created

dummy_job = pr.create.job.Lammps("dummy_job")
dummy_job.structure = pr.create.structure.ase.bulk("Al")
# Chosing only select potentials to run (you can play with these valuess)
num_potentials = 5
potential_list = dummy_job.list_potentials()[:num_potentials]

Creating a Murnaghan job for each potential in their respective subprojects#

A separate Murnaghan job (to compute equilibrium lattice constant and the bulk modulus) is created and run for every potential

for pot in potential_list:
    pot_str = pot.replace("-", "_")
    # open a subproject within a project
    with pr.open(pot_str) as pr_sub:
        # no need for unique job name if in different subprojects
        job_name = "murn_Al"
        # Use the subproject to create the jobs
        murn = pr_sub.create.job.Murnaghan(job_name)
        job_ref = pr_sub.create.job.Lammps("Al_ref")
        job_ref.structure = pr.create.structure.ase.bulk("Al", cubic=True)
        job_ref.potential = pot
        job_ref.calc_minimize()
        murn.ref_job = job_ref
        # Some potentials may not work with certain LAMMPS compilations.
        # Therefore, we need to have a little exception handling
        try:
            murn.run()
        except RuntimeError:
            pass
The job murn_Al was saved and received the ID: 1
The job murn_Al_0_9 was saved and received the ID: 2
The job murn_Al_0_92 was saved and received the ID: 3
The job murn_Al_0_94 was saved and received the ID: 4
The job murn_Al_0_96 was saved and received the ID: 5
The job murn_Al_0_98 was saved and received the ID: 6
The job murn_Al_1_0 was saved and received the ID: 7
The job murn_Al_1_02 was saved and received the ID: 8
The job murn_Al_1_04 was saved and received the ID: 9
The job murn_Al_1_06 was saved and received the ID: 10
The job murn_Al_1_08 was saved and received the ID: 11
The job murn_Al_1_1 was saved and received the ID: 12
The job murn_Al was saved and received the ID: 13
The job murn_Al_0_9 was saved and received the ID: 14
The job murn_Al_0_92 was saved and received the ID: 15
The job murn_Al_0_94 was saved and received the ID: 16
The job murn_Al_0_96 was saved and received the ID: 17
The job murn_Al_0_98 was saved and received the ID: 18
The job murn_Al_1_0 was saved and received the ID: 19
The job murn_Al_1_02 was saved and received the ID: 20
The job murn_Al_1_04 was saved and received the ID: 21
The job murn_Al_1_06 was saved and received the ID: 22
The job murn_Al_1_08 was saved and received the ID: 23
The job murn_Al_1_1 was saved and received the ID: 24
2024-05-07 11:57:00,322 - pyiron_log - WARNING - Minimum could not be found!
The job murn_Al was saved and received the ID: 25
The job murn_Al_0_9 was saved and received the ID: 26
The job murn_Al_0_92 was saved and received the ID: 27
The job murn_Al_0_94 was saved and received the ID: 28
The job murn_Al_0_96 was saved and received the ID: 29
The job murn_Al_0_98 was saved and received the ID: 30
The job murn_Al_1_0 was saved and received the ID: 31
The job murn_Al_1_02 was saved and received the ID: 32
The job murn_Al_1_04 was saved and received the ID: 33
The job murn_Al_1_06 was saved and received the ID: 34
The job murn_Al_1_08 was saved and received the ID: 35
The job murn_Al_1_1 was saved and received the ID: 36
The job murn_Al was saved and received the ID: 37
The job murn_Al_0_9 was saved and received the ID: 38
The job murn_Al_0_92 was saved and received the ID: 39
The job murn_Al_0_94 was saved and received the ID: 40
The job murn_Al_0_96 was saved and received the ID: 41
The job murn_Al_0_98 was saved and received the ID: 42
The job murn_Al_1_0 was saved and received the ID: 43
The job murn_Al_1_02 was saved and received the ID: 44
The job murn_Al_1_04 was saved and received the ID: 45
The job murn_Al_1_06 was saved and received the ID: 46
The job murn_Al_1_08 was saved and received the ID: 47
The job murn_Al_1_1 was saved and received the ID: 48
The job murn_Al was saved and received the ID: 49
The job murn_Al_0_9 was saved and received the ID: 50
The job murn_Al_0_92 was saved and received the ID: 51
The job murn_Al_0_94 was saved and received the ID: 52
The job murn_Al_0_96 was saved and received the ID: 53
The job murn_Al_0_98 was saved and received the ID: 54
The job murn_Al_1_0 was saved and received the ID: 55
The job murn_Al_1_02 was saved and received the ID: 56
The job murn_Al_1_04 was saved and received the ID: 57
The job murn_Al_1_06 was saved and received the ID: 58
The job murn_Al_1_08 was saved and received the ID: 59
The job murn_Al_1_1 was saved and received the ID: 60

If you inspect the job table, you would find that each Murnaghan job generates various small LAMMPS jobs (see column hamilton). Some of these jobs might have failed with status aborted.

pr.job_table()
id status chemicalformula job subjob projectpath project timestart timestop totalcputime computer hamilton hamversion parentid masterid
0 1 finished Al4 murn_Al /murn_Al None /home/jovyan/potential_scan/1995__Angelo_J_E__Ni_Al_H__LAMMPS__ipr1/ 2024-05-07 11:56:22.037894 2024-05-07 11:56:41.684506 19.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1#11/11 Murnaghan 0.3.0 None NaN
1 2 finished Al4 murn_Al_0_9 /murn_Al_0_9 None /home/jovyan/potential_scan/1995__Angelo_J_E__Ni_Al_H__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:30.446682 2024-05-07 11:56:31.188388 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 1.0
2 3 finished Al4 murn_Al_0_92 /murn_Al_0_92 None /home/jovyan/potential_scan/1995__Angelo_J_E__Ni_Al_H__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:31.470085 2024-05-07 11:56:32.218726 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 1.0
3 4 finished Al4 murn_Al_0_94 /murn_Al_0_94 None /home/jovyan/potential_scan/1995__Angelo_J_E__Ni_Al_H__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:32.497862 2024-05-07 11:56:33.228454 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 1.0
4 5 finished Al4 murn_Al_0_96 /murn_Al_0_96 None /home/jovyan/potential_scan/1995__Angelo_J_E__Ni_Al_H__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:33.570989 2024-05-07 11:56:34.301978 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 1.0
5 6 finished Al4 murn_Al_0_98 /murn_Al_0_98 None /home/jovyan/potential_scan/1995__Angelo_J_E__Ni_Al_H__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:34.576265 2024-05-07 11:56:35.290545 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 1.0
6 7 finished Al4 murn_Al_1_0 /murn_Al_1_0 None /home/jovyan/potential_scan/1995__Angelo_J_E__Ni_Al_H__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:35.571002 2024-05-07 11:56:36.353216 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 1.0
7 8 finished Al4 murn_Al_1_02 /murn_Al_1_02 None /home/jovyan/potential_scan/1995__Angelo_J_E__Ni_Al_H__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:36.629701 2024-05-07 11:56:37.340504 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 1.0
8 9 finished Al4 murn_Al_1_04 /murn_Al_1_04 None /home/jovyan/potential_scan/1995__Angelo_J_E__Ni_Al_H__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:37.615662 2024-05-07 11:56:38.326108 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 1.0
9 10 finished Al4 murn_Al_1_06 /murn_Al_1_06 None /home/jovyan/potential_scan/1995__Angelo_J_E__Ni_Al_H__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:38.598443 2024-05-07 11:56:39.359821 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 1.0
10 11 finished Al4 murn_Al_1_08 /murn_Al_1_08 None /home/jovyan/potential_scan/1995__Angelo_J_E__Ni_Al_H__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:39.638707 2024-05-07 11:56:40.384918 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 1.0
11 12 finished Al4 murn_Al_1_1 /murn_Al_1_1 None /home/jovyan/potential_scan/1995__Angelo_J_E__Ni_Al_H__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:40.659000 2024-05-07 11:56:41.407774 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 1.0
12 13 not_converged Al4 murn_Al /murn_Al None /home/jovyan/potential_scan/1996__Farkas_D__Nb_Ti_Al__LAMMPS__ipr1/ 2024-05-07 11:56:41.931111 2024-05-07 11:57:00.327541 18.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1#11/11 Murnaghan 0.3.0 None NaN
13 14 finished Al4 murn_Al_0_9 /murn_Al_0_9 None /home/jovyan/potential_scan/1996__Farkas_D__Nb_Ti_Al__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:42.241398 2024-05-07 11:56:43.627848 1.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 13.0
14 15 finished Al4 murn_Al_0_92 /murn_Al_0_92 None /home/jovyan/potential_scan/1996__Farkas_D__Nb_Ti_Al__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:43.909801 2024-05-07 11:56:45.268343 1.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 13.0
15 16 finished Al4 murn_Al_0_94 /murn_Al_0_94 None /home/jovyan/potential_scan/1996__Farkas_D__Nb_Ti_Al__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:45.551457 2024-05-07 11:56:46.907282 1.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 13.0
16 17 finished Al4 murn_Al_0_96 /murn_Al_0_96 None /home/jovyan/potential_scan/1996__Farkas_D__Nb_Ti_Al__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:47.211666 2024-05-07 11:56:48.570955 1.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 13.0
17 18 finished Al4 murn_Al_0_98 /murn_Al_0_98 None /home/jovyan/potential_scan/1996__Farkas_D__Nb_Ti_Al__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:48.856773 2024-05-07 11:56:50.214337 1.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 13.0
18 19 finished Al4 murn_Al_1_0 /murn_Al_1_0 None /home/jovyan/potential_scan/1996__Farkas_D__Nb_Ti_Al__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:50.492117 2024-05-07 11:56:51.877517 1.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 13.0
19 20 finished Al4 murn_Al_1_02 /murn_Al_1_02 None /home/jovyan/potential_scan/1996__Farkas_D__Nb_Ti_Al__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:52.175269 2024-05-07 11:56:53.526252 1.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 13.0
20 21 finished Al4 murn_Al_1_04 /murn_Al_1_04 None /home/jovyan/potential_scan/1996__Farkas_D__Nb_Ti_Al__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:53.823944 2024-05-07 11:56:55.169724 1.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 13.0
21 22 finished Al4 murn_Al_1_06 /murn_Al_1_06 None /home/jovyan/potential_scan/1996__Farkas_D__Nb_Ti_Al__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:55.452733 2024-05-07 11:56:56.817063 1.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 13.0
22 23 finished Al4 murn_Al_1_08 /murn_Al_1_08 None /home/jovyan/potential_scan/1996__Farkas_D__Nb_Ti_Al__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:57.094456 2024-05-07 11:56:58.420056 1.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 13.0
23 24 finished Al4 murn_Al_1_1 /murn_Al_1_1 None /home/jovyan/potential_scan/1996__Farkas_D__Nb_Ti_Al__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:56:58.699734 2024-05-07 11:57:00.098762 1.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 13.0
24 25 finished Al4 murn_Al /murn_Al None /home/jovyan/potential_scan/1997__Liu_X_Y__Al_Mg__LAMMPS__ipr1/ 2024-05-07 11:57:00.603392 2024-05-07 11:57:10.813639 10.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1#11/11 Murnaghan 0.3.0 None NaN
25 26 finished Al4 murn_Al_0_9 /murn_Al_0_9 None /home/jovyan/potential_scan/1997__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:00.922187 2024-05-07 11:57:01.519597 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 25.0
26 27 finished Al4 murn_Al_0_92 /murn_Al_0_92 None /home/jovyan/potential_scan/1997__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:01.791976 2024-05-07 11:57:02.438493 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 25.0
27 28 finished Al4 murn_Al_0_94 /murn_Al_0_94 None /home/jovyan/potential_scan/1997__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:02.723466 2024-05-07 11:57:03.357677 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 25.0
28 29 finished Al4 murn_Al_0_96 /murn_Al_0_96 None /home/jovyan/potential_scan/1997__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:03.643719 2024-05-07 11:57:04.274098 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 25.0
29 30 finished Al4 murn_Al_0_98 /murn_Al_0_98 None /home/jovyan/potential_scan/1997__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:04.550120 2024-05-07 11:57:05.111960 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 25.0
30 31 finished Al4 murn_Al_1_0 /murn_Al_1_0 None /home/jovyan/potential_scan/1997__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:05.395961 2024-05-07 11:57:06.029891 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 25.0
31 32 finished Al4 murn_Al_1_02 /murn_Al_1_02 None /home/jovyan/potential_scan/1997__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:06.323635 2024-05-07 11:57:06.952051 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 25.0
32 33 finished Al4 murn_Al_1_04 /murn_Al_1_04 None /home/jovyan/potential_scan/1997__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:07.229090 2024-05-07 11:57:07.854787 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 25.0
33 34 finished Al4 murn_Al_1_06 /murn_Al_1_06 None /home/jovyan/potential_scan/1997__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:08.145896 2024-05-07 11:57:08.735454 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 25.0
34 35 finished Al4 murn_Al_1_08 /murn_Al_1_08 None /home/jovyan/potential_scan/1997__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:09.047882 2024-05-07 11:57:09.675134 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 25.0
35 36 finished Al4 murn_Al_1_1 /murn_Al_1_1 None /home/jovyan/potential_scan/1997__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:09.943353 2024-05-07 11:57:10.535174 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 25.0
36 37 finished Al4 murn_Al /murn_Al None /home/jovyan/potential_scan/1998__Liu_X_Y__Al_Mg__LAMMPS__ipr1/ 2024-05-07 11:57:11.058442 2024-05-07 11:57:21.768256 10.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1#11/11 Murnaghan 0.3.0 None NaN
37 38 finished Al4 murn_Al_0_9 /murn_Al_0_9 None /home/jovyan/potential_scan/1998__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:11.366994 2024-05-07 11:57:12.022596 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 37.0
38 39 finished Al4 murn_Al_0_92 /murn_Al_0_92 None /home/jovyan/potential_scan/1998__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:12.300055 2024-05-07 11:57:12.945235 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 37.0
39 40 finished Al4 murn_Al_0_94 /murn_Al_0_94 None /home/jovyan/potential_scan/1998__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:13.262274 2024-05-07 11:57:13.831376 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 37.0
40 41 finished Al4 murn_Al_0_96 /murn_Al_0_96 None /home/jovyan/potential_scan/1998__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:14.119714 2024-05-07 11:57:14.744225 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 37.0
41 42 finished Al4 murn_Al_0_98 /murn_Al_0_98 None /home/jovyan/potential_scan/1998__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:15.026794 2024-05-07 11:57:15.659881 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 37.0
42 43 finished Al4 murn_Al_1_0 /murn_Al_1_0 None /home/jovyan/potential_scan/1998__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:16.257738 2024-05-07 11:57:16.917142 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 37.0
43 44 finished Al4 murn_Al_1_02 /murn_Al_1_02 None /home/jovyan/potential_scan/1998__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:17.195182 2024-05-07 11:57:17.815080 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 37.0
44 45 finished Al4 murn_Al_1_04 /murn_Al_1_04 None /home/jovyan/potential_scan/1998__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:18.086049 2024-05-07 11:57:18.736914 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 37.0
45 46 finished Al4 murn_Al_1_06 /murn_Al_1_06 None /home/jovyan/potential_scan/1998__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:19.029641 2024-05-07 11:57:19.652476 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 37.0
46 47 finished Al4 murn_Al_1_08 /murn_Al_1_08 None /home/jovyan/potential_scan/1998__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:19.939076 2024-05-07 11:57:20.558332 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 37.0
47 48 finished Al4 murn_Al_1_1 /murn_Al_1_1 None /home/jovyan/potential_scan/1998__Liu_X_Y__Al_Mg__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:20.840237 2024-05-07 11:57:21.486299 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 37.0
48 49 finished Al4 murn_Al /murn_Al None /home/jovyan/potential_scan/1999__Liu_X_Y__Al_Cu__LAMMPS__ipr1/ 2024-05-07 11:57:22.017870 2024-05-07 11:57:32.539042 10.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1#11/11 Murnaghan 0.3.0 None NaN
49 50 finished Al4 murn_Al_0_9 /murn_Al_0_9 None /home/jovyan/potential_scan/1999__Liu_X_Y__Al_Cu__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:22.334040 2024-05-07 11:57:22.932644 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 49.0
50 51 finished Al4 murn_Al_0_92 /murn_Al_0_92 None /home/jovyan/potential_scan/1999__Liu_X_Y__Al_Cu__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:23.217067 2024-05-07 11:57:23.834026 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 49.0
51 52 finished Al4 murn_Al_0_94 /murn_Al_0_94 None /home/jovyan/potential_scan/1999__Liu_X_Y__Al_Cu__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:24.121576 2024-05-07 11:57:24.721440 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 49.0
52 53 finished Al4 murn_Al_0_96 /murn_Al_0_96 None /home/jovyan/potential_scan/1999__Liu_X_Y__Al_Cu__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:25.031814 2024-05-07 11:57:25.632425 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 49.0
53 54 finished Al4 murn_Al_0_98 /murn_Al_0_98 None /home/jovyan/potential_scan/1999__Liu_X_Y__Al_Cu__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:25.914574 2024-05-07 11:57:26.586668 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 49.0
54 55 finished Al4 murn_Al_1_0 /murn_Al_1_0 None /home/jovyan/potential_scan/1999__Liu_X_Y__Al_Cu__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:26.862868 2024-05-07 11:57:27.449159 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 49.0
55 56 finished Al4 murn_Al_1_02 /murn_Al_1_02 None /home/jovyan/potential_scan/1999__Liu_X_Y__Al_Cu__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:27.744943 2024-05-07 11:57:28.449344 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 49.0
56 57 finished Al4 murn_Al_1_04 /murn_Al_1_04 None /home/jovyan/potential_scan/1999__Liu_X_Y__Al_Cu__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:28.740248 2024-05-07 11:57:29.423178 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 49.0
57 58 finished Al4 murn_Al_1_06 /murn_Al_1_06 None /home/jovyan/potential_scan/1999__Liu_X_Y__Al_Cu__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:29.725171 2024-05-07 11:57:30.405721 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 49.0
58 59 finished Al4 murn_Al_1_08 /murn_Al_1_08 None /home/jovyan/potential_scan/1999__Liu_X_Y__Al_Cu__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:30.687375 2024-05-07 11:57:31.304845 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 49.0
59 60 finished Al4 murn_Al_1_1 /murn_Al_1_1 None /home/jovyan/potential_scan/1999__Liu_X_Y__Al_Cu__LAMMPS__ipr1/murn_Al_hdf5/ 2024-05-07 11:57:31.612421 2024-05-07 11:57:32.253919 0.0 pyiron@jupyter-pyiron-2dpyiron-5fatomistics-2d813x8ptr#1 Lammps 0.1 None 49.0

Analysis using PyironTables#

The idea now is to go over all finished Murnaghan jobs and extract the equilibrium lattice parameter and bulk modulus, and classify them based of the potential used.

Defining filter functions#

Since a project can have thousands if not millions of jobs, it is necessary to “filter” the data and only apply the functions (some of which can be computationally expensive) to only this data. In this example, we need to filter jobs that are finished and are of type Murnaghan. This can be done in two ways: using the job table i.e. the entries in the database, or using the job itself i.e. using entries in the stored HDF5 file. Below are examples of filter functions acting on the job and the job table respectively.

# Filtering using the database entries (which are obtained as a pandas Dataframe)
def db_filter_function(job_table):
    # Returns a pandas Series of boolean values (True for entries that have status finished
    # and hamilton type Murnaghan.)
    return (job_table.status == "finished") & (job_table.hamilton == "Murnaghan")


# Filtering based on the job
def job_filter_function(job):
    # returns a boolean value if the status of the job
    # is finished and if "murn" is in it's job name
    return (job.status == "finished") & (job.database_entry.hamilton == "Murnaghan")

Obviously, using the database is faster in this case but sometimes it might be necessary to filter based on some data that are stored in the HDF5 file of the job. The database filter is applied first followed by the job based filter.

Defining functions that act on jobs#

Now we define a set of functions that will be applied on each job to return a certain value. The filtered jobs will be loaded and these functions will be applied on the loaded jobs. The advantage of such functions is that the jobs do not have to be loaded every time such operations are performed. The filtered jobs are loaded once, and then they are passed to these functions to construct the table.

# Getting equilibrium lattice parameter from Murnaghan jobs
def get_lattice_parameter(job):
    return job["output/equilibrium_volume"] ** (1 / 3)


# Getting equilibrium bulk modulus from Murnaghan jobs
def get_bm(job):
    return job["output/equilibrium_bulk_modulus"]


# Getting the potential used in each Murnaghan job
def get_pot(job):
    return job["Al_ref/input/potential_inp/potential/Name"]

Creating a pyiron table#

Now that all the functions are defined, the pyiron table called “table” is created in the following way. This works like a job and can be reloaded at any time.

%%time
# creating a pyiron table
table = pr.create.table("table")

# assigning a database filter function
table.db_filter_function = db_filter_function

# Alternatively/additionally, a job based filter function can be applied
# (it does the same thing in this case).

# table.filter_function = job_filter_function

# Adding the functions using the labels you like
table.add["a_eq"] = get_lattice_parameter
table.add["bulk_modulus"] = get_bm
table.add["potential"] = get_pot
# Running the table to generate the data
table.run(delete_existing_job=True)
The job table was saved and received the ID: 61
CPU times: user 296 ms, sys: 28.2 ms, total: 324 ms
Wall time: 1.93 s

The output can now be obtained as a pandas DataFrame

table.get_dataframe()
job_id a_eq bulk_modulus potential
0 1 4.049954 81.040445 1995--Angelo-J-E--Ni-Al-H--LAMMPS--ipr1
1 25 4.032659 83.498560 1997--Liu-X-Y--Al-Mg--LAMMPS--ipr1
2 37 4.033449 90.567635 1998--Liu-X-Y--Al-Mg--LAMMPS--ipr1
3 49 4.032642 83.423053 1999--Liu-X-Y--Al-Cu--LAMMPS--ipr1

You can now compare the computed equilibrium lattice constants for each potential to those computed in the NIST database for Al (fcc phase). https://www.ctcms.nist.gov/potentials/system/Al/#Al.

%%time
# creating a pyiron table
table = pr.create.table("table")

# assigning a database filter function
# table.db_filter_function = db_filter_function

# Alternatively/additionally, a job based filter function can be applied
# (it does the same thing in this case).
table.filter_function = job_filter_function

# Adding the functions using the labels you like
table.add["a_eq"] = get_lattice_parameter
table.add["bulk_modulus"] = get_bm
table.add["potential"] = get_pot
# Running the table to generate the data
table.run(delete_existing_job=True)
The job table was saved and received the ID: 61
CPU times: user 367 ms, sys: 43.1 ms, total: 410 ms
Wall time: 601 ms
table.get_dataframe()
job_id a_eq bulk_modulus potential
0 1 4.049954 81.040445 1995--Angelo-J-E--Ni-Al-H--LAMMPS--ipr1
1 25 4.032659 83.498560 1997--Liu-X-Y--Al-Mg--LAMMPS--ipr1
2 37 4.033449 90.567635 1998--Liu-X-Y--Al-Mg--LAMMPS--ipr1
3 49 4.032642 83.423053 1999--Liu-X-Y--Al-Cu--LAMMPS--ipr1