Isosurface
The isosurface is a 3D surface that represents points of a constant value within a volume of data. It is a powerful tool to visualize the orbital of a molecule, the charge density of a crystal and other volumetric data.
Usage Example
Here is an example of drawing isosurfaces for HOMO of H2O molecule.
[1]:
from weas_widget import WeasWidget
from ase.io.cube import read_cube_data
volume, atoms = read_cube_data("../../examples/h2o-homo.cube")
viewer = WeasWidget()
viewer.from_ase(atoms)
viewer.avr.iso.volumetric_data = {"values": volume}
viewer.avr.iso.settings = {"positive": {"isovalue": 0.001, "opacity": 0.8},
"negative": {"isovalue": -0.001, "color": "yellow", "opacity": 0.8},}
viewer
[1]:
For the isoSetting:
isovalue: The value used to generate the isosurface. If null, it will be computed as the average of the data range.
color: The color of the isosurface.
opacity: The opacity of the isosurface, typically between 0 (transparent) and 1 (opaque).
mode: The mode of isosurface generation.
mode=0: Positive and negative isosurfaces are drawn. In this case, the color of the positive is the given color, and the color of the negative is the complementary color of the given color
mode=other: Only the given isosurface is drawn.
Note, the widget supports for multiple isosurfaces with individual properties (isovalue and color).