matview
is the library for displaying structures interactively in jupyter.
k3d
makes it easy to perform various interactive operations. In addition, the mixins implemented in widgets allow many useful operations to view the structure.
from matview.visualizers.crystal import CrystalVisualizer
from pymatgen.core import Structure
struct = Structure(...)
visualizer = CrystalVisualizer(struct)
visualizer.show()
The structure is displayed as follows
The structure can be rotated, zoomed in/out, transrated with the mouse, and the k3d panel can be used to change whether or not bonds are shown, change the appearance of atoms, etc.
If you want to change the bonds, use the Bond update
tab.
Currently, following visuzlizers are available.
- CrydtalVisualizer
- StructureComparator
- TrajectoryVisualizer