{"cells":[{"metadata":{},"id":"convinced-stretch","cell_type":"markdown","source":"# pyiron example notebook\nThis 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. \n\nThe calculation archive was created using the following commands: \n```\nfrom pyiron_atomistics import Project\npr = Project(\"old_calculation\")\njob = pr.create.job.Lammps(job_name=\"lmp_si\")\njob.structure = pr.create.structure.ase.bulk(\"Si\")\njob.run()\npr.pack(destination_path=\"save\")\n```\n\nThe pyiron project class is imported using:"},{"metadata":{"trusted":true},"id":"genetic-obligation","cell_type":"code","source":"from pyiron_atomistics import Project","execution_count":1,"outputs":[]},{"metadata":{},"id":"coated-backing","cell_type":"markdown","source":"To validate the previous calculation have been successfully imported: "},{"metadata":{"trusted":true},"id":"nuclear-vacation","cell_type":"code","source":"pr_data = Project(\"pyiron/calculation\")\npr_data.job_table()","execution_count":2,"outputs":[{"output_type":"execute_result","execution_count":2,"data":{"text/plain":" id status chemicalformula job subjob projectpath \\\n0 1 finished Si2 lmp_si /lmp_si /home/jovyan/ \n\n project timestart \\\n0 calculation/old_calculation/ 2021-03-19 16:21:40.376046 \n\n timestop totalcputime computer \\\n0 2021-03-19 16:21:41.573096 1.0 pyiron@MacBook-Pro.local#1 \n\n hamilton hamversion parentid masterid \n0 Lammps 0.1 None None ","text/html":"
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
idstatuschemicalformulajobsubjobprojectpathprojecttimestarttimestoptotalcputimecomputerhamiltonhamversionparentidmasterid
01finishedSi2lmp_si/lmp_si/home/jovyan/calculation/old_calculation/2021-03-19 16:21:40.3760462021-03-19 16:21:41.5730961.0pyiron@MacBook-Pro.local#1Lammps0.1NoneNone
\n
"},"metadata":{}}]},{"metadata":{},"id":"changing-blues","cell_type":"markdown","source":"Reload the existing calculation to continue with the previous structure: "},{"metadata":{"trusted":true},"id":"valuable-footage","cell_type":"code","source":"job_reload = pr_data.load(\"lmp_si\")\nstructure_reload = job_reload.get_structure()","execution_count":3,"outputs":[]},{"metadata":{},"id":"convenient-eleven","cell_type":"markdown","source":"Create a new LAMMPS job object and assign the structure from the previous calculation: "},{"metadata":{"trusted":true},"id":"impaired-tablet","cell_type":"code","source":"pr_new = Project(\"new_calculation\")\njob = pr_new.create.job.Lammps(job_name=\"lmp_quip\")\njob.structure = structure_reload","execution_count":4,"outputs":[]},{"metadata":{},"id":"historical-decision","cell_type":"markdown","source":"List all available interatomic potentials: "},{"metadata":{"trusted":true},"id":"renewable-community","cell_type":"code","source":"job.view_potentials()","execution_count":5,"outputs":[{"output_type":"execute_result","execution_count":5,"data":{"text/plain":" Config \\\n0 [pair_style quip\\n, pair_coeff * * sw_example.xml \"IP SW\" 14\\n] \n1 [pair_style sw\\n, pair_coeff * * Si.sw Si\\n] \n18 [pair_style tersoff\\n, pair_coeff * * 1988_Si(B).tersoff Si\\n] \n19 [pair_style tersoff\\n, pair_coeff * * 1988_Si(C).tersoff Si\\n] \n27 [pair_style tersoff\\n, pair_coeff * * 1989_SiC.tersoff Si C\\n] \n.. ... \n917 [pair_style kim Sim_LAMMPS_TersoffZBL_DevanathanDiazdelaRubiaWeber_1998_SiC__SM_578912636995_000\\n, pair_coeff * * Si C\\n] \n920 [pair_style kim Sim_LAMMPS_Vashishta_BroughtonMeliVashishta_1997_SiO__SM_422553794879_000\\n, pair_coeff * * Si O\\n] \n921 [pair_style kim Sim_LAMMPS_Vashishta_NakanoKaliaVashishta_1994_SiO__SM_503555646986_000\\n, pair_coeff * * Si O\\n] \n922 [pair_style kim Sim_LAMMPS_Vashishta_VashishtaKaliaNakano_2007_SiC__SM_196548226654_000\\n, pair_coeff * * Si C\\n] \n923 [pair_style kim Sim_LAMMPS_Vashishta_VashishtaKaliaRino_1990_SiO__SM_887826436433_000\\n, pair_coeff * * Si O\\n] \n\n Filename \\\n0 [quip/sw_example.xml, quip/data_sw] \n1 [potential_LAMMPS/1985--Stillinger-F-H--Si--LAMMPS--ipr1/Si.sw] \n18 [potential_LAMMPS/1988--Tersoff-J--Si-b--LAMMPS--ipr1/1988_Si(B).tersoff] \n19 [potential_LAMMPS/1988--Tersoff-J--Si-c--LAMMPS--ipr1/1988_Si(C).tersoff] \n27 [potential_LAMMPS/1989--Tersoff-J--Si-C--LAMMPS--ipr1/1989_SiC.tersoff] \n.. ... \n917 [] \n920 [] \n921 [] \n922 [] \n923 [] \n\n Model \\\n0 QUIP \n1 NISTiprpy \n18 NISTiprpy \n19 NISTiprpy \n27 NISTiprpy \n.. ... \n917 OPENKIM \n920 OPENKIM \n921 OPENKIM \n922 OPENKIM \n923 OPENKIM \n\n Name \\\n0 Si-quip-xml \n1 1985--Stillinger-F-H--Si--LAMMPS--ipr1 \n18 1988--Tersoff-J--Si-b--LAMMPS--ipr1 \n19 1988--Tersoff-J--Si-c--LAMMPS--ipr1 \n27 1989--Tersoff-J--Si-C--LAMMPS--ipr1 \n.. ... \n917 Sim_LAMMPS_TersoffZBL_DevanathanDiazdelaRubiaWeber_1998_SiC__SM_578912636995_000 \n920 Sim_LAMMPS_Vashishta_BroughtonMeliVashishta_1997_SiO__SM_422553794879_000 \n921 Sim_LAMMPS_Vashishta_NakanoKaliaVashishta_1994_SiO__SM_503555646986_000 \n922 Sim_LAMMPS_Vashishta_VashishtaKaliaNakano_2007_SiC__SM_196548226654_000 \n923 Sim_LAMMPS_Vashishta_VashishtaKaliaRino_1990_SiO__SM_887826436433_000 \n\n Species \\\n0 [Si] \n1 [Si] \n18 [Si] \n19 [Si] \n27 [Si, C] \n.. ... \n917 [Si, C] \n920 [Si, O] \n921 [Si, O] \n922 [Si, C] \n923 [Si, O] \n\n Citations \n0 {} \n1 [{'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... \n18 [{'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':... \n19 [{'Tersoff_1988': {'title': 'Empirical interatomic potential for silicon with improved elastic properties', 'journal': 'Physical Review B', 'volume': '38', 'pages': '9902--9905', 'number': '14', '... \n27 [{'Tersoff_1989': {'title': 'Modeling solid-state chemistry: Interatomic potentials for multicomponent systems', 'journal': 'Physical Review B', 'volume': '39', 'pages': '5566--5568', 'number': '8... \n.. ... \n917 [{'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... \n920 [{'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... \n921 [{'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'... \n922 [{'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... \n923 [{'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... \n\n[77 rows x 6 columns]","text/html":"
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ConfigFilenameModelNameSpeciesCitations
0[pair_style quip\\n, pair_coeff * * sw_example.xml \"IP SW\" 14\\n][quip/sw_example.xml, quip/data_sw]QUIPSi-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]NISTiprpy1985--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]NISTiprpy1988--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]NISTiprpy1988--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]NISTiprpy1989--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][]OPENKIMSim_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][]OPENKIMSim_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][]OPENKIMSim_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][]OPENKIMSim_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][]OPENKIMSim_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...
\n

77 rows × 6 columns

\n
"},"metadata":{}}]},{"metadata":{},"id":"induced-destiny","cell_type":"markdown","source":"Select the LAMMPS quip potential provided in the resource directory and execute the calculation:"},{"metadata":{"trusted":true},"id":"dependent-proposal","cell_type":"code","source":"job.potential = \"Si-quip-xml\"\njob.run()","execution_count":6,"outputs":[{"output_type":"stream","text":"The job lmp_quip was saved and received the ID: 2\n","name":"stdout"}]},{"metadata":{},"id":"patent-steel","cell_type":"markdown","source":"Print the total energy of both calculation: "},{"metadata":{"trusted":true},"id":"overall-waters","cell_type":"code","source":"print(job[\"output/generic/energy_tot\"], job_reload[\"output/generic/energy_tot\"])","execution_count":7,"outputs":[{"output_type":"stream","text":"[-8.66999651] [-8.67319651]\n","name":"stdout"}]}],"metadata":{"kernelspec":{"name":"python3","display_name":"Python 3","language":"python"},"language_info":{"name":"python","version":"3.7.10","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":5}