How to use the nglview.show_pymatgen function in nglview

To help you get started, we’ve selected a few nglview examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github abinit / abipy / abipy / core / structure.py View on Github external
def nglview(self): # pragma: no cover
        """Visualize structure with nglview inside a jupyter notebook."""
        try:
            import nglview as nv
        except ImportError:
            cprint("nglview is not installed. See https://github.com/arose/nglview")
            raise
        view = nv.show_pymatgen(self)
        view.add_unitcell()
        return view

nglview

IPython widget to interactively view molecular structures and trajectories.

MIT
Latest version published 2 months ago

Package Health Score

82 / 100
Full package analysis

Similar packages