Skip to content
Snippets Groups Projects
Commit 096606a1 authored by Jan Janssen's avatar Jan Janssen
Browse files

initial update

parent 65fba44f
Branches
No related tags found
No related merge requests found
{
"argv": [
"flux",
"start",
"/srv/conda/envs/notebook/bin/python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Flux",
"language": "python",
"metadata": {
"debugger": true
}
}
......@@ -6,3 +6,7 @@ mv .binder/.pyiron .
# import dataset
bash .github/ci_support/import_dataset.sh
# jupyter kernel
mkdir -p /home/jovyan/.local/share/jupyter/kernels/flux
cp binder/kernel.json /home/jovyan/.local/share/jupyter/kernels/flux
[DEFAULT]
TOP_LEVEL_DIRS = /home/jovyan
RESOURCE_PATHS = /home/jovyan/resources
......@@ -2,6 +2,7 @@ channels:
- conda-forge
dependencies:
- python
- pyiron_atomistics =0.2.30
- lammps =2021.09.29=*openmpi*
- nglview =3.0.3
- pyiron_atomistics =0.3.1
- lammps
- flux-core
- nglview =3.0.6
%% Cell type:markdown id:convinced-stretch tags:
# pyiron example notebook
This is an example notebook to demonstrate the functionality of the publication template. The notebook loads an existing Si calculation and calculates the total energy using LAMMPS and the quip potential provided as additional resource in this repository.
The calculation archive was created using the following commands:
```
from pyiron_atomistics import Project
pr = Project("old_calculation")
job = pr.create.job.Lammps(job_name="lmp_si")
job.structure = pr.create.structure.ase.bulk("Si")
job.run()
pr.pack(destination_path="save")
```
The pyiron project class is imported using:
%% Cell type:code id:genetic-obligation tags:
``` python
from pyiron_atomistics import Project
```
%% Cell type:markdown id:coated-backing tags:
To validate the previous calculation have been successfully imported:
%% Cell type:code id:nuclear-vacation tags:
``` python
pr_data = Project("pyiron/calculation")
pr_data.job_table()
```
%% Output
id status chemicalformula job subjob projectpath \
0 1 finished Si2 lmp_si /lmp_si /home/jovyan/
project timestart \
0 calculation/old_calculation/ 2021-03-19 16:21:40.376046
timestop totalcputime computer \
0 2021-03-19 16:21:41.573096 1.0 pyiron@MacBook-Pro.local#1
hamilton hamversion parentid masterid
0 Lammps 0.1 None None
%% Cell type:markdown id:changing-blues tags:
Reload the existing calculation to continue with the previous structure:
%% Cell type:code id:valuable-footage tags:
``` python
job_reload = pr_data.load("lmp_si")
structure_reload = job_reload.get_structure()
```
%% Cell type:markdown id:convenient-eleven tags:
Create a new LAMMPS job object and assign the structure from the previous calculation:
%% Cell type:code id:impaired-tablet tags:
``` python
pr_new = Project("new_calculation")
job = pr_new.create.job.Lammps(job_name="lmp_quip")
job.structure = structure_reload
```
%% Cell type:markdown id:historical-decision tags:
List all available interatomic potentials:
%% Cell type:code id:renewable-community tags:
``` python
job.view_potentials()
```
%% Output
Config \
0 [pair_style quip\n, pair_coeff * * sw_example.xml "IP SW" 14\n]
1 [pair_style sw\n, pair_coeff * * Si.sw Si\n]
18 [pair_style tersoff\n, pair_coeff * * 1988_Si(B).tersoff Si\n]
19 [pair_style tersoff\n, pair_coeff * * 1988_Si(C).tersoff Si\n]
27 [pair_style tersoff\n, pair_coeff * * 1989_SiC.tersoff Si C\n]
.. ...
917 [pair_style kim Sim_LAMMPS_TersoffZBL_DevanathanDiazdelaRubiaWeber_1998_SiC__SM_578912636995_000\n, pair_coeff * * Si C\n]
920 [pair_style kim Sim_LAMMPS_Vashishta_BroughtonMeliVashishta_1997_SiO__SM_422553794879_000\n, pair_coeff * * Si O\n]
921 [pair_style kim Sim_LAMMPS_Vashishta_NakanoKaliaVashishta_1994_SiO__SM_503555646986_000\n, pair_coeff * * Si O\n]
922 [pair_style kim Sim_LAMMPS_Vashishta_VashishtaKaliaNakano_2007_SiC__SM_196548226654_000\n, pair_coeff * * Si C\n]
923 [pair_style kim Sim_LAMMPS_Vashishta_VashishtaKaliaRino_1990_SiO__SM_887826436433_000\n, pair_coeff * * Si O\n]
Filename \
0 [quip/sw_example.xml, quip/data_sw]
1 [potential_LAMMPS/1985--Stillinger-F-H--Si--LAMMPS--ipr1/Si.sw]
18 [potential_LAMMPS/1988--Tersoff-J--Si-b--LAMMPS--ipr1/1988_Si(B).tersoff]
19 [potential_LAMMPS/1988--Tersoff-J--Si-c--LAMMPS--ipr1/1988_Si(C).tersoff]
27 [potential_LAMMPS/1989--Tersoff-J--Si-C--LAMMPS--ipr1/1989_SiC.tersoff]
.. ...
917 []
920 []
921 []
922 []
923 []
Model \
0 QUIP
1 NISTiprpy
18 NISTiprpy
19 NISTiprpy
27 NISTiprpy
.. ...
917 OPENKIM
920 OPENKIM
921 OPENKIM
922 OPENKIM
923 OPENKIM
Name \
0 Si-quip-xml
1 1985--Stillinger-F-H--Si--LAMMPS--ipr1
18 1988--Tersoff-J--Si-b--LAMMPS--ipr1
19 1988--Tersoff-J--Si-c--LAMMPS--ipr1
27 1989--Tersoff-J--Si-C--LAMMPS--ipr1
.. ...
917 Sim_LAMMPS_TersoffZBL_DevanathanDiazdelaRubiaWeber_1998_SiC__SM_578912636995_000
920 Sim_LAMMPS_Vashishta_BroughtonMeliVashishta_1997_SiO__SM_422553794879_000
921 Sim_LAMMPS_Vashishta_NakanoKaliaVashishta_1994_SiO__SM_503555646986_000
922 Sim_LAMMPS_Vashishta_VashishtaKaliaNakano_2007_SiC__SM_196548226654_000
923 Sim_LAMMPS_Vashishta_VashishtaKaliaRino_1990_SiO__SM_887826436433_000
Species \
0 [Si]
1 [Si]
18 [Si]
19 [Si]
27 [Si, C]
.. ...
917 [Si, C]
920 [Si, O]
921 [Si, O]
922 [Si, C]
923 [Si, O]
Citations
0 {}
1 [{'Stillinger_1985': {'title': 'Computer simulation of local order in condensed phases of silicon', 'journal': 'Physical Review B', 'volume': '31', 'pages': '5262--5271', 'number': '8', 'doi': '10...
18 [{'Tersoff_1988': {'title': 'New empirical approach for the structure and energy of covalent systems', 'journal': 'Physical Review B', 'volume': '37', 'pages': '6991--7000', 'number': '12', 'doi':...
19 [{'Tersoff_1988': {'title': 'Empirical interatomic potential for silicon with improved elastic properties', 'journal': 'Physical Review B', 'volume': '38', 'pages': '9902--9905', 'number': '14', '...
27 [{'Tersoff_1989': {'title': 'Modeling solid-state chemistry: Interatomic potentials for multicomponent systems', 'journal': 'Physical Review B', 'volume': '39', 'pages': '5566--5568', 'number': '8...
.. ...
917 [{'R._1998': {'title': 'Displacement threshold energies in β-SiC', 'volume': '253', 'year': '1998', 'journal': 'Journal of Nuclear Materials', 'doi': '10.1016/S0022-3115(97)00304-8', 'author': ['D...
920 [{'Q._1997': {'title': 'Direct atomistic simulation of quartz crystal oscillators: Bulk properties and nanoscale devices', 'volume': '56', 'year': '1997', 'journal': 'Physical Review B', 'doi': '1...
921 [{'Aiichiro_1994': {'title': 'First sharp diffraction peak and intermediate-range order in amorphous silica: finite-size effects in molecular dynamics simulations', 'volume': '171', 'year': '1994'...
922 [{'Priya_2007': {'title': 'Interaction potential for silicon carbide: A molecular dynamics study of elastic constants and vibrational density of states for crystalline and amorphous silicon carbid...
923 [{'P._1990': {'title': 'Interaction potential for {SiO}2: A molecular-dynamics study of structural correlations', 'volume': '41', 'year': '1990', 'journal': 'Physical Review B', 'doi': '10.1103/ph...
[77 rows x 6 columns]
%% Cell type:markdown id:induced-destiny tags:
Select the LAMMPS quip potential provided in the resource directory and execute the calculation:
%% Cell type:code id:dependent-proposal tags:
``` python
job.potential = "Si-quip-xml"
job.run()
```
%% Output
The job lmp_quip was saved and received the ID: 2
%% Cell type:markdown id:patent-steel tags:
Print the total energy of both calculation:
%% Cell type:code id:overall-waters tags:
``` python
print(job["output/generic/energy_tot"], job_reload["output/generic/energy_tot"])
```
%% Output
[-8.66999651] [-8.67319651]
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
#!/bin/bash
flux run -n 1 lmp_mpi -in control.inp;
#!/bin/bash
flux run -n $1 lmp_mpi -in control.inp;
#!/bin/bash
# flux:--job-name={{job_name}}
# flux: --env=CORES={{cores}}
# flux: --output=time.out
# flux: --error=error.out
# flux: -n {{cores}}
{%- if run_time_max %}
# flux: -t {{ [1, run_time_max // 60]|max }}
{%- endif %}
{{command}}
queue_type: FLUX
queue_primary: flux
queues:
flux: {cores_max: 64, cores_min: 1, run_time_max: 172800, script: flux.sh}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment