draw_box#

biotite.interface.pymol.draw_box(box, color=(0, 1, 0), width=1.0, origin=None, name=None, pymol_instance=None, delete=True)[source]#

Draw a box using Compiled Graphics Objects (CGOs).

This can be used to draw the unit cell or periodic box of an AtomArray.

Parameters:
boxarray-like, shape=(3,3)

The three box vectors.

colorarray-like, shape=(3,), optional

The color of the box, given as RGB values in the range (0, 1).

widthfloat, optional

The width of the drawn lines.

originarray-like, shape=(3,), optional

If given the box origin is drawn at the given position instead of the coordinate origin.

namestr, optional

The name of the newly created CGO object. If omitted, a unique name is generated.

pymol_instancemodule or SingletonPyMOL or PyMOL, optional

If PyMOL is used in library mode, the PyMOL or SingletonPyMOL object is given here. If otherwise PyMOL is used in GUI mode, the pymol module is given. By default the currently active PyMOL instance is used. If no PyMOL instance is currently running, PyMOL is started in library mode.

deletebool, optional

If set to true, the underlying PyMOL object will be removed from the PyMOL session, when the returned PyMOLObject is garbage collected.

Returns:
pymol_objectPyMOLObject

The created PyMOLObject representing the drawn CGOs.