ase-weas-widget
Table of Contents
Installation
pip install ase-weas-widget
This should install weas-widget as the dependency if it is not installed.
Please refer to the weas-widget repository for examples in order to verifying its correct installation.
Usage
This plugin allows viewing ase.Atoms object using ase.visualize.view via the weas-widget in a notebook environment:
from ase.build import bulk
from ase.visualize import view
atoms = bulk('Si', 'diamond', 5.4)
view(atoms.repeat((2,2,2)), viewer='weas')
Output example:
The appearance of the resulting plot can be customized with a callback function that modifies the underlying WeasWidget object:
def apply_vesta(viewer):
"""Callback to customize the WeasWidget object"""
viewer.avr.model_style = 1
viewer.avr.show_bonded_atoms = True
viewer.avr.color_type = "VESTA"
atoms = bulk('Si', 'diamond', 5.4)
view(atoms.repeat((2,2,2)), viewer='weas', mods=apply_vesta)
Output example:
or equivalently using a pre-defined modifier function (callback) (see here for available options):
atoms = bulk('Si', 'diamond', 5.4)
view(atoms.repeat((2,2,2)), viewer='weas', presets='vesta,ball')
Please refer to the documentation of weas-widget for details about how to control and modify the output.
How it works
This plugin simply interfaces the WeasWidget object with the ase.visualize module. The view function returns the WeasWidget which is constructed from the
ase.Atoms object as the output. The latter is then displayed by Jupyter.
License
ase-weas-widget is distributed under the terms of the MIT license.
Metadata
Release files for ase-weas-widget 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ase_weas_widget-0.2.0.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ase_weas_widget-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / ase_weas_widget-0.2.0.tar.gz
| Download URL | ase_weas_widget-0.2.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2491f8a73a0e9c087158eae7138e1175726f98d2806b87005deb5f61afe00736
|
|
BLAKE2b-256 checksum How to use checksums |
4dfa7d65e3f318256acfd205e1391712695175ba35262d6f9540a9a22d49f9d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|
Release files / ase_weas_widget-0.2.0-py3-none-any.whl
| Download URL | ase_weas_widget-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cdbc84bb8e1883a22a1f874b0eea2b30413c7a4f8fefb43e1f19b401e1eba6e
|
|
BLAKE2b-256 checksum How to use checksums |
1092ce4727758da92aca5583067b564261bc5e9acf7f2e2622aa16b8ca213627
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|