-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b110cd1
commit 44298cb
Showing
12 changed files
with
120 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Volume Slice | ||
================= | ||
|
||
The volume slice is a 2D cross-sectional visualization of 3D volumetric data. It is an effective method for analyzing volumetric properties, such as molecular orbitals or charge densities, by slicing through the data at specified orientations and distances. | ||
|
||
Usage Example | ||
------------- | ||
Here is an example of drawing volume slices for the HOMO of the H2O molecule. | ||
|
||
.. code-block:: python | ||
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 | ||
.. figure:: _static/images/example-volume-slice.png | ||
:width: 40% | ||
:align: center | ||
|
||
|
||
For the ``settings``: | ||
|
||
- **h, k, l**: Miller indices defining the orientation of the slice. | ||
- **distance**: The distance of the slice from the origin, in Ångstroms. | ||
- **samplingDistance**: The sampling distance for rendering the slice, affecting resolution. | ||
|
||
.. tip:: | ||
|
||
Support for multiple slices with individual settings, allowing analysis from different orientations and depths. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from ..base_class import WidgetWrapper | ||
|
||
|
||
class VolumeSlice(WidgetWrapper): | ||
|
||
catalog = "VolumeSlice" | ||
|
||
_attribute_map = { | ||
"volumetric_data": "volumetricData", | ||
"settings": "sliceSettings", | ||
} | ||
|
||
_extra_allowed_attrs = [] | ||
|
||
def __init__(self, _widget): | ||
super().__init__(_widget) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+23.7 KB
tests/notebooks/tests/plugins.test.ts-snapshots/plugins-cell-4-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.