Commit 5061e307 authored by Jan Janssen's avatar Jan Janssen
Browse files

Executed all the notebooks again on workshop.pyiron.org

parent 4307dfbe
This diff is collapsed.
%% Cell type:markdown id: tags:
%% Cell type:markdown id:infectious-lingerie tags:
# Day 2 - Parameterization of interatomic potentials
%% Cell type:markdown id: tags:
%% Cell type:markdown id:destroyed-simulation tags:
In this tutorial we will do simple fits for three different interatomic potentials.
* Embedded Atom Method Potential
* Neural Network Potential
* Atomic Cluster Expansion
Some details of these potentials will be summarized in the following.
%% Cell type:markdown id: tags:
%% Cell type:markdown id:prescribed-campbell tags:
## Embedded Atom Method Potential
%% Cell type:markdown id: tags:
%% Cell type:markdown id:dress-gauge tags:
* Atomic descriptors: pair functions
$\rho_i = \sum_j \phi(r_{ij})$ (density)
$V_i = \sum_j V(r_{ij})$ (pair repulsion)
* Atomic energy
$E_i = F( \rho_i ) + V_i$
with non-linear embedding function $F$
%% Cell type:markdown id: tags:
%% Cell type:markdown id:tribal-intro tags:
## Neural Network Potential
%% Cell type:markdown id: tags:
%% Cell type:markdown id:imported-answer tags:
* Atomic descriptors: pair and three-body symmetry functions
$G_i = \sum_j \phi(r_{ij})$
$G_i = \sum_{jk} \phi(r_{ij},r_{ik}, \cos_{jik})$
* Atomic energy
$E_i = NN(G_i)$
with neural network $NN$. Various different $G_i$ are the inputs to the $NN$.
%% Cell type:markdown id: tags:
%% Cell type:markdown id:obvious-finish tags:
## Atomic Cluster Expansion
%% Cell type:markdown id: tags:
%% Cell type:markdown id:successful-maine tags:
* Atomic descriptors: pair, three-body, ... many-body basis functions
$A_i = \sum_j \phi(\pmb{r}_{ij})$ (many different basis functions that depend on direction and length of $r_{ij}$)
$\varphi_i = c_1 A_i + c_2 A_i A_i + c_3 A_i A_i A_i + ...$
* Atomic energy
$E_i = F(\varphi_i)$
with general non-linear function $F$ and several $\varphi_i$. In the tutorial we will use $E_i = \sqrt{\varphi^{(1)}_i} + \varphi^{(2)}_i$ to make contact to the Embedded Atom Method.
%% Cell type:markdown id: tags:
%% Cell type:markdown id:deluxe-recording tags:
# Reference data
%% Cell type:markdown id: tags:
%% Cell type:markdown id:accessible-criminal tags:
The potentials are parameterized by fitting to reference data. Here we use DFT data for Cu that we generated with the FHI-aims code. In the following we summarize key properties of the dataset.
%% Cell type:code id: tags:
%% Cell type:code id:literary-discovery tags:
``` python
%pylab inline
```
%% Output
Populating the interactive namespace from numpy and matplotlib
%% Cell type:code id: tags:
%% Cell type:code id:sunrise-siemens tags:
``` python
import pandas as pd
```
%% Cell type:code id: tags:
%% Cell type:code id:educational-toddler tags:
``` python
from pyiron import Project
```
%% Cell type:code id: tags:
%% Cell type:code id:recorded-guitar tags:
``` python
def proces_df(df):
df["energy_per_atom"] = df["energy"]/df["number_of_atoms"]
df["volume"]=df["atoms"].map(lambda at: at.get_volume())
df["volume_per_atom"] = df["volume"]/df["number_of_atoms"]
```
%% Cell type:code id: tags:
%% Cell type:code id:infinite-genesis tags:
``` python
data_pr = Project("..")
```
%% Cell type:code id: tags:
%% Cell type:code id:social-recycling tags:
``` python
data_pr.job_table()
```
%% Output
id status chemicalformula job \
0 286 finished None df1_A1_A2_A3_EV_elast_phon
1 287 finished None df3_10k
2 288 finished None df2_1k
id status chemicalformula job \
0 1 finished None df1_A1_A2_A3_EV_elast_phon
1 2 finished None df3_10k
2 3 finished None df2_1k
3 4 finished None df4_2_5eV_25A3_8K
4 5 finished Cu108 lammps_job
.. ... ... ... ...
302 303 finished Cu lammps_struct_7
303 304 finished Cu lammps_struct_8
304 305 finished Cu lammps_struct_9
305 306 finished Cu lammps_struct_10
306 307 finished Cu lammps_box
subjob projectpath \
0 /df1_A1_A2_A3_EV_elast_phon /home/yury/PycharmProjects/pyiron-2021/
1 /df3_10k /home/yury/PycharmProjects/pyiron-2021/
2 /df2_1k /home/yury/PycharmProjects/pyiron-2021/
subjob projectpath \
0 /df1_A1_A2_A3_EV_elast_phon /home/pyiron/
1 /df3_10k /home/pyiron/
2 /df2_1k /home/pyiron/
3 /df4_2_5eV_25A3_8K /home/pyiron/
4 /lammps_job /home/pyiron/
.. ... ...
302 /lammps_struct_7 /home/pyiron/
303 /lammps_struct_8 /home/pyiron/
304 /lammps_struct_9 /home/pyiron/
305 /lammps_struct_10 /home/pyiron/
306 /lammps_box /home/pyiron/
project \
0 pyiron_potentialfit/datasets/imported_datasets/Cu_database/
1 pyiron_potentialfit/datasets/imported_datasets/Cu_database/
2 pyiron_potentialfit/datasets/imported_datasets/Cu_database/
project timestart \
0 datasets/Cu_database/ 2021-02-18 19:49:53.061360
1 datasets/Cu_database/ 2021-02-18 19:49:55.496691
2 datasets/Cu_database/ 2021-02-18 19:49:56.101883
3 datasets/Cu_database/ 2021-02-18 19:49:57.547918
4 day_1/first_steps/ 2021-03-09 08:58:10.515085
.. ... ...
302 day_3/validation/Cu-atomicrex-df1-107-25/ 2021-03-09 09:40:07.733451
303 day_3/validation/Cu-atomicrex-df1-107-25/ 2021-03-09 09:40:25.020783
304 day_3/validation/Cu-atomicrex-df1-107-25/ 2021-03-09 09:40:42.552932
305 day_3/validation/Cu-atomicrex-df1-107-25/ 2021-03-09 09:41:00.324055
306 day_3/validation/Cu-atomicrex-df1-107-25/ 2021-03-09 09:41:17.387798
timestart timestop totalcputime computer \
0 2021-02-08 10:33:52.341472 None None zora@cmti001#1
1 2021-02-08 10:33:53.993230 None None zora@cmti001#1
2 2021-02-08 10:33:54.435308 None None zora@cmti001#1
timestop totalcputime computer \
0 NaT NaN zora@cmti001#1
1 NaT NaN zora@cmti001#1
2 NaT NaN zora@cmti001#1
3 NaT NaN zora@cmti001#1
4 2021-03-09 08:58:14.811278 4.0 pyiron@jupyter-janssen#1
.. ... ... ...
302 2021-03-09 09:40:08.166608 0.0 pyiron@jupyter-janssen#1