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: Visualizing Molecules #84

Open
JaGeo opened this issue Jun 21, 2023 · 1 comment
Open

Feature: Visualizing Molecules #84

JaGeo opened this issue Jun 21, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@JaGeo
Copy link
Contributor

JaGeo commented Jun 21, 2023

Hi @janosh ,

do you have any plans on supporting visualizations of molecules?

Of course, the following code block arrives at the same purpose but maybe it could be done more naturally?

from pymatgen.core import Molecule
from pymatviz.structure_viz import plot_structure_2d

mol = Molecule(species=["N", "O", "O"],
               coords=[[1.151500, -0.665600, 0.000000], [2.303000, 0.000000, 0.000000], [0.000000, 0.000000, 0.000000]])
plot_structure_2d(mol.get_boxed_structure(15, 15, 15), show_unit_cell=False)

For a porphyrine, it does look quite nice (except that my mol file does not seem to have H atoms):
image

@janosh
Copy link
Owner

janosh commented Jun 21, 2023

In principle, I'd like to have feature parity for molecules and structures. In practice though, it's not on the immediate roadmap due to lack of time. Any contributions would be much appreciated, of course! 🙏

In the long run, I'd like to write a Jupyter integration for the elementari interactive structure viewer which itself is far from finished.

On that note, @ixxie has kindly offered to contribute his Molecule viewer to elementari (see threlte/threlte#360). You can see a live demo of his component at https://rapc.science. Looks really nice! And should speed up the timeline for getting better molecule visualization into pymatviz.

@janosh janosh added enhancement New feature or request help wanted Extra attention is needed labels Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants