How to use the ipython.jmol.Jmol function in ipython

To help you get started, we’ve selected a few ipython 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 pylada / pylada-light / ipython / jmol.py View on Github external
structure.cell[2, 2] = mini + maxi
        structure.cell[2, 2] *= 1.1

    if all(abs(structure.cell[:, 1] - [0, 500.0, 0.0]) < 1e-8):
        mini = abs(min([a.pos[1] for a in structure]))
        maxi = abs(max([a.pos[1] for a in structure]))
        structure.cell[1, 1] = mini + maxi
        structure.cell[1, 1] *= 1.1

    if all(abs(structure.cell[:, 0] - [500.0, 0.0,  0.0]) < 1e-8):
        mini = abs(min([a.pos[0] for a in structure]))
        maxi = abs(max([a.pos[0] for a in structure]))
        structure.cell[0, 0] = mini + maxi
        structure.cell[0, 0] *= 1.1

    Jmol(structure)