Skip to content

Experimental: add show_bonds: bool | NearNeighbors = False to structure_(2|3)d_plotly #233

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

Merged
merged 10 commits into from
Oct 12, 2024

Conversation

janosh
Copy link
Owner

@janosh janosh commented Oct 12, 2024

disabled by default since this feature needs more polish and testing. in particular, drawing bonds to image atoms (on unit cell edges) is not currently implemented. currently only bonds between the lattice basis atoms are drawn

@janosh janosh added enhancement Improvement to existing features/functionality plotly Concerning plotly-powered functions structure Structure viz related labels Oct 12, 2024
@janosh janosh merged commit b7adecd into main Oct 12, 2024
24 checks passed
@janosh janosh deleted the struct-3d-bonds branch October 12, 2024 19:35
janosh added a commit that referenced this pull request Mar 28, 2025
…cture_(2|3)d_plotly` (#233)

* add crystal symmetry props to Key enum

* rename _add_unit_cell to draw_unit_cell, add tests, then simplify

* rename generate_subplot_title to get_subplot_title

* add draw_bonds helper used by structure_(2|3)d_plotly to show bonds based on any pymatgen NearNeighbors subclass

defaults to CrystalNN

* rename get_image_sites->get_image_atoms

* fix and improve test coverage of get_image_sites

* tweak element_pair_rdfs axes label placement

* add and test element_symbol_map: dict[str, str] | None = None to ptable_heatmap_plotly

* default show_bonds to False (since half-baked and still experimental)

* fix test_structure_2d_plotly_multiple and make more accurate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to existing features/functionality plotly Concerning plotly-powered functions structure Structure viz related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant