Note
Go to the end to download the full example code.
Create and visualize a molecular point cloud
from plotly.io import show
from aidsorb.utils import pcd_from_file
from aidsorb.visualize import draw_pcd
# sphinx_gallery_thumbnail_number = 2
Create the point cloud
The name of the point cloud is: IRMOF-1
The point cloud has shape: (424, 5)
Visualize it
fig = draw_pcd(pcd, scheme='jmol')
fig.update_layout(margin=dict(b=0, t=0, l=0, r=0)) # Optional.
show(fig)
Tip
You can also use the CLI:
$ aidsorb visualize path/to/structure
# Color it by electronegativity.
fig = draw_pcd(pcd, feature_to_color=(4, 'Electronegativity'), colorscale='viridis')
fig.update_layout(margin=dict(b=0, t=0, l=0, r=0)) # Optional.
show(fig)
Total running time of the script: (0 minutes 6.468 seconds)