diff --git a/aiidalab_qe/structures.py b/aiidalab_qe/structures.py index ab170405f..d6f663efd 100644 --- a/aiidalab_qe/structures.py +++ b/aiidalab_qe/structures.py @@ -27,6 +27,17 @@

""" +# The Examples list of (name, file) tuple curretly passed to +# StructureExamplesWidget. +Examples = [ + ("Silicon (diamond)", "miscellaneous/structures/Si.xyz"), + ("Silicon oxide", "miscellaneous/structures/SiO2.xyz"), + ("Diamond", "miscellaneous/structures/diamond.cif"), + ("Gallium arsenide", "miscellaneous/structures/GaAs.xyz"), + ("Gold (fcc)", "miscellaneous/structures/Au.cif"), + ("Cobalt (hcp)", "miscellaneous/structures/Co.cif"), +] + class StructureSelectionStep(ipw.VBox, WizardAppWidgetStep): """Integrated widget for the selection of structures from different sources.""" diff --git a/miscellaneous/structures/Au.cif b/miscellaneous/structures/Au.cif new file mode 100644 index 000000000..3744f75b0 --- /dev/null +++ b/miscellaneous/structures/Au.cif @@ -0,0 +1,36 @@ +#====================================================================== + +# CRYSTAL DATA + +#---------------------------------------------------------------------- + +data_VESTA_phase_1 + + +_pd_phase_name 'Au ' +_cell_length_a 4.17410 +_cell_length_b 4.17410 +_cell_length_c 4.17410 +_cell_angle_alpha 90 +_cell_angle_beta 90 +_cell_angle_gamma 90 +_symmetry_space_group_name_H-M 'P 1' +_symmetry_Int_Tables_number 1 + +loop_ +_symmetry_equiv_pos_as_xyz + 'x, y, z' + +loop_ + _atom_site_label + _atom_site_occupancy + _atom_site_fract_x + _atom_site_fract_y + _atom_site_fract_z + _atom_site_thermal_displace_type + _atom_site_B_iso_or_equiv + _atom_site_type_symbol + Au1 1.0 0 0 0 Biso 1.000 Au + Au2 1.0 0 0.50000 0.50000 Biso 1.000 Au + Au3 1.0 0.50000 0 0.50000 Biso 1.000 Au + Au4 1.0 0.50000 0.50000 0 Biso 1.000 Au diff --git a/miscellaneous/structures/Co.cif b/miscellaneous/structures/Co.cif new file mode 100644 index 000000000..40bc71a66 --- /dev/null +++ b/miscellaneous/structures/Co.cif @@ -0,0 +1,34 @@ +#====================================================================== + +# CRYSTAL DATA + +#---------------------------------------------------------------------- + +data_VESTA_phase_1 + + +_pd_phase_name 'Co ' +_cell_length_a 2.49680 +_cell_length_b 2.49680 +_cell_length_c 4.03081 +_cell_angle_alpha 90 +_cell_angle_beta 90 +_cell_angle_gamma 60.00000 +_symmetry_space_group_name_H-M 'P 1' +_symmetry_Int_Tables_number 1 + +loop_ +_symmetry_equiv_pos_as_xyz + 'x, y, z' + +loop_ + _atom_site_label + _atom_site_occupancy + _atom_site_fract_x + _atom_site_fract_y + _atom_site_fract_z + _atom_site_thermal_displace_type + _atom_site_B_iso_or_equiv + _atom_site_type_symbol + Co1 1.0 0 0 0 Biso 1.000 Co + Co2 1.0 0.33333 0.33333 0.50000 Biso 1.000 Co diff --git a/qe.ipynb b/qe.ipynb index 77b6212d2..af75a5024 100644 --- a/qe.ipynb +++ b/qe.ipynb @@ -41,7 +41,7 @@ "\n", "from aiida.orm import StructureData\n", "from aiida.orm import load_node\n", - "from aiidalab_widgets_base import OptimadeQueryWidget\n", + "from aiidalab_widgets_base import OptimadeQueryWidget, StructureExamplesWidget\n", "from aiidalab_widgets_base import StructureBrowserWidget, StructureManagerWidget, StructureUploadWidget\n", "from aiidalab_widgets_base import WizardAppWidget, WizardAppWidgetStep\n", "from aiidalab_widgets_base.bug_report import install_create_github_issue_exception_handler\n", @@ -51,7 +51,7 @@ "from aiidalab_qe.steps import ConfigureQeAppWorkChainStep\n", "from aiidalab_qe.steps import SubmitQeAppWorkChainStep\n", "from aiidalab_qe.steps import ViewQeAppWorkChainStatusAndResultsStep\n", - "from aiidalab_qe.structures import StructureSelectionStep\n", + "from aiidalab_qe.structures import StructureSelectionStep, Examples\n", "from aiidalab_qe.version import __version__\n", "\n", "\n", @@ -64,6 +64,7 @@ " StructureUploadWidget(title=\"Upload file\"),\n", " OptimadeQueryWidget(embedded=False),\n", " StructureBrowserWidget(title=\"AiiDA database\"),\n", + " StructureExamplesWidget(title=\"From Examples\", examples=Examples),\n", " ],\n", " node_class='StructureData',\n", " storable=False,\n",