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

Add volume slice plugin #81

Merged
merged 2 commits into from
Nov 15, 2024
Merged

Add volume slice plugin #81

merged 2 commits into from
Nov 15, 2024

Conversation

superstar54
Copy link
Owner

@superstar54 superstar54 commented Nov 15, 2024

from ase.build import molecule
from weas_widget import WeasWidget
from ase.io.cube import read_cube_data
volume, atoms = read_cube_data("h2o-homo.cube")
viewer = WeasWidget()
viewer.from_ase(atoms)
viewer.avr.model_style = 1
viewer.avr.volume_slice.volumetric_data = {"values": volume}
viewer.avr.volume_slice.settings = {"Slice 1": {"h": 0, "k": 1, "l": 0, "distance": 5.5, "samplingDistance": 0.1 },
                                    "Slice 2": {"h": 1, "k": 1, "l": 0, "distance": 5.5, "samplingDistance": 0.1 },
                                   }
viewer.camera.setting = {"direction": [0.5, 1, 2], "zoom": 1.5}
viewer

example-volume-slice

@superstar54 superstar54 force-pushed the add_volume_slice branch 2 times, most recently from e166881 to 17da00e Compare November 15, 2024 14:42
@superstar54 superstar54 merged commit 44298cb into main Nov 15, 2024
13 checks passed
@superstar54 superstar54 deleted the add_volume_slice branch November 15, 2024 15:18
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