Skip to content

Commit

Permalink
Make pyiron atomistics the starting module
Browse files Browse the repository at this point in the history
  • Loading branch information
liamhuber committed May 15, 2023
1 parent 08b702e commit 5251b22
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions ironflow/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def __init__(
)

self.workflows = WorkflowsGUI(gui=self)
self.workflows.flow_box.node_selector.select_module(self._starting_module)
self.browser = BrowserGUI()

try:
Expand Down
3 changes: 3 additions & 0 deletions ironflow/gui/workflows/boxes/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ def module_options(self) -> list[str]:
def nodes_options(self) -> list[str]:
return sorted(self._nodes_dictionary[self.modules_dropdown.value].keys())

def select_module(self, module_name):
self.modules_dropdown.value = module_name

def update(self, nodes_dictionary: dict) -> None:
self._nodes_dictionary = nodes_dictionary
self.modules_dropdown.options = self.module_options
Expand Down
1 change: 1 addition & 0 deletions ironflow/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def __init__(
standard,
]:
self.register_nodes_from_module(module)
self._starting_module = pyiron_atomistics.__name__.split(".")[-1]

if extra_nodes_packages is not None:
for package in extra_nodes_packages:
Expand Down

0 comments on commit 5251b22

Please sign in to comment.