Viewing

flat.viewing

Module to help with molecule visualization

flat.viewing.axis(name='axis', *, _self=cmd)
DESCRIPTION

Puts coordinate axes to the lower left corner of the viewport.

USAGE

axis [ name ]

ARGUMENTS
namestr, default = ‘axis’

Name of the axis object

flat.viewing.beautify(selection='all', mode=0, *, _self=cmd)
DESCRIPTION

Display molecules in pretty representation.

USAGE

beautify [ selection [, mode ]]

ARGUMENTS
selectionstr, optional

Atom selection.

modeint, default = 0

Display mode.

flat.viewing.bounding_box(selection='all', state=0, vis=1, color='yellow', lw=2.0, *, quiet=0, _self=cmd)
DESCRIPTION

Draws a bounding box around a given selection.

USAGE

bounding_box [ selection [, state [, vis [, color ]]]]

ARGUMENTS
selectionstr, optional

Atom selection

stateint, default = 0

Object state where 0 is all states

visbool, default = True

Whether to visualize the bounding box

colorstr, default = ‘yellow’

Color of the bounding box

RETURNS
: ndarray

Array of shape (3,) with bounding box dimensions in Angstroms

flat.viewing.filter(mode=1, *, _self=cmd)
DESCRIPTION

Apply different preset filters to molecules for rendering:

  • 0 = PyMol default style

  • 1 = Simple FLAT style

  • 2 = Pretty figure style

USAGE

filter [ mode ]

ARGUMENTS
modeint, default = 1

Render mode preset

flat.viewing.gridbox(selection='all', grid=(5, 5, 5), color='yellow', lw=2.0, *, _self=cmd)
DESCRIPTION

Draw a grid box around selection.

USAGE

gridbox [ selection [, grid [, color ]]]

ARGUMENTS
selectionstr, optional

Atom selection

gridarray-like, shape (3,), default = (5, 5, 5)

Number of grids on X, Y, and Z axis

colorstr, default = ‘yellow’

Color of the grid box

flat.viewing.title(label, selection='polymer', size=26, va=0.8, ha=0.0, *, _self=cmd)
DESCRIPTION

Display title over selection.

USAGE

title label [ selection [, size [, va [, ha ]]]]

ARGUMENTS
labelstr

Text to display

selectionstr, default = ‘polymer’

Atom selection

sizeint, default = 26

Text size

vafloat, default = 0.0

Vertical alignment where 0 is center

hafloat, default = 0.8

Horizontal alignment where 0 is center