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(pr.job_type.Lammps, "dummy_job")
dummy_job.structure = pr.create_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(pr.job_type.Murnaghan, job_name)
job_ref = pr_sub.create_job(pr.job_type.Lammps, "Al_ref")
job_ref.structure = pr.create_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 strain_0_9 was saved and received the ID: 2
The job strain_0_92 was saved and received the ID: 3
The job strain_0_94 was saved and received the ID: 4
The job strain_0_96 was saved and received the ID: 5
The job strain_0_98 was saved and received the ID: 6
The job strain_1_0 was saved and received the ID: 7
The job strain_1_02 was saved and received the ID: 8
The job strain_1_04 was saved and received the ID: 9
The job strain_1_06 was saved and received the ID: 10
The job strain_1_08 was saved and received the ID: 11
The job strain_1_1 was saved and received the ID: 12
job_id: 2 finished
job_id: 3 finished
job_id: 4 finished
job_id: 5 finished
job_id: 6 finished
job_id: 7 finished
job_id: 8 finished
job_id: 9 finished
job_id: 10 finished
job_id: 11 finished
job_id: 12 finished
The job murn_Al was saved and received the ID: 13
The job strain_0_9 was saved and received the ID: 14
The job strain_0_92 was saved and received the ID: 15
The job strain_0_94 was saved and received the ID: 16
The job strain_0_96 was saved and received the ID: 17
The job strain_0_98 was saved and received the ID: 18
The job strain_1_0 was saved and received the ID: 19
The job strain_1_02 was saved and received the ID: 20
The job strain_1_04 was saved and received the ID: 21
The job strain_1_06 was saved and received the ID: 22
The job strain_1_08 was saved and received the ID: 23
The job strain_1_1 was saved and received the ID: 24
job_id: 14 finished
job_id: 15 finished
job_id: 16 finished
job_id: 17 finished
job_id: 18 finished
job_id: 19 finished
job_id: 20 finished
job_id: 21 finished
job_id: 22 finished
job_id: 23 finished
job_id: 24 finished
The job murn_Al was saved and received the ID: 25
The job strain_0_9 was saved and received the ID: 26
The job strain_0_92 was saved and received the ID: 27
The job strain_0_94 was saved and received the ID: 28
The job strain_0_96 was saved and received the ID: 29
The job strain_0_98 was saved and received the ID: 30
The job strain_1_0 was saved and received the ID: 31
The job strain_1_02 was saved and received the ID: 32
The job strain_1_04 was saved and received the ID: 33
The job strain_1_06 was saved and received the ID: 34
The job strain_1_08 was saved and received the ID: 35
The job strain_1_1 was saved and received the ID: 36
job_id: 26 finished
job_id: 27 finished
job_id: 28 finished
job_id: 29 finished
job_id: 30 finished
job_id: 31 finished
job_id: 32 finished
job_id: 33 finished
job_id: 34 finished
job_id: 35 finished
job_id: 36 finished
The job murn_Al was saved and received the ID: 37
The job strain_0_9 was saved and received the ID: 38
2020-05-01 14:22:19,979 - pyiron_log - WARNING - Job aborted
2020-05-01 14:22:19,982 - pyiron_log - WARNING - LAMMPS (3 Mar 2020)
Reading data file ...
orthogonal box = (0 0 0) to (3.91023 3.91023 3.91023)
1 by 1 by 1 MPI processor grid
reading atoms ...
4 atoms
read_data CPU = 0.00191307 secs
ERROR: MEAM library error 3 (src/USER-MEAMC/pair_meamc.cpp:596)
Last command: pair_coeff * * MgAlZn.library.meam Mg Al MgAlZn.parameter.meam Mg Al Zn
The job murn_Al was saved and received the ID: 39
The job strain_0_9 was saved and received the ID: 40
The job strain_0_92 was saved and received the ID: 41
The job strain_0_94 was saved and received the ID: 42
The job strain_0_96 was saved and received the ID: 43
The job strain_0_98 was saved and received the ID: 44
The job strain_1_0 was saved and received the ID: 45
The job strain_1_02 was saved and received the ID: 46
The job strain_1_04 was saved and received the ID: 47
The job strain_1_06 was saved and received the ID: 48
The job strain_1_08 was saved and received the ID: 49
The job strain_1_1 was saved and received the ID: 50
job_id: 40 finished
job_id: 41 finished
job_id: 42 finished
job_id: 43 finished
job_id: 44 finished
job_id: 45 finished
job_id: 46 finished
job_id: 47 finished
job_id: 48 finished
job_id: 49 finished
job_id: 50 finished
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 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_Mg_Mendelev_eam/ | 2020-05-01 14:20:15.185926 | 2020-05-01 14:20:52.212726 | 37.0 | pyiron@cmdell17#1#11/11 | Murnaghan | 0.3.0 | None | NaN |
1 | 2 | finished | Al4 | strain_0_9 | /strain_0_9 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_Mg_Mendelev_eam/murn_Al_hdf5/ | 2020-05-01 14:20:16.872239 | 2020-05-01 14:20:18.199291 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 1.0 |
2 | 3 | finished | Al4 | strain_0_92 | /strain_0_92 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_Mg_Mendelev_eam/murn_Al_hdf5/ | 2020-05-01 14:20:20.376998 | 2020-05-01 14:20:21.474685 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 1.0 |
3 | 4 | finished | Al4 | strain_0_94 | /strain_0_94 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_Mg_Mendelev_eam/murn_Al_hdf5/ | 2020-05-01 14:20:23.410323 | 2020-05-01 14:20:24.454505 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 1.0 |
4 | 5 | finished | Al4 | strain_0_96 | /strain_0_96 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_Mg_Mendelev_eam/murn_Al_hdf5/ | 2020-05-01 14:20:26.407384 | 2020-05-01 14:20:27.448024 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 1.0 |
5 | 6 | finished | Al4 | strain_0_98 | /strain_0_98 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_Mg_Mendelev_eam/murn_Al_hdf5/ | 2020-05-01 14:20:29.389853 | 2020-05-01 14:20:30.457648 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 1.0 |
6 | 7 | finished | Al4 | strain_1_0 | /strain_1_0 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_Mg_Mendelev_eam/murn_Al_hdf5/ | 2020-05-01 14:20:32.440577 | 2020-05-01 14:20:33.587692 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 1.0 |
7 | 8 | finished | Al4 | strain_1_02 | /strain_1_02 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_Mg_Mendelev_eam/murn_Al_hdf5/ | 2020-05-01 14:20:35.659606 | 2020-05-01 14:20:36.717203 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 1.0 |
8 | 9 | finished | Al4 | strain_1_04 | /strain_1_04 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_Mg_Mendelev_eam/murn_Al_hdf5/ | 2020-05-01 14:20:39.247825 | 2020-05-01 14:20:40.631913 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 1.0 |
9 | 10 | finished | Al4 | strain_1_06 | /strain_1_06 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_Mg_Mendelev_eam/murn_Al_hdf5/ | 2020-05-01 14:20:43.093369 | 2020-05-01 14:20:44.365442 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 1.0 |
10 | 11 | finished | Al4 | strain_1_08 | /strain_1_08 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_Mg_Mendelev_eam/murn_Al_hdf5/ | 2020-05-01 14:20:46.700972 | 2020-05-01 14:20:47.809129 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 1.0 |
11 | 12 | finished | Al4 | strain_1_1 | /strain_1_1 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_Mg_Mendelev_eam/murn_Al_hdf5/ | 2020-05-01 14:20:49.872971 | 2020-05-01 14:20:51.002065 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 1.0 |
12 | 13 | finished | Al4 | murn_Al | /murn_Al | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Zope_Ti_Al_2003_eam/ | 2020-05-01 14:20:52.854206 | 2020-05-01 14:21:40.211332 | 47.0 | pyiron@cmdell17#1#11/11 | Murnaghan | 0.3.0 | None | NaN |
13 | 14 | finished | Al4 | strain_0_9 | /strain_0_9 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Zope_Ti_Al_2003_eam/murn_Al_hdf5/ | 2020-05-01 14:20:54.595238 | 2020-05-01 14:20:55.863602 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 13.0 |
14 | 15 | finished | Al4 | strain_0_92 | /strain_0_92 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Zope_Ti_Al_2003_eam/murn_Al_hdf5/ | 2020-05-01 14:20:58.465134 | 2020-05-01 14:20:59.616677 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 13.0 |
15 | 16 | finished | Al4 | strain_0_94 | /strain_0_94 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Zope_Ti_Al_2003_eam/murn_Al_hdf5/ | 2020-05-01 14:21:02.323952 | 2020-05-01 14:21:03.842627 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 13.0 |
16 | 17 | finished | Al4 | strain_0_96 | /strain_0_96 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Zope_Ti_Al_2003_eam/murn_Al_hdf5/ | 2020-05-01 14:21:07.120770 | 2020-05-01 14:21:08.247122 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 13.0 |
17 | 18 | finished | Al4 | strain_0_98 | /strain_0_98 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Zope_Ti_Al_2003_eam/murn_Al_hdf5/ | 2020-05-01 14:21:10.867935 | 2020-05-01 14:21:12.084671 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 13.0 |
18 | 19 | finished | Al4 | strain_1_0 | /strain_1_0 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Zope_Ti_Al_2003_eam/murn_Al_hdf5/ | 2020-05-01 14:21:14.859515 | 2020-05-01 14:21:15.890379 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 13.0 |
19 | 20 | finished | Al4 | strain_1_02 | /strain_1_02 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Zope_Ti_Al_2003_eam/murn_Al_hdf5/ | 2020-05-01 14:21:18.333658 | 2020-05-01 14:21:19.773168 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 13.0 |
20 | 21 | finished | Al4 | strain_1_04 | /strain_1_04 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Zope_Ti_Al_2003_eam/murn_Al_hdf5/ | 2020-05-01 14:21:23.134672 | 2020-05-01 14:21:24.701105 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 13.0 |
21 | 22 | finished | Al4 | strain_1_06 | /strain_1_06 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Zope_Ti_Al_2003_eam/murn_Al_hdf5/ | 2020-05-01 14:21:28.160753 | 2020-05-01 14:21:29.635477 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 13.0 |
22 | 23 | finished | Al4 | strain_1_08 | /strain_1_08 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Zope_Ti_Al_2003_eam/murn_Al_hdf5/ | 2020-05-01 14:21:32.177125 | 2020-05-01 14:21:33.407034 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 13.0 |
23 | 24 | finished | Al4 | strain_1_1 | /strain_1_1 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Zope_Ti_Al_2003_eam/murn_Al_hdf5/ | 2020-05-01 14:21:36.544373 | 2020-05-01 14:21:38.079025 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 13.0 |
24 | 25 | finished | Al4 | murn_Al | /murn_Al | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_H_Ni_Angelo_eam/ | 2020-05-01 14:21:41.112811 | 2020-05-01 14:22:14.935040 | 33.0 | pyiron@cmdell17#1#11/11 | Murnaghan | 0.3.0 | None | NaN |
25 | 26 | finished | Al4 | strain_0_9 | /strain_0_9 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_H_Ni_Angelo_eam/murn_Al_hdf5/ | 2020-05-01 14:21:43.292578 | 2020-05-01 14:21:44.486249 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 25.0 |
26 | 27 | finished | Al4 | strain_0_92 | /strain_0_92 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_H_Ni_Angelo_eam/murn_Al_hdf5/ | 2020-05-01 14:21:46.220651 | 2020-05-01 14:21:47.239424 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 25.0 |
27 | 28 | finished | Al4 | strain_0_94 | /strain_0_94 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_H_Ni_Angelo_eam/murn_Al_hdf5/ | 2020-05-01 14:21:49.064622 | 2020-05-01 14:21:50.027115 | 0.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 25.0 |
28 | 29 | finished | Al4 | strain_0_96 | /strain_0_96 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_H_Ni_Angelo_eam/murn_Al_hdf5/ | 2020-05-01 14:21:51.711371 | 2020-05-01 14:21:52.700248 | 0.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 25.0 |
29 | 30 | finished | Al4 | strain_0_98 | /strain_0_98 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_H_Ni_Angelo_eam/murn_Al_hdf5/ | 2020-05-01 14:21:54.391263 | 2020-05-01 14:21:55.421046 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 25.0 |
30 | 31 | finished | Al4 | strain_1_0 | /strain_1_0 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_H_Ni_Angelo_eam/murn_Al_hdf5/ | 2020-05-01 14:21:57.127116 | 2020-05-01 14:21:58.177664 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 25.0 |
31 | 32 | finished | Al4 | strain_1_02 | /strain_1_02 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_H_Ni_Angelo_eam/murn_Al_hdf5/ | 2020-05-01 14:21:59.836684 | 2020-05-01 14:22:00.908548 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 25.0 |
32 | 33 | finished | Al4 | strain_1_04 | /strain_1_04 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_H_Ni_Angelo_eam/murn_Al_hdf5/ | 2020-05-01 14:22:02.637902 | 2020-05-01 14:22:03.654759 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 25.0 |
33 | 34 | finished | Al4 | strain_1_06 | /strain_1_06 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_H_Ni_Angelo_eam/murn_Al_hdf5/ | 2020-05-01 14:22:05.431956 | 2020-05-01 14:22:06.592121 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 25.0 |
34 | 35 | finished | Al4 | strain_1_08 | /strain_1_08 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_H_Ni_Angelo_eam/murn_Al_hdf5/ | 2020-05-01 14:22:09.286335 | 2020-05-01 14:22:10.252819 | 0.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 25.0 |
35 | 36 | finished | Al4 | strain_1_1 | /strain_1_1 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/Al_H_Ni_Angelo_eam/murn_Al_hdf5/ | 2020-05-01 14:22:12.026812 | 2020-05-01 14:22:13.233506 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 25.0 |
36 | 37 | aborted | Al4 | murn_Al | /murn_Al | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2018__Dickel_D_E__Mg_Al_Zn__LAMMPS__ipr1/ | 2020-05-01 14:22:16.205392 | NaT | NaN | pyiron@cmdell17#1#1/11 | Murnaghan | 0.3.0 | None | NaN |
37 | 38 | aborted | Al4 | strain_0_9 | /strain_0_9 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2018__Dickel_D_E__Mg_Al_Zn__LAMMPS__ipr1/murn_Al_hdf5/ | 2020-05-01 14:22:19.500822 | NaT | NaN | pyiron@cmdell17#1 | Lammps | 0.1 | None | 37.0 |
38 | 39 | finished | Al4 | murn_Al | /murn_Al | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2000__Landa_A__Al_Pb__LAMMPS__ipr1/ | 2020-05-01 14:22:20.918639 | 2020-05-01 14:22:56.348776 | 35.0 | pyiron@cmdell17#1#11/11 | Murnaghan | 0.3.0 | None | NaN |
39 | 40 | finished | Al4 | strain_0_9 | /strain_0_9 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2000__Landa_A__Al_Pb__LAMMPS__ipr1/murn_Al_hdf5/ | 2020-05-01 14:22:23.362886 | 2020-05-01 14:22:24.543279 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 39.0 |
40 | 41 | finished | Al4 | strain_0_92 | /strain_0_92 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2000__Landa_A__Al_Pb__LAMMPS__ipr1/murn_Al_hdf5/ | 2020-05-01 14:22:26.098609 | 2020-05-01 14:22:27.456331 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 39.0 |
41 | 42 | finished | Al4 | strain_0_94 | /strain_0_94 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2000__Landa_A__Al_Pb__LAMMPS__ipr1/murn_Al_hdf5/ | 2020-05-01 14:22:29.355607 | 2020-05-01 14:22:30.418893 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 39.0 |
42 | 43 | finished | Al4 | strain_0_96 | /strain_0_96 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2000__Landa_A__Al_Pb__LAMMPS__ipr1/murn_Al_hdf5/ | 2020-05-01 14:22:32.522105 | 2020-05-01 14:22:34.234605 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 39.0 |
43 | 44 | finished | Al4 | strain_0_98 | /strain_0_98 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2000__Landa_A__Al_Pb__LAMMPS__ipr1/murn_Al_hdf5/ | 2020-05-01 14:22:36.960119 | 2020-05-01 14:22:38.166629 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 39.0 |
44 | 45 | finished | Al4 | strain_1_0 | /strain_1_0 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2000__Landa_A__Al_Pb__LAMMPS__ipr1/murn_Al_hdf5/ | 2020-05-01 14:22:39.686173 | 2020-05-01 14:22:40.836256 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 39.0 |
45 | 46 | finished | Al4 | strain_1_02 | /strain_1_02 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2000__Landa_A__Al_Pb__LAMMPS__ipr1/murn_Al_hdf5/ | 2020-05-01 14:22:42.989847 | 2020-05-01 14:22:44.268105 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 39.0 |
46 | 47 | finished | Al4 | strain_1_04 | /strain_1_04 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2000__Landa_A__Al_Pb__LAMMPS__ipr1/murn_Al_hdf5/ | 2020-05-01 14:22:46.008623 | 2020-05-01 14:22:47.372670 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 39.0 |
47 | 48 | finished | Al4 | strain_1_06 | /strain_1_06 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2000__Landa_A__Al_Pb__LAMMPS__ipr1/murn_Al_hdf5/ | 2020-05-01 14:22:49.144214 | 2020-05-01 14:22:50.153294 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 39.0 |
48 | 49 | finished | Al4 | strain_1_08 | /strain_1_08 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2000__Landa_A__Al_Pb__LAMMPS__ipr1/murn_Al_hdf5/ | 2020-05-01 14:22:51.746560 | 2020-05-01 14:22:52.772483 | 1.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 39.0 |
49 | 50 | finished | Al4 | strain_1_1 | /strain_1_1 | /home/surendralal/ | programs/pyiron/notebooks/potential_scan/2000__Landa_A__Al_Pb__LAMMPS__ipr1/murn_Al_hdf5/ | 2020-05-01 14:22:54.390591 | 2020-05-01 14:22:55.348395 | 0.0 | pyiron@cmdell17#1 | Lammps | 0.1 | None | 39.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") & ("murn" in job.job_name)
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):
child = job.project.inspect(job["output/id"][0])
return child["input/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(run_again=True)
0%| | 0/4 [00:00<?, ?it/s]
The job table was saved and received the ID: 51
100%|██████████| 4/4 [00:00<00:00, 20.91it/s]
2020-05-01 14:22:57,257 - pyiron_log - WARNING - The job table is being loaded instead of running. To re-run use the argument 'run_again=True'
CPU times: user 531 ms, sys: 156 ms, total: 688 ms
Wall time: 725 ms
The output can now be obtained as a pandas DataFrame
table.get_dataframe()
job_id | a_eq | bulk_modulus | potential | |
---|---|---|---|---|
0 | 1 | 4.045415 | 89.015487 | Al_Mg_Mendelev_eam |
1 | 13 | 4.049946 | 80.836779 | Zope_Ti_Al_2003_eam |
2 | 25 | 4.049954 | 81.040445 | Al_H_Ni_Angelo_eam |
3 | 39 | 4.031246 | 78.213776 | 2000--Landa-A--Al-Pb--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.