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

plot3d - go beyond NGLview #124

Open
samwaseda opened this issue Jan 11, 2024 · 3 comments
Open

plot3d - go beyond NGLview #124

samwaseda opened this issue Jan 11, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@samwaseda
Copy link
Member

Currently we have to rely on NGLview for most of the functionalities, especially if we want to have different colours for a continuous value, or vectors. It's not only extremely slow, but it also doesn't give us the possibility to

  • Combine it with continuum plotting
  • Save the figure
  • Run on machines that do not have NGLview installed

So the functionalities should be extended with plotly

@samwaseda samwaseda added the enhancement New feature or request label Jan 11, 2024
@samwaseda samwaseda self-assigned this Jan 11, 2024
@jan-janssen
Copy link
Member

But there is already a plotly part in the visualize module:
https://github.com/pyiron/structuretoolkit/blob/main/structuretoolkit/visualize.py#L146

@samwaseda
Copy link
Member Author

But there is already a plotly part in the visualize module:

I know, but the functionalities are a lot limited than NGLview

@superstar54
Copy link

I opened an issue (#156) regarding adding weas-widget, and found it also related to this issue.
weas-widget support coloring atoms by its attributes (charge, force, etc.), and it very fast.

from weas_widget import WeasWidget
import numpy as np
from ase.build import bulk

atoms = bulk('Au', cubic = True)
atoms *= [8, 8, 8]
charges = np.random.random(len(atoms))
atoms.set_array("charge", charges)

viewer = WeasWidget()
viewer.from_ase(atoms)
viewer.colorBy = "charge"
viewer.colorRamp = ["red", "yellow", "blue"]
viewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants