ccpn.ui.gui.modules package¶
Modules package
Subpackages¶
- ccpn.ui.gui.modules.macroEditorUtil package
- Subpackages
- Submodules
- ccpn.ui.gui.modules.macroEditorUtil.CompletionProviders module
- ccpn.ui.gui.modules.macroEditorUtil.IconDefinitions module
- ccpn.ui.gui.modules.macroEditorUtil.MacroEditorNativeServer module
- ccpn.ui.gui.modules.macroEditorUtil.MacroEditorServer module
- ccpn.ui.gui.modules.macroEditorUtil.QPythonEditor module
- ccpn.ui.gui.modules.macroEditorUtil.workers module
Submodules¶
ccpn.ui.gui.modules.CcpnModule module¶
This file contains CcpnModule base class modified by Geerten 1-12/12/2016
- class ccpn.ui.gui.modules.CcpnModule.BorderOverlay(parent, borderColour=None)[source]¶
Bases:
PyQt5.QtWidgets.QWidget
Overlay widget that draws a border around the whole of the module ensuring a nice clean edge
- class ccpn.ui.gui.modules.CcpnModule.CcpnModule(mainWindow, name, closable=True, closeFunc=None, settingsScrollBarPolicies=('asNeeded', 'asNeeded'), **kwds)[source]¶
Bases:
pyqtgraph.dockarea.Dock.Dock
,ccpn.ui.gui.widgets.DropBase.DropBase
,ccpn.core.lib.Notifiers.NotifierBase
Base class for CCPN modules sets self.application, self.current, self.project and self.mainWindow
Overide parameters for settings widget as needed
- Usage:
__init__ initialises the module according to the settings given below:
_closeModule closing of the module.
If addition functionality is required, the correct procedure is to override this method within your class and end your method with super()._closeModule()
- e.q.
- def _closeModule(self):
# your functions here super(<YourModule>, self)._closeModule()
OR __init__ with closeFunc=<your close function>
- HORIZONTAL = 'horizontal'¶
- VERTICAL = 'vertical'¶
- className = ''¶
- defaultSettingsState = 0¶
- event(event)[source]¶
CCPNInternal Handle events for switching transparency of modules Modules become transparent when dragging to another module. Ensure that the dropAreas become active
- property gid: ccpn.core.lib.Pid.Pid¶
- ccpn.core.lib.Pid.Pid, immutable -
- property id¶
- None, immutable - The module name without the pid-prefix but including the serial number (if any)
- includeSettingsWidget = False¶
- installMaximiseEventHandler(maximiseFunc, closeFunc)[source]¶
Attach a maximise function to the parent window. This is called when the WindowStateChanges to maximises
- Parameters
maximiseFunc –
- labelOrientation = 'horizontal'¶
- longClassName = 'Module'¶
- property longPid: ccpn.core.lib.Pid.Pid¶
- ccpn.core.lib.Pid.Pid, immutable - Identifier for the object, unique within the project - added to give label to ccpnModules
- maxSettingsState = 3¶
- property moduleName¶
- None, mutable - Module name as appear on the GUI, without the pid identifier (e.g.: MO:, Module: or GD:, SpectrumDisplay:).
- property pid: ccpn.core.lib.Pid.Pid¶
- ccpn.core.lib.Pid.Pid, immutable - Identifier for the object, unique within the project - added to give label to ccpnModules
- property pidFields¶
- None, immutable - get the three parts of a Pid
- restoreWidgetsState(**widgetsState)[source]¶
Restore the gui params. To Call it: _setParams(**{“variableName”:”value”})
This is automatically called after every restoration and after the module has been initialised. Subclass this for a custom behaviour. for example custom callback after the widgets have been restored. Subclass like this:
- Parameters
widgetsState –
- settingsMinimumSizes = (100, 50)¶
- settingsPosition = 'top'¶
- shortClassName = 'MO'¶
- property titleName¶
- None, immutable - module name without the pid-prefix and serial number (if any)
- property widgetsState¶
- None, immutable - return {“variableName”:”value”} of all gui Variables
- class ccpn.ui.gui.modules.CcpnModule.CcpnModuleLabel(name, module, showCloseButton=True, closeCallback=None, enableSettingsButton=False, settingsCallback=None)[source]¶
Bases:
pyqtgraph.dockarea.Dock.DockLabel
Subclassing DockLabel to modify appearance and functionality
- TOP_LEFT = 'TOP_LEFT'¶
- TOP_RIGHT = 'TOP_RIGHT'¶
- property labelName¶
- None, immutable -
- labelSize = 16¶
- mousePressEvent(event: PyQt5.QtGui.QMouseEvent)[source]¶
Re-implementation of the mouse event so a right mouse context menu can be raised.
- paintEvent(ev)[source]¶
Copied from the parent VerticalLabel class to allow for modification in StyleSheet
- sigDragEntered¶
- class ccpn.ui.gui.modules.CcpnModule.DropAreaSelectedOverlay(parent)[source]¶
Bases:
PyQt5.QtWidgets.QWidget
Overlay widget that draws highlight over the current module during a drag-drop operation
ccpn.ui.gui.modules.ChemicalShiftTable module¶
This file contains ChemicalShiftTable class
modified by Geerten 1-7/12/2016 tertiary version by Ejb 9/5/17
- class ccpn.ui.gui.modules.ChemicalShiftTable.ChemicalShiftTable(parent=None, mainWindow=None, moduleParent=None, actionCallback=None, selectionCallback=None, chemicalShiftList=None, hiddenColumns=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.GuiTable.GuiTable
Class to present a NmrResidue Table and a NmrChain pulldown list, wrapped in a Widget
- PRIMARYCOLUMN = '_object'¶
- addWidgetToTop(widget, col=2, colSpan=1)[source]¶
Convenience to add a widget to the top of the table; col >= 2
- attributeName = 'chemicalShiftLists'¶
- className = 'ChemicalShiftListTable'¶
- clearSelection()[source]¶
Clear the current selection in the table and remove objects from the current list
- columnHeaders = {'_object': '_object', 'allPeaks': 'Assigned Peaks', 'allPeaksCount': 'Total Peak Count', 'atomName': 'AtomName', 'chainCode': 'ChainCode', 'comment': 'Comment', 'figureOfMerit': 'Figure of Merit', 'isDeleted': 'isDeleted', 'nmrAtom': 'NmrAtom', 'orphan': 'Orphaned', 'pid': 'ChemicalShift', 'residueType': 'ResidueType', 'sequenceCode': 'SequenceCode', 'shiftListPeaksCount': 'Peak Count', 'state': 'State', 'uniqueId': 'Unique ID', 'value': 'ChemicalShift Value (ppm)', 'valueError': 'Value Error'}¶
- defaultHidden = ['uniqueId', 'isDeleted', 'figureOfMerit', 'allPeaks', 'chainCode', 'sequenceCode', 'state', 'orphan']¶
- getDataFrameFromExpandedList(table=None, buildList=None, colDefs=None, expandColumn=None)[source]¶
Return a Pandas dataFrame from an internal list of objects The columns are based on the ‘func’ functions in the columnDefinitions
- Parameters
buildList –
colDefs –
- Return pandas dataFrameObject
- populateTable(rowObjects=None, columnDefs=None, selectedObjects=None)[source]¶
Populate the table with a set of objects to highlight, or keep current selection highlighted with the first item visible.
Use selectedObjects = [] to clear the selected items
- Parameters
rowObjects – list of objects to set each row
- tipTexts = ('Unique identifier for the chemicalShift', 'isDeleted', 'ChemicalShift.pid', 'ChemicalShift value in ppm', 'Error in the chemicalShift value in ppm', 'Figure of merit, between 0 and 1', 'Pid of nmrAtom if attached, or None', 'ChainCode of attached nmrAtom, or None', 'SequenceCode of attached nmrAtom, or None', 'ResidueType of attached nmrAtom, or None', 'AtomName of attached nmrAtom, or None', 'Active state of chemicalShift', 'Orphaned state of chemicalShift', 'List of assigned peaks associated with this chemicalShift', 'Number of assigned peaks attached to a chemicalShift\nbelonging to spectra associated with parent chemicalShiftList', 'Total number of assigned peaks attached to a chemicalShift\nbelonging to any spectra', 'Optional comment for each chemicalShift', 'None')¶
- class ccpn.ui.gui.modules.ChemicalShiftTable.ChemicalShiftTableModule(mainWindow=None, name='Chemical Shift Table', chemicalShiftList=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module by wrapping a NmrResidueTable instance
- activePulldownClass = None¶
- className = 'ChemicalShiftTableModule'¶
- includeSettingsWidget = True¶
- maxSettingsState = 2¶
- settingsPosition = 'left'¶
ccpn.ui.gui.modules.ChemicalShiftTableWithAssignment module¶
This file contains AssignmentInspectorModule class
modified by Geerten 1-9/12/2016: - intialisation with ‘empty’ settings possible, - now responsive to current.nmrResidues
- class ccpn.ui.gui.modules.ChemicalShiftTableWithAssignment.ChemicalShiftTableWithAssignment(mainWindow, name='Chemical Shift Table', chemicalShiftList=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This Module allows inspection of the NmrAtoms of a selected NmrResidue It responds to current.nmrResidues, taking the last added residue to this list The NmrAtom listWidget allows for selection of the nmrAtom; subsequently its assignedPeaks are displayed.
- Position = 'top'¶
- attributeName = 'peaks'¶
- className = 'AssignmentInspectorModule'¶
- includeSettingsWidget = True¶
- maxSettingsState = 2¶
ccpn.ui.gui.modules.ChemicalShiftsMappingModule module¶
Module Documentation
This module has three sections plus settings:
| TABLE | PLOTS |Settings | ————- || BAR CHART | ——————————-This module plots a bar chart of NmrResidue number as function of delta shift for its (nmrAtoms) assigned peaks.
- ** Only NmrResidue with an integer as sequenceCode is allowed **.
- E.G.: OK –> sequenceCode = 44;
NO –> sequenceCode = ‘44i-1’;
- There are four modes of Deltadelta calculation (Settings): POSITIONS, HEIGHT, VOLUME, LINEWIDTHS
The delta shift for POSITIONS and LINEWIDTHS is calculated from the peak properties as following, assuming the NmrAtoms of interest H and N:
CSPi = √((Δδ_Hi )^2+α(Δδ_Ni )^2 )
- The delta shift for HEIGHT and VOLUME is calculated from the peak properties as following:
CSPi = √((Δδ )^2
The peaks used are as default taken from the last peak list for the selected spectra (settings tab). Any sensible combination of NmrAtoms is allowed. See tutorials for more information.
Macros: # Example 1: On a the TStar project with all peaks correctly fitted to their spectra, this macro will show how to
extrapolate data from the CSM module and plot different properties. Paste into the Macro editor Module or directly into the PythonConsole Module and run it.
>>> import numpy as np from ccpn.util.Common import splitDataFrameWithinRange from ccpn.ui.gui.widgets.PlotterWidget import PlotterWidget from ccpn.ui.gui.modules.NmrResidueTable import KD, Deltas from ccpn.core.lib.DataFrameObject import DATAFRAME_OBJECTmoduleName = ‘Chemical Shift Mapping:1’ # The displayed CSM module name you want to get information from. csm = mainWindow.moduleArea.modules[moduleName] tableData = csm.tableData # dataframe as the displayed table. See https://pandas.pydata.org for Pandas documentation. deltasColumn = tableData[Deltas] # name in the table column deltasROI = [np.std(deltasColumn), np.max(deltasColumn)] # Deltas Region of Interest. Min the std of all deltas. kdsROI = [0.01, 0.2] # Kds Region of Interest. inner, outer = splitDataFrameWithinRange(tableData, Deltas, KD, *deltasROI, *kdsROI) # Split the data based on ROIs inner.index = [nr.sequenceCode+” “+nr.residueType for nr in inner.index] # will be used to make labels on the plot. widget = PlotterWidget() plot = widget.plotDataFrame(dataFrame=inner, kind=’bar’,title=’KDs and Deltas’) # See Pandas and Matplotlib for plots customisations. widget.show(windowTitle=’Macro CSM’, size=(500, 500)) >>>
- class ccpn.ui.gui.modules.ChemicalShiftsMappingModule.ChemicalShiftsMapping(mainWindow, name='Chemical Shift Mapping', nmrChain=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
- className = 'ChemicalShiftsMapping'¶
- getBindingCurves(nmrResidues)[source]¶
Gets binding curve as dataFrame for specific NmrResidues. Returns a DataFrame as: Index -> nmrResidue Object, columns: int or float, raw values: int or float
Columns |as the concentration/time/etc valueindex | 1 | 2 ||----------------+--------|——-| | nmrResidue1 | 1.0 | 1.1 | | nmrResidue2 | 2.0 | 1.2 |
- includeSettingsWidget = True¶
- maxSettingsState = 2¶
- restoreWidgetsState(**widgetsState)[source]¶
Restore the gui params. To Call it: _setParams(**{“variableName”:”value”})
This is automatically called after every restoration and after the module has been initialised. Subclass this for a custom behaviour. for example custom callback after the widgets have been restored. Subclass like this:
- Parameters
widgetsState –
- settingsPosition = 'left'¶
- property tableData¶
- None, immutable - :return: dataFrame containing all data on the Chemical Shift Mapping Module table
Columns | “as the displayed table”index | # | Index | Pid, _object, Sequence, Deltas, Kd …|----------------+--------|——-| | 1 | 1 | 1 | | 2 | 2 | 2 |
- property thresholdValue¶
- None, immutable - Gets the threshold value currently displayed on the graph
- property widgetsState¶
- None, immutable - return {“variableName”:”value”} of all gui Variables
ccpn.ui.gui.modules.DataTableModule module¶
Module Documentation here
- class ccpn.ui.gui.modules.DataTableModule.DataTableModule(mainWindow=None, name='DataTable Module', table=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module by wrapping a DataTable instance
- activePulldownClass = None¶
- className = 'DataTableModule'¶
- includeNmrChains = False¶
- includePeakLists = False¶
- includeSettingsWidget = False¶
- includeSpectrumTable = False¶
- maxSettingsState = 2¶
- settingsPosition = 'left'¶
ccpn.ui.gui.modules.DataTableModuleABC module¶
- class ccpn.ui.gui.modules.DataTableModuleABC.DataTableModuleBC(dataTable=None, mainWindow=None, name='Generic DataTable Module')[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module by wrapping a TableExample instance
- className = 'DataTableModule'¶
- includeSettingsWidget = True¶
- maxSettingsState = 2¶
- settingsPosition = 'left'¶
ccpn.ui.gui.modules.IntegralTable module¶
- class ccpn.ui.gui.modules.IntegralTable.IntegralTable(parent=None, mainWindow=None, moduleParent=None, integralList=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.GuiTable.GuiTable
Class to present a IntegralTable pulldown list, wrapped in a Widget
- OBJECT = 'object'¶
- TABLE = 'table'¶
- attributeName = 'integralLists'¶
- className = 'IntegralTable'¶
- class ccpn.ui.gui.modules.IntegralTable.IntegralTableModule(mainWindow=None, name='Integral Table', integralList=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module by wrapping a integralTable instance
- className = 'IntegralTableModule'¶
- includeSettingsWidget = False¶
- maxSettingsState = 2¶
- settingsPosition = 'top'¶
ccpn.ui.gui.modules.MacroEditor module¶
- class ccpn.ui.gui.modules.MacroEditor.MacroEditor(mainWindow=None, name='MacroEditor', filePath=None)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
Macro editor will run Python Files only.
- className = 'MacroEditor'¶
- includeSettingsWidget = True¶
- maxSettingsState = 2¶
- restoreWidgetsState(**widgetsState)[source]¶
Restore the gui params. To Call it: _setParams(**{“variableName”:”value”}) :param widgetsState:
- saveMacro()[source]¶
Saves the text inside the textbox to a file, if a file path is not specified, a save file dialog appears for specification of the file path.
- saveMacroAs()[source]¶
Opens a save file dialog and saves the text inside the textbox to a file specified in the dialog.
- settingsPosition = 'left'¶
- ccpn.ui.gui.modules.MacroEditor.ShowMaxLines = {'All': 1.0, 'Half': 0.5, 'Minimal': 10, 'Top': 0.2}¶
Ideas for future development:
add local history of files.
E.g.: dumping to json every xMinutes This is not “simply” and undo. But will allow to add a GUI with a preview to older states and recover it. (bit like Pycharm)
- macros_dir
myMacro.py myMacro_history.json
{ timeStamp1:”the text at timeStamp1”; timeStamp2:”the text at timeStamp2” }
add pre-defined code blocks. E.g.: ccpn common commands or common imports
ccpn.ui.gui.modules.MultipletListTable module¶
Module Documentation here
- class ccpn.ui.gui.modules.MultipletListTable.MultipletListTableWidget(parent=None, mainWindow=None, moduleParent=None, multipletList=None, multiSelect=True, actionCallback=None, selectionCallback=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.GuiTable.GuiTable
Class to present a multipletList Table
- attributeName = 'multipletLists'¶
- className = 'MultipletListTable'¶
- positionsUnit = 'ppm'¶
- class ccpn.ui.gui.modules.MultipletListTable.MultipletTableModule(mainWindow=None, name='Multiplet Table', multipletList=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module by wrapping a MultipletListTable instance
- className = 'MultipletTableModule'¶
- includeSettingsWidget = False¶
- maxSettingsState = 2¶
- settingsPosition = 'top'¶
ccpn.ui.gui.modules.MultipletPeakTable module¶
Module Documentation here
- class ccpn.ui.gui.modules.MultipletPeakTable.MultipletPeakListTableWidget(parent=None, mainWindow=None, moduleParent=None, peakList=None, multiSelect=False, actionCallback=None, selectionCallback=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.modules.PeakTable.PeakListTableWidget
Class to present a peakList Table linked to a multipletTable
- attributeName = 'peakLists'¶
- className = 'MultipletPeakListTable'¶
ccpn.ui.gui.modules.NmrResidueTable module¶
This file contains NmrResidueTableModule and NmrResidueTable classes
The NmrResidueModule allows for selection of displays, after which double-clicking a row navigates the displays to the relevant positions and marks the NmrAtoms of the selected NmrResidue.
Geerten 1-7/12/2016; 11/04/2017
- class ccpn.ui.gui.modules.NmrResidueTable.NmrResidueTable(parent=None, mainWindow=None, moduleParent=None, actionCallback=None, selectionCallback=None, checkBoxCallback=None, _pulldownKwds=None, nmrChain=None, multiSelect=False, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.GuiTable.GuiTable
Class to present a NmrResidue Table and a NmrChain pulldown list, wrapped in a Widget
- OBJECT = 'object'¶
- TABLE = 'table'¶
- addWidgetToPos(widget, row=0, col=2, rowSpan=1, colSpan=1, overrideMinimum=False, alignment=None)[source]¶
Convenience to add a widget to the top of the table; col >= 2
- addWidgetToTop(widget, col=2, colSpan=1)[source]¶
Convenience to add a widget to the top of the table; col >= 2
- attributeName = 'nmrChains'¶
- className = 'NmrResidueTable'¶
- class ccpn.ui.gui.modules.NmrResidueTable.NmrResidueTableModule(mainWindow=None, name='NmrResidue Table', nmrChain=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module by wrapping a NmrResidueTable instance
- activePulldownClass¶
alias of
ccpn.core.NmrChain.NmrChain
- className = 'NmrResidueTableModule'¶
- includeDisplaySettings = False¶
- includeNmrChains = False¶
- includePeakLists = False¶
- includeSettingsWidget = True¶
- includeSpectrumTable = False¶
- maxSettingsState = 2¶
Navigate in selected displays to nmrResidue; skip if none defined
- settingsPosition = 'left'¶
ccpn.ui.gui.modules.NotesEditor module¶
- class ccpn.ui.gui.modules.NotesEditor.NotesEditorModule(mainWindow=None, name='Notes Editor', note=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module for editing the NotesList.
- attributeName = 'notes'¶
- className = 'NotesEditorModule'¶
- includeSettingsWidget = False¶
- maxSettingsState = 2¶
- settingsPosition = 'top'¶
ccpn.ui.gui.modules.ObjectAssigner module¶
- class ccpn.ui.gui.modules.ObjectAssigner.New[source]¶
Bases:
object
Small ‘fake’ object to get a non-nmrAtom in the objectTable. Maybe this should be solved differently. It works well though.
- class ccpn.ui.gui.modules.ObjectAssigner.NotOnLine[source]¶
Bases:
object
Small ‘fake’ object to get a message the user in the assignment Table that a specific dimension can not be assigned in one go since the frequencies of the peaks in this dimension are not on one line (i.e. the C frequencies of the CA and CB in a strip for instance). Maybe this should be solved differently. It works well though.
- class ccpn.ui.gui.modules.ObjectAssigner.ObjectAssigner(parent, mainWindow, dim, objects, opts, **kwds)[source]¶
ccpn.ui.gui.modules.PeakTable module¶
Module Documentation here
- class ccpn.ui.gui.modules.PeakTable.PeakListTableWidget(parent=None, mainWindow=None, moduleParent=None, peakList=None, multiSelect=True, actionCallback=None, selectionCallback=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.GuiTable.GuiTable
Class to present a peakList Table
- attributeName = 'peakLists'¶
- className = 'PeakListTable'¶
- positionsUnit = 'ppm'¶
- class ccpn.ui.gui.modules.PeakTable.PeakTableModule(mainWindow=None, name='Peak Table', peakList=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module by wrapping a PeakListTable instance
- className = 'PeakTableModule'¶
- includeSettingsWidget = False¶
- maxSettingsState = 2¶
- settingsPosition = 'top'¶
ccpn.ui.gui.modules.PipelineModule module¶
Module Documentation here
- class ccpn.ui.gui.modules.PipelineModule.GuiPipeline(mainWindow, name='Pipeline', pipes=None, templates=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
,ccpn.framework.lib.pipeline.PipelineBase.Pipeline
- className = 'GuiPipeline'¶
- property guiPipes¶
- None, mutable -
- includeSettingsWidget = True¶
- maxSettingsState = 2¶
- moduleName = 'Pipeline'¶
- pipeline2Json(path)[source]¶
save the pipeline state to json file. path: absolute path for a json file
- property pipelineTemplates¶
- None, mutable -
- restoreWidgetsState(**widgetsState)[source]¶
- Overriden method from ccpnModule
Special case of restoring widgets for this module.
the only thing to be saved is the filePath of the pipeline. The guiPipeline has its own mechanism for restoring
- settingsPosition = 'top'¶
- property widgetsState¶
- None, immutable - Special case of saving widgets for this module. the only thing to be saved is the filePath of the pipeline. The guiPipeline has its own mechanism for restoring
ccpn.ui.gui.modules.PluginModule module¶
- class ccpn.ui.gui.modules.PluginModule.AutoGeneratedPluginModule(plugin=None, mainWindow=None, application=None)[source]¶
Bases:
ccpn.ui.gui.modules.PluginModule.PluginModule
- aborted = False¶
- className = 'AutoGenerated PluginModule '¶
- maxSettingsState = 2¶
- params = [{}]¶
- settings = [{}]¶
- settingsPosition = 'top'¶
- class ccpn.ui.gui.modules.PluginModule.PluginModule(plugin=None, mainWindow=None, application=None)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
- className = 'PluginModule'¶
- includeSettingsWidget = True¶
- maxSettingsState = 2¶
- restoreWidgetsState(**widgetsState)[source]¶
Restore the gui params. To Call it: _setParams(**{“variableName”:”value”})
- settingsPosition = 'top'¶
- property widgetsState¶
- None, immutable - return {“variableName”:”value”} of all gui Variables
ccpn.ui.gui.modules.PyMolUtil module¶
Module Documentation here
- class ccpn.ui.gui.modules.PyMolUtil.CodeBlock[source]¶
Bases:
object
A class to concatenate multiple code lines for an easy export to file. Used for creating dynamically scripting files to be handled by external programs. Usage:
CB = CodeBlock() CB.addImport(‘from x import y’) CB.addCmd(‘myFunc’,’astring’, myStr=’BB’, myBool=True, myInt=22, myFloat=1.3) CB.toFile(‘~/testScript.py’) print(str(CB)) out:
from x import y myFunc(“astring”, myStr=”BB”, myBool=True, myInt=22, myFloat=1.3)
- addCmd(funcName: str, *args, **kwargs)[source]¶
add a function call to the block. :param funcName: the function name to be called in the script :param args: any arg that the func needs, in the same original signature order and format. :param kwargs: any kwargs that the func needs, in any order but with the correct formatting.
- E.g.:
addCmd(‘cmd.pseudoatom’,’theName’, resn=’PSD’, pos=None, q=0.0, mode=’rms’, quiet=1)
- property fileHeader¶
- None, mutable - The message that will appear on top of the file, before any code.
ccpn.ui.gui.modules.PythonConsoleModule module¶
Module Documentation here
- class ccpn.ui.gui.modules.PythonConsoleModule.PythonConsoleModule(mainWindow, name='Python Console', closeFunc=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
Gui module to display the Ipyhton console within the program
- className = 'PythonConsoleModule'¶
- includeSettingsWidget = True¶
- maxSettingsState = 2¶
- settingsPosition = 'top'¶
ccpn.ui.gui.modules.ReferenceChemicalShifts module¶
Module documentation here
ccpn.ui.gui.modules.ResidueInformation module¶
- class ccpn.ui.gui.modules.ResidueInformation.ResidueInformation(mainWindow, name='Residue Information', chain=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module for a residue table and sequence module
- activePulldownClass¶
alias of
ccpn.core.Chain.Chain
- className = 'ResidueInformation'¶
- includeDisplaySettings = False¶
- includeNmrChains = False¶
- includePeakLists = False¶
- includeSequentialStrips = False¶
- includeSettingsWidget = True¶
- includeSpectrumTable = False¶
- maxSettingsState = 2¶
- settingsPosition = 'left'¶
- textColumns = {'1': ([1], [0, 2]), '3': ([0, 2, 4], (1, 3)), '5': ([0, 1, 3, 5, 6], (2, 4)), '7': ([0, 1, 2, 4, 6, 7, 8], (3, 5))}¶
- textOptions = ['1', '3', '5', '7']¶
ccpn.ui.gui.modules.ResidueTable module¶
This file contains ResidueTableModule and ResidueTable classes
- class ccpn.ui.gui.modules.ResidueTable.ResidueTable(parent=None, mainWindow=None, moduleParent=None, actionCallback=None, selectionCallback=None, checkBoxCallback=None, chain=None, multiSelect=False, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.GuiTable.GuiTable
Class to present a residue Table and a Chain pulldown list, wrapped in a Widget
- OBJECT = 'object'¶
- TABLE = 'table'¶
- addWidgetToPos(widget, row=0, col=2, rowSpan=1, colSpan=1, overrideMinimum=False)[source]¶
Convenience to add a widget to the top of the table; col >= 2
- addWidgetToTop(widget, col=2, colSpan=1)[source]¶
Convenience to add a widget to the top of the table; col >= 2
- attributeName = 'chains'¶
- className = 'ResidueTable'¶
- class ccpn.ui.gui.modules.ResidueTable.ResidueTableModule(mainWindow=None, name='Residue Table', chain=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module by wrapping a ResidueTable instance
- className = 'ResidueTableModule'¶
- includeSettingsWidget = False¶
- maxSettingsState = 2¶
- settingsPosition = 'left'¶
ccpn.ui.gui.modules.RestraintAnalysisTable module¶
Module Documentation here
- class ccpn.ui.gui.modules.RestraintAnalysisTable.RestraintAnalysisTableModule(mainWindow=None, name='Restraint Analysis Table', peakList=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module by wrapping a RestraintAnalysisTable instance
- activePulldownClass = None¶
- className = 'RestraintAnalysisTableModule'¶
- property dataFrame¶
- None, mutable -
- includeDisplaySettings = True¶
- includeNmrChains = False¶
- includePeakLists = False¶
- includeSettingsWidget = True¶
- includeSpectrumTable = False¶
- maxSettingsState = 2¶
- restoreWidgetsState(**widgetsState)[source]¶
Restore the gui params. To Call it: _setParams(**{“variableName”:”value”})
This is automatically called after every restoration and after the module has been initialised. Subclass this for a custom behaviour. for example custom callback after the widgets have been restored. Subclass like this:
- Parameters
widgetsState –
- settingsMinimumSizes = (500, 200)¶
- settingsPosition = 'left'¶
- class ccpn.ui.gui.modules.RestraintAnalysisTable.RestraintAnalysisTableWidget(parent=None, mainWindow=None, moduleParent=None, peakList=None, multiSelect=True, actionCallback=None, selectionCallback=None, hiddenColumns=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.GuiTable.GuiTable
Class to present a Restraint Analysis Table
- EXPANDERCOLUMN = 3¶
- ITEMKLASS¶
alias of
ccpn.ui.gui.widgets.TableSorting.MultiColumnTableWidgetItem
- MERGECOLUMN = 1¶
- MINSORTCOLUMN = 3¶
- PIDCOLUMN = 1¶
- PRIMARYCOLUMN = '_object'¶
- SPANCOLUMNS = (0, 1, 2, 3)¶
- applySortToGroups = False¶
- attributeName = 'peakLists'¶
- className = 'RestraintAnalysisTable'¶
- defaultHidden = ['Min_1', 'Min_2', 'Min_3', 'Min_4', 'Min_5', 'Min_6', 'Min_7', 'Min_8', 'Min_9', 'Max_1', 'Max_2', 'Max_3', 'Max_4', 'Max_5', 'Max_6', 'Max_7', 'Max_8', 'Max_9', 'Mean_1', 'Mean_2', 'Mean_3', 'Mean_4', 'Mean_5', 'Mean_6', 'Mean_7', 'Mean_8', 'Mean_9', 'STD_1', 'STD_2', 'STD_3', 'STD_4', 'STD_5', 'STD_6', 'STD_7', 'STD_8', 'STD_9']¶
- enableMultiColumnSort = True¶
- getDataFrameFromExpandedList(table=None, buildList=None, colDefs=None, expandColumn=None)[source]¶
Return a Pandas dataFrame from an internal list of objects The columns are based on the ‘func’ functions in the columnDefinitions
- Parameters
buildList –
colDefs –
- Return pandas dataFrameObject
- populateTable(rowObjects=None, columnDefs=None, selectedObjects=None)[source]¶
Populate the table with a set of objects to highlight, or keep current selection highlighted with the first item visible.
Use selectedObjects = [] to clear the selected items
- Parameters
rowObjects – list of objects to set each row
- positionsUnit = 'ppm'¶
- setTableFromDataFrameObject(dataFrameObject, columnDefs=None)[source]¶
Populate the table from a Pandas dataFrame
- updateAutoExpand(expand)[source]¶
Set the auto-expand/collapsed state for adding new restraintTables, or sorting table
ccpn.ui.gui.modules.RestraintTableModule module¶
Module Documentation here
- class ccpn.ui.gui.modules.RestraintTableModule.GuiRestraintTable(parent=None, mainWindow=None, moduleParent=None, restraintTable=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.GuiTable.GuiTable
Class to present a RestraintTable pulldown list, wrapped in a Widget
- OBJECT = 'object'¶
- TABLE = 'table'¶
- addWidgetToTop(widget, col=2, colSpan=1)[source]¶
Convenience to add a widget to the top of the table; col >= 2
- attributeName = 'restraintTables'¶
- className = 'RestraintTable'¶
- static getFirstRestraintAtomsPair(restraint)[source]¶
Get the first pair of atoms from the first restraintContribution of a restraint.
Notifier Callback for selecting Object from item in the table
- class ccpn.ui.gui.modules.RestraintTableModule.RestraintTableModule(mainWindow=None, name='Restraint Table', restraintTable=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module by wrapping a restaintsTable instance
- className = 'RestraintTableModule'¶
- includeNmrChains = False¶
- includePeakLists = False¶
- includeSettingsWidget = True¶
- includeSpectrumTable = False¶
- maxSettingsState = 2¶
- selectRestraintTable(restraintTable=None)[source]¶
Manually select a restraintTable from the pullDown
- settingsPosition = 'left'¶
ccpn.ui.gui.modules.SpectrumDisplay1d module¶
Module Documentation here
- class ccpn.ui.gui.modules.SpectrumDisplay1d.SpectrumDisplay1d(mainWindow)[source]¶
Bases:
ccpn.ui.gui.lib.GuiSpectrumDisplay.GuiSpectrumDisplay
- MAXPEAKLABELTYPES = 7¶
- MAXPEAKSYMBOLTYPES = 4¶
ccpn.ui.gui.modules.SpectrumDisplayNd module¶
Module Documentation here
- class ccpn.ui.gui.modules.SpectrumDisplayNd.SpectrumDisplayNd(mainWindow)[source]¶
Bases:
ccpn.ui.gui.lib.GuiSpectrumDisplay.GuiSpectrumDisplay
- MAXPEAKLABELTYPES = 7¶
- MAXPEAKSYMBOLTYPES = 4¶
- addContourLevel()[source]¶
Increases number of contours by 1 for all spectra visible in the display.
ccpn.ui.gui.modules.StructureTable module¶
This file contains StructureTableModule and StructureTable classes
- class ccpn.ui.gui.modules.StructureTable.GuiTableStructure(*args, **kwargs)[source]¶
Bases:
ccpn.ui.gui.widgets.GuiTable.GuiTable
GuiTable specific to tables that only contain a single pid for the pandas dataframe
- class ccpn.ui.gui.modules.StructureTable.StructureTable(parent=None, mainWindow=None, moduleParent=None, structureEnsemble=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.modules.StructureTable.GuiTableStructure
Class to present a StructureTable and a StructureData pulldown list, wrapped in a Widget
- OBJECT = 'object'¶
- TABLE = 'table'¶
- addWidgetToTop(widget, col=2, colSpan=1)[source]¶
Convenience to add a widget to the top of the table; col >= 2
- attributeName = 'structureEnsembles'¶
- className = 'StructureTable'¶
- displayTableForDataSetStructure(structureEnsemble)[source]¶
Display the table for all StructureDataSet
Notifier Callback for selecting Object from item in the table
- objectClass = 'StructureEnsemble'¶
- class ccpn.ui.gui.modules.StructureTable.StructureTableModule(mainWindow=None, name='Structure Table', structureEnsemble=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module by wrapping a StructureTable instance
- className = 'StructureTableModule'¶
- includeNmrChains = False¶
- includePeakLists = False¶
- includeSettingsWidget = True¶
- includeSpectrumTable = False¶
- maxSettingsState = 2¶
- selectStructureEnsemble(structureEnsemble=None)[source]¶
Manually select a StructureEnsemble from the pullDown
- settingsPosition = 'left'¶
ccpn.ui.gui.modules.ViolationTableModule module¶
Module Documentation here
- class ccpn.ui.gui.modules.ViolationTableModule.ViolationTableModule(mainWindow=None, name='ViolationTable Module', table=None, selectFirstItem=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This class implements the module by wrapping a ViolationTable instance
- activePulldownClass = None¶
- className = 'ViolationTableModule'¶
- includeNmrChains = False¶
- includePeakLists = False¶
- includeSettingsWidget = False¶
- includeSpectrumTable = False¶
- maxSettingsState = 2¶
- settingsPosition = 'left'¶