Skip to content

update: pass material to BS#279

Open
VsevolodX wants to merge 2 commits intomainfrom
fix/prove
Open

update: pass material to BS#279
VsevolodX wants to merge 2 commits intomainfrom
fix/prove

Conversation

@VsevolodX
Copy link
Member

@VsevolodX VsevolodX commented Mar 14, 2026

Summary by CodeRabbit

  • New Features
    • Visualizations for band structure and density of states now include contextual material information alongside the plots.
  • Documentation / UI
    • Renamed a display label to "N-doped Graphene (structure)" for clearer presentation in the 0D substitution section.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8dc4e046-bcce-44ee-bcaa-b087cb0de0c2

📥 Commits

Reviewing files that changed from the base of the PR and between 421726c and 1dafa46.

📒 Files selected for processing (1)
  • other/materials_designer/specific_examples/Introduction.ipynb

📝 Walkthrough

Walkthrough

Three notebooks in the materials_designer module now pass the material's serialized data via an extra_config argument to visualize_properties() calls, adding material context to visualizations without changing control flow.

Changes

Cohort / File(s) Summary
Specific Examples
other/materials_designer/specific_examples/defect_point_substitution_graphene_simulation.ipynb
Extended visualize_properties(...) call to include extra_config={"material": material.to_dict()} for band structure visualization.
Workflows
other/materials_designer/workflows/band_structure.ipynb, other/materials_designer/workflows/band_structure_hse.ipynb
Extended visualize_properties(...) calls to pass extra_config={"material": material.to_dict()} for DOS and HSE band structure visualizations.
Docs / Text
other/materials_designer/specific_examples/Introduction.ipynb
Updated display text: "N Substitution in Graphene (structure)" → "N-doped Graphene (structure)".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • timurbazhirov

Poem

🐰✨ I hop through notebooks, adding context light,
I tuck material bits into each plotted sight,
Band curves and DOS now hum with lore,
A rabbit’s tweak makes views mean more,
Hooray — the visuals bloom in gentle byte.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'update: pass material to BS' directly relates to the main changes across all modified files, which consistently add material data to visualization calls via extra_config parameter.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/prove
📝 Coding Plan
  • Generate coding plan for human review comments

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Ruff (0.15.5)
other/materials_designer/specific_examples/Introduction.ipynb

Unexpected end of JSON input


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
other/materials_designer/workflows/band_structure.ipynb (1)

639-641: Consider adding extra_config to the Band Structure visualization as well.

The DOS visualization at line 641 now receives the material context via extra_config, but the Band Structure visualization at line 621 does not. Given the PR title "pass material to BS" (Band Structure), this may be an oversight.

For consistency, consider updating line 621:

visualize_properties(band_structure_data, title="Band Structure", extra_config={"material":material.to_dict()})
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@other/materials_designer/workflows/band_structure.ipynb` around lines 639 -
641, The Band Structure call to visualize_properties is missing the material
context; update the visualize_properties invocation that passes
band_structure_data (the one executed when CALCULATION_TYPE ==
"band_structure_dos" or when creating the band structure visualization) to
include extra_config={"material": material.to_dict()} so it matches the DOS call
and supplies material context to the Band Structure visualization.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@other/materials_designer/workflows/band_structure.ipynb`:
- Around line 639-641: The Band Structure call to visualize_properties is
missing the material context; update the visualize_properties invocation that
passes band_structure_data (the one executed when CALCULATION_TYPE ==
"band_structure_dos" or when creating the band structure visualization) to
include extra_config={"material": material.to_dict()} so it matches the DOS call
and supplies material context to the Band Structure visualization.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 34c4ef83-82c8-4411-a647-a0452da849d6

📥 Commits

Reviewing files that changed from the base of the PR and between 3da8519 and 421726c.

📒 Files selected for processing (3)
  • other/materials_designer/specific_examples/defect_point_substitution_graphene_simulation.ipynb
  • other/materials_designer/workflows/band_structure.ipynb
  • other/materials_designer/workflows/band_structure_hse.ipynb

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.

1 participant