schrodinger.application.bioluminate.protein_report_widget module

Analyzes the quality of the structure in the workspace in terms of bond length, bond angles, dihedral values, peptide geometry, and other quantities.

Copyright (c) Schrodinger, LLC. All rights reserved.

class schrodinger.application.bioluminate.protein_report_widget.DataModel(master)

Bases: PyQt6.QtCore.QAbstractTableModel

Class for storing the table information.

__init__(master)

Create a DataModel instance

rowCount(parent=<PyQt6.QtCore.QModelIndex object>)

Returns number of rows

Parameters

parent (QtCore.QModelIndex) – unused

Return type

int

Returns

Number of rows

columnCount(parent=<PyQt6.QtCore.QModelIndex object>)

Returns number of columns

Parameters

parent (QtCore.QModelIndex) – unused

Return type

int

Returns

Number of rows

setData(data_list, headers)

Sets the internal data list to the specified list. NOTE: Will use the actual list passed to it (without making a copy)

Parameters
  • data_list (list) – the list of data for the model. Uses the actual list, not a copy

  • headers (list of str) – The column headers

data(index, role=ItemDataRole.DisplayRole)

Given a cell index, returns the data that should be displayed in that cell. Used by the view.

Parameters
  • index (QtCore.QModelIndex) – index of the cell to return data for

  • role (Qt.ItemDataRole) – The data role to return

Returns

the requested data for the requested index

headerData(section, orientation, role)

Returns the string that should be displayed in the specified header cell. Used by the View.

Parameters
  • section (int) – the row or column index requested

  • orientation (Qt.Orientation (Qt.Horizontal or Qt.Vertical)) – Whether this is for the horizontal or vertical header

  • role (Qt.ItemDataRole) – The data role to return - Qt.DisplayRole to return the text of the header.

Returns

the requested data for the requested header item

sort(Ncol, order)

Sort table by given column number. The first column will be sorted based on the first chain:residue number rather than a simple alphabetical sort. Note that this method changes the actual model._data property.

Parameters
  • Ncol (int) – The column index to sort

  • order (Qt.SortOrder (Qt.AscendingOrder or Qt.DescendingOrder)) – The order in which to sort the column

class schrodinger.application.bioluminate.protein_report_widget.ReportFrame(parent_layout=None, update_button=True, app_parent=None, load_proteins=True)

Bases: PyQt6.QtWidgets.QFrame

A QtWidgets.QFrame that contains a Protein Report

__init__(parent_layout=None, update_button=True, app_parent=None, load_proteins=True)

Create a ReportFrame object

Parameters
  • parent_layout (QLayout or None) – If given the ReportFrame will add itself to this layout

  • update_button (bool) – True if the report should have an update button, False if not.

  • app_parent (Deprecated; no longer used.) – Deprecated; no longer used.

  • load_proteins (bool) – If True, the panel will attempt to load proteins when created. If False (default), not attempt is made - the widgets are merely created.

getSelectedDataTitles(model)

Returns a list of selected data titles (the value in the first column)

Parameters

model (DataModel) – The model the data comes from

Return type

list

Returns

list of data titles (the value in the first column) for each selected row

selectionChangedCallback(selected=None, deselected=None)

Called when table selection is changed

Parameters
  • selected (QItemSelection) – Unused callback-required parameters

  • deselected (QItemSelection) – Unused callback-required parameters

getDataModelClass()

Returns the proper data model class to use, allows easy subclassing of the Model in report subclasses

Return type

DataModel

Returns

The CLASS used for the table data model in the report. Does not return a class instance, only the class itself.

getStructure(entry_id=None)

Return the structure to report on.

Parameters

entry_id (str or None) – Entry ID of the structure to use, or None (default) if the workspace structure is to be used. If entry_id is given, the structure is taken from the project table row for that entry_id (which may be different from the current workspace structure). If entry_id is None, the workspace structure is used, but crystal structure properties are taken from the included project table row

Return type

schrodinger.structure.Structure

Returns

The structure requested

updateTables(entry_id=None)

Calculate new data for the requested structure and load the data into the table.

Parameters

entry_id (str or None) – Entry ID of the structure to use, or None (default) if the workspace structure is to be used. If entry_id is given, the structure is taken from the project table row for that entry_id (which may be different from the current workspace structure). If entry_id is None, the workspace structure is used, but crystal structure properties are taken from the included project table row

clear()

Clear the widget. Used by PrepWizard.

setSets(all_titles, all_tooltips)

Populate the sets menu with the given items. Also takes in a list of tooltips, for each item.

Parameters
  • all_titles (list(str)) – List of item texts to add.

  • all_tooltips – List of tool tips for each item.

Type

all_tooltips: list(str)

exportTables(filename, tables_to_write)

Export the specified tables to the <filename> file.

Parameters
  • filename (str) – the path to the output file

  • tables_to_write (str) – the name of the set of data to write out

setChanged(selected_title)

Callback for when a new set of data is requested. Changes the data displayed in the table. This also changes the underlying model the table uses.

Parameters

selected_title (str) – The name of the set of data requested

exportCurrentTable()

Export only the current table.

exportAllTables()

Export all tables.

openHelp()

Display the help topic

closePanel()

Hide the panel

workspaceChanged(changed)

Keep track of when something changes in the workspace that would invalidate the current data.

Parameters

changed (str) – What changed in the workspace

close()

Close the frame, and clean up anything that needs to happen upon closing

schrodinger.application.bioluminate.protein_report_widget.panel()

Open (or re-open) the panel

schrodinger.application.bioluminate.protein_report_widget.quit()

To force quit the GUI in Maestro, call ‘app.quit’