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:
from pyiron_atomistics import Project
To validate the previous calculation have been successfully imported:
pr_data = Project("pyiron/calculation")
pr_data.job_table()
id | status | chemicalformula | job | subjob | projectpath | project | timestart | timestop | totalcputime | computer | hamilton | hamversion | parentid | masterid | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | finished | Si2 | lmp_si | /lmp_si | /home/jovyan/ | calculation/old_calculation/ | 2021-03-19 16:21:40.376046 | 2021-03-19 16:21:41.573096 | 1.0 | pyiron@MacBook-Pro.local#1 | Lammps | 0.1 | None | None |
Reload the existing calculation to continue with the previous structure:
job_reload = pr_data.load("lmp_si")
structure_reload = job_reload.get_structure()
Create a new LAMMPS job object and assign the structure from the previous calculation:
pr_new = Project("new_calculation")
job = pr_new.create.job.Lammps(job_name="lmp_quip")
job.structure = structure_reload
List all available interatomic potentials:
job.view_potentials()
Config | Filename | Model | Name | Species | Citations | |
---|---|---|---|---|---|---|
0 | [pair_style quip\n, pair_coeff * * sw_example.xml "IP SW" 14\n] | [quip/sw_example.xml, quip/data_sw] | QUIP | Si-quip-xml | [Si] | {} |
1 | [pair_style sw\n, pair_coeff * * Si.sw Si\n] | [potential_LAMMPS/1985--Stillinger-F-H--Si--LAMMPS--ipr1/Si.sw] | NISTiprpy | 1985--Stillinger-F-H--Si--LAMMPS--ipr1 | [Si] | [{'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 | [pair_style tersoff\n, pair_coeff * * 1988_Si(B).tersoff Si\n] | [potential_LAMMPS/1988--Tersoff-J--Si-b--LAMMPS--ipr1/1988_Si(B).tersoff] | NISTiprpy | 1988--Tersoff-J--Si-b--LAMMPS--ipr1 | [Si] | [{'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 | [pair_style tersoff\n, pair_coeff * * 1988_Si(C).tersoff Si\n] | [potential_LAMMPS/1988--Tersoff-J--Si-c--LAMMPS--ipr1/1988_Si(C).tersoff] | NISTiprpy | 1988--Tersoff-J--Si-c--LAMMPS--ipr1 | [Si] | [{'Tersoff_1988': {'title': 'Empirical interatomic potential for silicon with improved elastic properties', 'journal': 'Physical Review B', 'volume': '38', 'pages': '9902--9905', 'number': '14', '... |
27 | [pair_style tersoff\n, pair_coeff * * 1989_SiC.tersoff Si C\n] | [potential_LAMMPS/1989--Tersoff-J--Si-C--LAMMPS--ipr1/1989_SiC.tersoff] | NISTiprpy | 1989--Tersoff-J--Si-C--LAMMPS--ipr1 | [Si, C] | [{'Tersoff_1989': {'title': 'Modeling solid-state chemistry: Interatomic potentials for multicomponent systems', 'journal': 'Physical Review B', 'volume': '39', 'pages': '5566--5568', 'number': '8... |
... | ... | ... | ... | ... | ... | ... |
917 | [pair_style kim Sim_LAMMPS_TersoffZBL_DevanathanDiazdelaRubiaWeber_1998_SiC__SM_578912636995_000\n, pair_coeff * * Si C\n] | [] | OPENKIM | Sim_LAMMPS_TersoffZBL_DevanathanDiazdelaRubiaWeber_1998_SiC__SM_578912636995_000 | [Si, C] | [{'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 | [pair_style kim Sim_LAMMPS_Vashishta_BroughtonMeliVashishta_1997_SiO__SM_422553794879_000\n, pair_coeff * * Si O\n] | [] | OPENKIM | Sim_LAMMPS_Vashishta_BroughtonMeliVashishta_1997_SiO__SM_422553794879_000 | [Si, O] | [{'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 | [pair_style kim Sim_LAMMPS_Vashishta_NakanoKaliaVashishta_1994_SiO__SM_503555646986_000\n, pair_coeff * * Si O\n] | [] | OPENKIM | Sim_LAMMPS_Vashishta_NakanoKaliaVashishta_1994_SiO__SM_503555646986_000 | [Si, O] | [{'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 | [pair_style kim Sim_LAMMPS_Vashishta_VashishtaKaliaNakano_2007_SiC__SM_196548226654_000\n, pair_coeff * * Si C\n] | [] | OPENKIM | Sim_LAMMPS_Vashishta_VashishtaKaliaNakano_2007_SiC__SM_196548226654_000 | [Si, C] | [{'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 | [pair_style kim Sim_LAMMPS_Vashishta_VashishtaKaliaRino_1990_SiO__SM_887826436433_000\n, pair_coeff * * Si O\n] | [] | OPENKIM | Sim_LAMMPS_Vashishta_VashishtaKaliaRino_1990_SiO__SM_887826436433_000 | [Si, O] | [{'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 × 6 columns
Select the LAMMPS quip potential provided in the resource directory and execute the calculation:
job.potential = "Si-quip-xml"
job.run()
The job lmp_quip was saved and received the ID: 2
Print the total energy of both calculation:
print(job["output/generic/energy_tot"], job_reload["output/generic/energy_tot"])
[-8.66999651] [-8.67319651]