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

[Enhancement] Sunburst plots of coordination numbers and environments #135

Open
kaueltzen opened this issue Apr 24, 2024 · 4 comments
Open
Labels
enhancement Improvement to existing features/functionality plotly Concerning plotly-powered functions symmetry Spacegroup and other symmetry related plots

Comments

@kaueltzen
Copy link

Hi,

thank you for this amazing repository!

I have code for sunburst plots of coordination number and environment distributions within a dataset and was wondering if you are interested in adding that to pymatviz.

For example, the figure above shows the CN (inner ring) and CE (outer ring) distribution of all elemental carbon structures in the MaterialsProject. The CEs are encoded as in the ChemEnv module of pymatgen.

The code could be structured similar to your spacegroup_sunburst() function and either accept a sequence of coordination environments OR Structure objects and a neighbor determination algorithm and its parameters. In pymatgen, the CEs as encoded above are currently only available from ChemEnv strategies, but I'm working on the inclusion of other neighbor determination algorithms from the localenv module.

Also, this CN and CE sunburst function would have some normalization bool parameter (whether to set the sum of all CEs within a structure to 1 to avoid overrepresentation of larger structures or whether absolute occurrences are counted).

Let me know what you think!

@janosh
Copy link
Owner

janosh commented Apr 24, 2024

that's a great idea, thanks @kaueltzen! a PR would be much appreciated. would be interesting to plot this figure for the GNoME dataset (CC @esoteric-ephemera 😄)

out of curiosity, what are the 6% zero-coordinated carbons in MP?

@janosh janosh added enhancement Improvement to existing features/functionality plotly Concerning plotly-powered functions symmetry Spacegroup and other symmetry related plots labels Apr 24, 2024
@kaueltzen
Copy link
Author

Hi @janosh
thanks for the quick reply and your interest!
It will take some time though as I now first want to finish including and testing other neighbor determination algorithms than the modified Voronoi approach into ChemEnv.

The neighbors were determined with a simple distance-based approach based on the atomic radius and bonds that differ significantly from 2*atomic radius are not considered, like in mp-1056957. Of course one could discuss if another strategy is better suited to depict the bonding situation in this dataset!

@janosh
Copy link
Owner

janosh commented May 12, 2024

@kaueltzen i should mention that draft/WIP PRs are welcome. if you have partial/unpolished code, feel free to open a PR anyways and point out areas that you think need more work. i and perhaps @DanielYang59 would be happy to help 😄

@DanielYang59
Copy link
Collaborator

With pleasure :)

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 symmetry Spacegroup and other symmetry related plots
Projects
None yet
Development

No branches or pull requests

3 participants