Unverified Commit 9a6c4981 authored by Jan Janssen's avatar Jan Janssen Committed by GitHub
Browse files

Merge pull request #37 from pyiron/Removeold

Remove old notebooks 
parents 581eb17a 29fdacf5
This diff is collapsed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "needed-commitment",
"metadata": {},
"outputs": [],
"source": [
"from pyiron_atomistics import Project\n",
"import pyiron_contrib"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "micro-christmas",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"append.pyprof\t\t old_Cu_df1_A1_A2_A3_EV_elast_phon\n",
"asdt.pkl\t\t old_Cu_df1_A1_A2_A3_EV_elast_phon.pckl.gzip\n",
"container_run.pyprof\t old_Cu_df2_1k\n",
"Cu_database\t\t old_Cu_df2_1k.pckl.gzip\n",
"Cu_df1_A1_A2_A3_EV_elast_phon old_Cu_df3_10k\n",
"Cu_df2_1k\t\t old_Cu_df3_10k.pckl.gzip\n",
"Cu_df3_10k\t\t pyiron.log\n",
"CuFitMLIP\t\t small_105\n",
"CuFitMLIP.ipynb\t\t StructureImport.ipynb\n",
"Cu_training_archive.tar.gz toy\n",
"export.csv\t\t toy_archive.tar.gz\n",
"foo.h5\t\t\t toy_import\n",
"import_database\t\t training_archive.tar.gz\n",
"ImportDatabase.ipynb\t training_database\n"
]
}
],
"source": [
"!ls"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "connected-stations",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>status</th>\n",
" <th>chemicalformula</th>\n",
" <th>job</th>\n",
" <th>subjob</th>\n",
" <th>projectpath</th>\n",
" <th>project</th>\n",
" <th>timestart</th>\n",
" <th>timestop</th>\n",
" <th>totalcputime</th>\n",
" <th>computer</th>\n",
" <th>hamilton</th>\n",
" <th>hamversion</th>\n",
" <th>parentid</th>\n",
" <th>masterid</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>12407194</td>\n",
" <td>finished</td>\n",
" <td>None</td>\n",
" <td>df1_A1_A2_A3_EV_elast_phon</td>\n",
" <td>/df1_A1_A2_A3_EV_elast_phon</td>\n",
" <td>/cmmc/u/</td>\n",
" <td>zora/pyiron/projects/PotentialWorkshop/Cu_database/</td>\n",
" <td>2021-02-10 17:00:11.537019</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>zora@cmti001#1</td>\n",
" <td>TrainingContainer</td>\n",
" <td>0.4</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>12407195</td>\n",
" <td>finished</td>\n",
" <td>None</td>\n",
" <td>df3_10k</td>\n",
" <td>/df3_10k</td>\n",
" <td>/cmmc/u/</td>\n",
" <td>zora/pyiron/projects/PotentialWorkshop/Cu_database/</td>\n",
" <td>2021-02-10 17:00:13.301945</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>zora@cmti001#1</td>\n",
" <td>TrainingContainer</td>\n",
" <td>0.4</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>12407196</td>\n",
" <td>finished</td>\n",
" <td>None</td>\n",
" <td>df2_1k</td>\n",
" <td>/df2_1k</td>\n",
" <td>/cmmc/u/</td>\n",
" <td>zora/pyiron/projects/PotentialWorkshop/Cu_database/</td>\n",
" <td>2021-02-10 17:00:13.822784</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>zora@cmti001#1</td>\n",
" <td>TrainingContainer</td>\n",
" <td>0.4</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" id status chemicalformula job \\\n",
"1 12407194 finished None df1_A1_A2_A3_EV_elast_phon \n",
"2 12407195 finished None df3_10k \n",
"0 12407196 finished None df2_1k \n",
"\n",
" subjob projectpath \\\n",
"1 /df1_A1_A2_A3_EV_elast_phon /cmmc/u/ \n",
"2 /df3_10k /cmmc/u/ \n",
"0 /df2_1k /cmmc/u/ \n",
"\n",
" project \\\n",
"1 zora/pyiron/projects/PotentialWorkshop/Cu_database/ \n",
"2 zora/pyiron/projects/PotentialWorkshop/Cu_database/ \n",
"0 zora/pyiron/projects/PotentialWorkshop/Cu_database/ \n",
"\n",
" timestart timestop totalcputime computer \\\n",
"1 2021-02-10 17:00:11.537019 None None zora@cmti001#1 \n",
"2 2021-02-10 17:00:13.301945 None None zora@cmti001#1 \n",
"0 2021-02-10 17:00:13.822784 None None zora@cmti001#1 \n",
"\n",
" hamilton hamversion parentid masterid \n",
"1 TrainingContainer 0.4 None None \n",
"2 TrainingContainer 0.4 None None \n",
"0 TrainingContainer 0.4 None None "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"fit_pr = Project(\"Cu_database\")\n",
"fit_pr.job_table()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "dirty-certificate",
"metadata": {},
"outputs": [],
"source": [
"pr = Project(\"CuFitMLIP\")"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "minute-botswana",
"metadata": {},
"outputs": [],
"source": [
"j = pr.create.job.Mlip(\"fit_100\", delete_existing_job=True)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "chubby-reform",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"760"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#j.input.potential = 'g.mtp'\n",
"j.get_suggested_number_of_configuration()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "french-counter",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"12407196"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"fit_pr.load('df2_1k').id"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "enclosed-plaza",
"metadata": {},
"outputs": [],
"source": [
"# need to manually specify end point for now\n",
"j.add_job_to_fitting(fit_pr.load('df1_A1_A2_A3_EV_elast_phon').id, time_step_start=1, time_step_end=100, time_step_delta=1)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "curious-jamaica",
"metadata": {},
"outputs": [],
"source": [
"j.server.queue = 'cm'\n",
"j.server.cores = 40\n",
"j.server.run_time = 2*36000"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "curious-fetish",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The job fit_100 was saved and received the ID: 12407786\n",
"Queue system id: 1750332\n"
]
}
],
"source": [
"j.run()"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "clinical-worthy",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>status</th>\n",
" <th>chemicalformula</th>\n",
" <th>job</th>\n",
" <th>subjob</th>\n",
" <th>projectpath</th>\n",
" <th>project</th>\n",
" <th>timestart</th>\n",
" <th>timestop</th>\n",
" <th>totalcputime</th>\n",
" <th>computer</th>\n",
" <th>hamilton</th>\n",
" <th>hamversion</th>\n",
" <th>parentid</th>\n",
" <th>masterid</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>12407199</td>\n",
" <td>aborted</td>\n",
" <td>None</td>\n",
" <td>fit</td>\n",
" <td>/fit</td>\n",
" <td>/cmmc/u/</td>\n",
" <td>zora/pyiron/projects/PotentialWorkshop/CuFitMLIP/</td>\n",
" <td>2021-02-10 17:05:11.369415</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>zora@cmti001#40#cm</td>\n",
" <td>Mlip</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>12407745</td>\n",
" <td>running</td>\n",
" <td>None</td>\n",
" <td>fit_1k</td>\n",
" <td>/fit_1k</td>\n",
" <td>/cmmc/u/</td>\n",
" <td>zora/pyiron/projects/PotentialWorkshop/CuFitMLIP/</td>\n",
" <td>2021-02-10 19:47:22.773424</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>zora@cmti001#40#cm</td>\n",
" <td>Mlip</td>\n",
" <td>0.0.2_mpi</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>12407786</td>\n",
" <td>submitted</td>\n",
" <td>None</td>\n",
" <td>fit_100</td>\n",
" <td>/fit_100</td>\n",
" <td>/cmmc/u/</td>\n",
" <td>zora/pyiron/projects/PotentialWorkshop/CuFitMLIP/</td>\n",
" <td>2021-02-10 19:48:40.977553</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>zora@cmti001#40#cm</td>\n",
" <td>Mlip</td>\n",
" <td>0.0.2_mpi</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" id status chemicalformula job subjob projectpath \\\n",
"1 12407199 aborted None fit /fit /cmmc/u/ \n",
"0 12407745 running None fit_1k /fit_1k /cmmc/u/ \n",
"2 12407786 submitted None fit_100 /fit_100 /cmmc/u/ \n",
"\n",
" project \\\n",
"1 zora/pyiron/projects/PotentialWorkshop/CuFitMLIP/ \n",
"0 zora/pyiron/projects/PotentialWorkshop/CuFitMLIP/ \n",
"2 zora/pyiron/projects/PotentialWorkshop/CuFitMLIP/ \n",
"\n",
" timestart timestop totalcputime computer \\\n",
"1 2021-02-10 17:05:11.369415 None None zora@cmti001#40#cm \n",
"0 2021-02-10 19:47:22.773424 None None zora@cmti001#40#cm \n",
"2 2021-02-10 19:48:40.977553 None None zora@cmti001#40#cm \n",
"\n",
" hamilton hamversion parentid masterid \n",
"1 Mlip None None None \n",
"0 Mlip 0.0.2_mpi None None \n",
"2 Mlip 0.0.2_mpi None None "
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pr.job_table()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
%% Cell type:code id:needed-commitment tags:
``` python
from pyiron_atomistics import Project
import pyiron_contrib
```
%% Cell type:code id:micro-christmas tags:
``` python
!ls
```
%%%% Output: stream
append.pyprof old_Cu_df1_A1_A2_A3_EV_elast_phon
asdt.pkl old_Cu_df1_A1_A2_A3_EV_elast_phon.pckl.gzip
container_run.pyprof old_Cu_df2_1k
Cu_database old_Cu_df2_1k.pckl.gzip
Cu_df1_A1_A2_A3_EV_elast_phon old_Cu_df3_10k
Cu_df2_1k old_Cu_df3_10k.pckl.gzip
Cu_df3_10k pyiron.log
CuFitMLIP small_105
CuFitMLIP.ipynb StructureImport.ipynb
Cu_training_archive.tar.gz toy
export.csv toy_archive.tar.gz
foo.h5 toy_import
import_database training_archive.tar.gz
ImportDatabase.ipynb training_database
%% Cell type:code id:connected-stations tags:
``` python
fit_pr = Project("Cu_database")
fit_pr.job_table()
```
%%%% Output: execute_result
id status chemicalformula job \
1 12407194 finished None df1_A1_A2_A3_EV_elast_phon
2 12407195 finished None df3_10k
0 12407196 finished None df2_1k
subjob projectpath \
1 /df1_A1_A2_A3_EV_elast_phon /cmmc/u/
2 /df3_10k /cmmc/u/
0 /df2_1k /cmmc/u/
project \
1 zora/pyiron/projects/PotentialWorkshop/Cu_database/
2 zora/pyiron/projects/PotentialWorkshop/Cu_database/
0 zora/pyiron/projects/PotentialWorkshop/Cu_database/
timestart timestop totalcputime computer \
1 2021-02-10 17:00:11.537019 None None zora@cmti001#1
2 2021-02-10 17:00:13.301945 None None zora@cmti001#1
0 2021-02-10 17:00:13.822784 None None zora@cmti001#1
hamilton hamversion parentid masterid
1 TrainingContainer 0.4 None None
2 TrainingContainer 0.4 None None
0 TrainingContainer 0.4 None None
%% Cell type:code id:dirty-certificate tags:
``` python
pr = Project("CuFitMLIP")
```
%% Cell type:code id:minute-botswana tags:
``` python
j = pr.create.job.Mlip("fit_100", delete_existing_job=True)
```
%% Cell type:code id:chubby-reform tags:
``` python
#j.input.potential = 'g.mtp'
j.get_suggested_number_of_configuration()
```
%%%% Output: execute_result
760
%% Cell type:code id:french-counter tags:
``` python
fit_pr.load('df2_1k').id
```
%%%% Output: execute_result
12407196
%% Cell type:code id:enclosed-plaza tags:
``` python
# need to manually specify end point for now
j.add_job_to_fitting(fit_pr.load('df1_A1_A2_A3_EV_elast_phon').id, time_step_start=1, time_step_end=100, time_step_delta=1)
```
%% Cell type:code id:curious-jamaica tags:
``` python
j.server.queue = 'cm'
j.server.cores = 40
j.server.run_time = 2*36000
```
%% Cell type:code id:curious-fetish tags:
``` python
j.run()
```
%%%% Output: stream
The job fit_100 was saved and received the ID: 12407786
Queue system id: 1750332
%% Cell type:code id:clinical-worthy tags:
``` python
pr.job_table()
```
%%%% Output: execute_result
id status chemicalformula job subjob projectpath \
1 12407199 aborted None fit /fit /cmmc/u/
0 12407745 running None fit_1k /fit_1k /cmmc/u/
2 12407786 submitted None fit_100 /fit_100 /cmmc/u/
project \
1 zora/pyiron/projects/PotentialWorkshop/CuFitMLIP/
0 zora/pyiron/projects/PotentialWorkshop/CuFitMLIP/
2 zora/pyiron/projects/PotentialWorkshop/CuFitMLIP/
timestart timestop totalcputime computer \
1 2021-02-10 17:05:11.369415 None None zora@cmti001#40#cm
0 2021-02-10 19:47:22.773424 None None zora@cmti001#40#cm
2 2021-02-10 19:48:40.977553 None None zora@cmti001#40#cm
hamilton hamversion parentid masterid
1 Mlip None None None
0 Mlip 0.0.2_mpi None None
2 Mlip 0.0.2_mpi None None
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "welcome-official",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"\n",
"\n",
"from pyiron import Project, ase_to_pyiron\n",
"from pyiron_contrib.atomistic.atomicrex.atomicrex_job import Atomicrex"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "digital-education",
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_pickle(\"Cu_df1_A1_A2_A3_EV_elast_phon.pkl.gzip\", compression=\"gzip\")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "engaging-aquarium",
"metadata": {},
"outputs": [
{
"name": "stdin",
"output_type": "stream",
"text": [
"Are you sure you want to delete all jobs from 'WorkshopPotential'? y/(n) y\n"
]
}
],
"source": [
"pr = Project(\"WorkshopPotential\")\n",
"pr.remove_jobs_silently()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "signed-underwear",
"metadata": {},
"outputs": [],
"source": [
"job = pr.create_job(Atomicrex, \"PotentialDF1\", delete_existing_job=True)"
]
},
{
"cell_type": "markdown",
"id": "proprietary-pencil",
"metadata": {},
"source": [
"### Add the structures that should be fitted.\n",
"It is possible to assign different weights to certain structures or properties, depending on what should be investigated using the potential. Here every structure has the same weight, but the force vector with N*3 values is normalized to have the same total weight as the single value energy. Therefore it is divided by the number of atoms. "
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "concrete-panic",
"metadata": {},
"outputs": [],
"source": [
"df[\"energy_corrected_per_atom\"] = df[\"energy\"]/df[\"number_of_atoms\"]\n",
"for id, row in df.iterrows():\n",