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
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -46,13 +46,11 @@ | |||
"outputs": [], |
There was a problem hiding this comment.
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": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -46,13 +46,11 @@ | |||
"outputs": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -46,13 +46,11 @@ | |||
"outputs": [], |
There was a problem hiding this comment.
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": [], |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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": [], |
There was a problem hiding this comment.
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": [], |
There was a problem hiding this comment.
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": [], |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
No description provided.