コード例 #1
0
    transformations=[
        "SupercellTransformationComponent",
        "AutoOxiStateDecorationTransformationComponent",
        "CubicSupercellTransformationComponent",
        "GrainBoundaryTransformationComponent",
        "MonteCarloRattleTransformationComponent",
        "SlabTransformationComponent",
        "SubstitutionTransformationComponent",
    ]
)

struct_component = ctc.StructureMoleculeComponent(
    links={"default": transformation_component.id()}
)

robocrys_panel = ctc.RobocrysComponent(links={"default": transformation_component.id()})
xrd_panel = ctc.XRayDiffractionPanelComponent(
    links={"default": transformation_component.id()}
)
# pbx_component = ctc.PourbaixDiagramPanelComponent(origin_component=struct_component)
#
symmetry_panel = ctc.SymmetryPanel(links={"default": struct_component.id()})
localenv_panel = ctc.LocalEnvironmentPanel(
    links={
        "default": struct_component.id(),
        "graph": struct_component.id("graph"),
        "display_options": struct_component.id("display_options"),
    }
)

if SETTINGS.MP_EMBED_MODE:
コード例 #2
0
    json_editor_component.attach_from(transformation_component, origin_store_name="out")

    struct_component = ctc.StructureMoleculeComponent()
    struct_component.attach_from(json_editor_component, origin_store_name="out")

    # TODO: change to link to struct_or_mol ?
    download_component = ctc.DownloadPanelComponent(origin_component=struct_component)

    search_component = ctc.SearchComponent()
    upload_component = ctc.StructureMoleculeUploadComponent()

    favorites_component = ctc.FavoritesComponent()
    favorites_component.attach_from(search_component, this_store_name="current-mpid")

    literature_component = ctc.LiteratureComponent(origin_component=struct_component)
    robocrys_component = ctc.RobocrysComponent(origin_component=struct_component)
    magnetism_component = ctc.MagnetismComponent(origin_component=struct_component)
    xrd_component = ctc.XRayDiffractionPanelComponent(origin_component=struct_component)
    pd_component = ctc.PhaseDiagramPanelComponent(origin_component=struct_component)
    symmetry_component = ctc.SymmetryComponent(origin_component=struct_component)

    bonding_graph_component = ctc.BondingGraphComponent()
    bonding_graph_component.attach_from(struct_component, origin_store_name="graph")
    bonding_graph_component.attach_from(
        struct_component,
        this_store_name="display_options",
        origin_store_name="display_options",
    )

    panels = [
        symmetry_component,