Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/SOF-7339 update: rewrite ZSL notebook to use made-tools #118

Merged
merged 29 commits into from May 3, 2024

Conversation

VsevolodX
Copy link
Contributor

No description provided.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -46,13 +46,11 @@
"outputs": [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #6.        await install_packages("create_interface_with_min_strain_zsl.ipynb","../../config.yml")

Are we keeping this change? If yes, then how will the packages be installed in Python (not Pyodide)?


Reply via ReviewNB

@@ -46,13 +46,11 @@
"outputs": [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #7.    for material in globals()["materials_in"]:

for material_config in ...


Reply via ReviewNB

@@ -46,13 +46,11 @@
"outputs": [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #4.        materials[0],

Let's clearly isolate layer and substrate


Reply via ReviewNB

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just pass

substrate = materials[0]
layer = materials[1]

@@ -46,13 +46,11 @@
"outputs": [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #4.    Interface.from_str(str, "POSCAR")

What's all the above in this cell??


Reply via ReviewNB

@@ -46,13 +46,11 @@
"outputs": [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #5.    interfaces_range = slice(0, 1)  # select the first interface with the lowest strain

Let's move the comment above and add with the lowest strain and number of atoms

The actual selection by termination and slice functionality can go to the holder class itself too


Reply via ReviewNB

@@ -46,13 +46,11 @@
"outputs": [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #4.    materials = list(map(lambda interface_config: from_pymatgen(interface_config), selected_interface))

This lambda function can go to interface_data_holder


Reply via ReviewNB

utils/plot.py Outdated
import plotly.graph_objs as go


def plot_strain_vs_atoms(interface_data_holder, settings):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring + type declarations

@@ -46,13 +46,11 @@
"outputs": [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #4.        await micropip.install('mat3ra-api-examples[dev]', deps=False)

Remove [dev]


Reply via ReviewNB

@@ -46,13 +46,11 @@
"outputs": [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #1.    print(interface_data_holder.terminations)

Maybe we should print the number of interfaces for the first termination, not all of them

Should be:

print(f"Terminations found:  {interface_data_holder.terminations)}")
print(f"Interfaces for the first termination:  {interface_data_holder.get_interfaces_for_termination(0))}")

Reply via ReviewNB

@@ -46,13 +46,11 @@
"outputs": [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #3.    materials = list(selected_interface)

We should not need list here, just return the list for the get_interfaces_... function


Reply via ReviewNB

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't need print statement here either. We should instead add a visualization function to plot the selected interface(s) in a subsequent task

@VsevolodX VsevolodX merged commit 90f54f6 into dev May 3, 2024
4 checks passed
@VsevolodX VsevolodX deleted the feature/SOF-7339 branch May 3, 2024 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants