schrodinger.application.matsci.sliceplot module

A plot that shows a 2D slice in a matplotlib plot and in the WS

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.matsci.sliceplot.SlicePlot(nav_stretch=True)

Bases: schrodinger.ui.qt.swidgets.SFrame

A frame that plots a 2D slice of information about a structure and shows a plane in the workspace that indicates where the 2D slice is coming from. Widgets allow the user to specify what 2D slice to plot.

LABEL_TEXT = 'Currently showing layer %d out of %d layers'
changeLayer()

Plot the layer indicated in the layer line edit

closeEvent(*args)

Overwrite the parent method to ensure the Workspace slab gets hidden

createSlab()

Create a rectangle indicating the current layer in the workspace

decorateAxes()

Add labels, etc to the plot

displayLocalAtoms(indexes)

Set visibility and representation of atoms based on proximity

Parameters:indexes (list) – The atom indexes for the central atoms to display
getAxisNum()

Subclasses must implement this to return the index of the current axis

Return type:int
Returns:The index of the current axis
hideEvent(*args)

Overwrite the parent method to ensure the Workspace slab gets hidden

hideSlab()

Hide the image of the slab in the WS

moveBack()

Plot the layer previous to the current one

moveForward()

Plot the layer after the current one

plotData()

Plot the data for the current layer and axis

redisplayAtoms()

Show all the atoms in the workspace

refreshPlot()
reset()

Reset this tab

setLayerLabelSize()

Set the size of the label that gives the current layer so that it always stays at its maximum width, avoiding widgets jittering left and right as the label content changes

setLayerWidgetStates()

Enable/disable layer change buttons as appropriate based on whether there are any additional layers in that direction

showEvent(*args)

Overwrite the parent method to ensure the Workspace slab gets shown when this tab is shown