Structure Upload#

%%javascript

IPython.OutputArea.prototype._should_scroll = function(lines) {
    return false;
}
from aiidalab_widgets_base import CodQueryWidget, SmilesWidget, StructureExamplesWidget
from aiidalab_widgets_base import StructureBrowserWidget, StructureManagerWidget, StructureUploadWidget
from aiidalab_widgets_base import BasicStructureEditor
widget = StructureManagerWidget(
    importers=[
        StructureUploadWidget(title="From computer"),
        CodQueryWidget(title="COD"),
        StructureBrowserWidget(title="AiiDA database"),
        SmilesWidget(title="SMILES"),  # requires OpenBabel!
        StructureExamplesWidget(
            title="From Examples",
            examples=[
                ("Silicon oxide", "../miscellaneous/structures/SiO2.xyz")
            ]),
    ],
    editors = [
        BasicStructureEditor(title="Basic Editor"),
    ],
)
# widget = StructureUploadWidget()
# Enforce node format to be CifData:
# widget = StructureManagerWidget(importers = [("From computer", StructureUploadWidget())], node_class="CifData")

# Remove 'Store in AiiDA' button
# widget = StructureManagerWidget(importers = [("From computer", StructureUploadWidget())], storable=False)
display(widget)