def __init__(self, main, viewer, parent=None):
     BaseDockWidget.__init__(self, 
                             main, 
                             "&Interactive Skeletonization", 
                             "Perform interactive skeletonization", 
                             "perform_VolumeManualSkeletonization", 
                             "actions-volume-skeletonization-manual",
                             "actions-volume-skeletonization", 
                             QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea | QtCore.Qt.BottomDockWidgetArea,
                             QtCore.Qt.BottomDockWidgetArea,
                             parent)
     self.app = main
     self.app.themes.addDefaultRGB("InteractiveSkeletonizer:StartingPoint", 0, 0, 255, 255)
     self.app.themes.addDefaultRGB("InteractiveSkeletonizer:EndingPoint", 0, 255, 0, 255)         
     self.app.themes.addDefaultRGB("InteractiveSkeletonizer:Sketch", 0, 128, 0, 255)
     self.app.themes.addDefaultRGB("InteractiveSkeletonizer:UnconfirmedCurve", 255, 255, 0, 255)
     self.app.themes.addDefaultRGB("InteractiveSkeletonizer:RemovableCurve", 100, 255, 100, 255)         
     self.started = False
     self.sketchStarted = False
     self.viewer = viewer
     self.connect(self.viewer, QtCore.SIGNAL("modelLoaded()"), self.modelLoaded)
     self.connect(self.viewer, QtCore.SIGNAL("modelChanged()"), self.modelChanged)
     self.connect(self.viewer, QtCore.SIGNAL("modelUnloaded()"), self.modelUnloaded)        
     
     self.isSkeletonClicked = False;
     self.createUI()
     self.createActions()
    def __init__(self, main, viewer, parent=None):
        self.app = main
        self.viewer = viewer
        self.title = viewer.title + " Visualization Options"

        BaseDockWidget.__init__(
            self, main, self.title,
            "Load the " + self.viewer.title + " visualization options",
            "show_" + self.viewer.title + "Visualization",
            "window-" + self.viewer.title + "VisualizationOptions", "window",
            QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea
            | QtCore.Qt.BottomDockWidgetArea, QtCore.Qt.RightDockWidgetArea,
            parent)

        self.connect(self.viewer, QtCore.SIGNAL("modelLoaded()"),
                     self.modelLoaded)
        self.connect(self.viewer, QtCore.SIGNAL("modelChanged()"),
                     self.modelChanged)
        self.connect(self.viewer, QtCore.SIGNAL("modelUnloaded()"),
                     self.modelUnloaded)
        self.setWindowTitle(self.title)

        self.createUI()
        self.createActions()
        self.createMenus()
        self.updateFromViewer()
 def dockVisibilityChanged(self, visible):
     BaseDockWidget.dockVisibilityChanged(self, visible)
     self.app.viewers["calpha"].centerOnRMB = not visible
     if(visible):
         self.connect(self.app.viewers["calpha"], QtCore.SIGNAL("atomSelectionUpdated(PyQt_PyObject)"), self.atomSelectionChanged)
     else:
         self.disconnect(self.app.viewers["calpha"], QtCore.SIGNAL("atomSelectionUpdated(PyQt_PyObject)"), self.atomSelectionChanged)
 def __init__(self, main, parent=None):
     BaseDockWidget.__init__(
         self, main, "&Choose Chain Model", "Choose a chain model",
         "perform_chooseModel", "actions-calpha-chooseModel",
         "actions-calpha", QtCore.Qt.LeftDockWidgetArea
         | QtCore.Qt.RightDockWidgetArea | QtCore.Qt.BottomDockWidgetArea,
         QtCore.Qt.RightDockWidgetArea, parent)
     self.app = main
     self.createUi()
     self.connect(self.ui.refreshPushButton, QtCore.SIGNAL("clicked()"),
                  self.refresh)
     self.connect(self.ui.chainModelsListWidget,
                  QtCore.SIGNAL("currentTextChanged (const QString&)"),
                  self.modelHighlighted)
 def __init__(self, main, sseViewer, parent=None):    
     BaseDockWidget.__init__(self, 
                             main,
                             "&Predict SSE from Sequence", 
                             "Prediction of secondary structure elements from the sequence", 
                             "perform_SSESequencePrediction", 
                             "actions-sse-sequenceprediction", 
                             "actions-sse", 
                             QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea | QtCore.Qt.BottomDockWidgetArea, 
                             QtCore.Qt.RightDockWidgetArea, 
                             parent)
     self.setupUi(self)
     self.app = main
     self.viewer = sseViewer
     self.createUI()
 def __init__(self, main, camera, parent=None):
     BaseDockWidget.__init__(self, 
                             main, 
                             "Scene Options", 
                             "Load the scene settings", 
                             "show_SceneEditor", 
                             "window-sceneeditor", 
                             "window", 
                             QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea | QtCore.Qt.BottomDockWidgetArea, 
                             QtCore.Qt.RightDockWidgetArea, 
                             parent)
     self.app = main
     self.camera = camera             
     self.createUI()
     self.updateFromCamera()
    def __init__(self, main, viewer, parent=None):
        BaseDockWidget.__init__(
            self, main, "Identify &SSEs",
            "Identify secondary structure elements", "detectSSE_Volume",
            "actions-sse-detectSSE", "actions-sse",
            QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea
            | QtCore.Qt.BottomDockWidgetArea, QtCore.Qt.RightDockWidgetArea,
            parent)
        self.app = main
        self.viewer = viewer
        self.connect(self.viewer, QtCore.SIGNAL("modelLoaded()"),
                     self.modelLoaded)
        self.connect(self.viewer, QtCore.SIGNAL("modelUnloaded()"),
                     self.modelUnloaded)

        self.createUI()
        self.createActions()
Exemple #8
0
 def loadWidget(self):
     self.structPred = self.viewer.structPred
     if(self.app.actions.getAction("perform_CAlphaManualAtomPlacement").isChecked()) :
         if self.structPred and self.structPred.chain:
             self.resSeqNumSpinBox.setRange( min(self.structPred.chain.residueRange()), max(self.structPred.chain.residueRange()) )
         else:
             return            
         self.skeletonViewer.setSelectEnabled(True)
         if not self.viewer.main_chain:
             self.viewer.main_chain = self.viewer.structPred.chain
         self.main_chain = self.viewer.main_chain
         residue = self.structPred.chain[self.resSeqNumSpinBox.value()]
         self.resNameLabel.setText(residue.symbol3)
         self.identifierLabel.setText( self.main_chain.getPdbID() + ' chain ' + self.main_chain.getChainID() )
     else:
         self.skeletonViewer.setSelectEnabled(False)
     BaseDockWidget.loadWidget(self)
 def __init__(self, main, volumeViewer, parent=None):
     BaseDockWidget.__init__(self, 
                             main, 
                             "&Volume - Surface Editor", 
                             "Modify the volume surface", 
                             "show_VolumeSurfaceEditor", 
                             "window-VolumeSurfaceEditor", 
                             "window", 
                             QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea | QtCore.Qt.BottomDockWidgetArea, 
                             QtCore.Qt.BottomDockWidgetArea,
                             parent)
     self.app = main
     self.viewer = volumeViewer
     self.connect(self.viewer, QtCore.SIGNAL("modelLoadedPreDraw()"), self.modelLoadedPreDraw)
     self.connect(self.viewer, QtCore.SIGNAL("modelUnloaded()"), self.modelUnloaded)
     self.createUI()
     self.createActions()
     self.createMenus()
Exemple #10
0
 def __init__(self, main, volumeViewer, parent=None):
     BaseDockWidget.__init__(
         self, main, "&Laplacian Smoothing", "Perform laplacian smoothing",
         "perform_VolumeLaplacianSmoothing",
         "actions-volume-laplacianSmoothing", "actions-volume",
         QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea
         | QtCore.Qt.BottomDockWidgetArea, QtCore.Qt.RightDockWidgetArea,
         parent)
     self.app = main
     self.viewer = volumeViewer
     self.connect(self.viewer, QtCore.SIGNAL("modelLoaded()"),
                  self.modelLoaded)
     self.connect(self.viewer, QtCore.SIGNAL("modelUnloaded()"),
                  self.modelUnloaded)
     self.connect(self.viewer, QtCore.SIGNAL("modelChanged()"),
                  self.modelChanged)
     self.createUI()
     self.createActions()
 def __init__(self, main, viewer, parent=None):
     BaseDockWidget.__init__(
         self, main, "Fit to density", "Fit CAlpha atoms to density",
         "perform_CAlphaFlexibleFitting", "actions-calpha-flexiblefitting",
         "actions-calpha", QtCore.Qt.LeftDockWidgetArea
         | QtCore.Qt.RightDockWidgetArea | QtCore.Qt.BottomDockWidgetArea,
         QtCore.Qt.RightDockWidgetArea, parent)
     self.app = main
     self.viewer = viewer
     self.cAlphaViewer = viewer
     self.volumeViewer = self.app.viewers["volume"]
     self.sseViewer = self.app.viewers["sse"]
     self.rigidDone = False
     self.createUI()
     self.enableDisableWindowElements()
     self.engine = FlexibleFittingEngine()
     self.chainHelixMapping = {}
     self.invChainHelixMapping = {}
     self.backupPositions = {}
Exemple #12
0
 def __init__(self, main, viewer, main_chain, structPred, parent=None):
     BaseDockWidget.__init__(self, 
                             main, 
                             "&Manual C-Alpha Atom Placement", 
                             "Perform Manual C-Alpha atom placement", 
                             "perform_CAlphaManualAtomPlacement", 
                             "actions-calpha-manualAtomPlacement", 
                             "actions-calpha", 
                             QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea | QtCore.Qt.BottomDockWidgetArea, 
                             QtCore.Qt.RightDockWidgetArea, 
                             parent)
     self.app = main
     self.viewer = viewer
     self.skeletonViewer = self.app.viewers["skeleton"]
     self.connect(self.skeletonViewer, QtCore.SIGNAL("elementSelected (int, int, int, int, int, int, QMouseEvent)"), self.skeletonSelected)
     self.main_chain=main_chain
     self.structPred = structPred
     self.createUI()
     self.connect(self.addAtomPushButton, QtCore.SIGNAL("pressed()"), self.addAtom)
     self.connect(self.resSeqNumSpinBox,  QtCore.SIGNAL('valueChanged(int)'), self.updateResName)
 def showWidget(self, show):
     BaseDockWidget.showWidget(self, show)
     if(not show):
         self.setSkeletonViewerProperties(False)  
         self.ui.pushButtonStart.setEnabled(True)
         self.ui.pushButtonClose.setEnabled(False)               
 def loadWidget(self):
     BaseDockWidget.loadWidget(self)
     if self.app.actions.getAction("perform_chooseModel").isChecked():
         self.refresh()