Source code for ccpn.AnalysisStructure.AnalysisStructure

"""
AnalysisAssign Program
"""
#=========================================================================================
# Licence, Reference and Credits
#=========================================================================================
__copyright__ = "Copyright (C) CCPN project (https://www.ccpn.ac.uk) 2014 - 2022"
__credits__ = ("Ed Brooksbank, Joanna Fox, Victoria A Higman, Luca Mureddu, Eliza Płoskoń",
               "Timothy J Ragan, Brian O Smith, Gary S Thompson & Geerten W Vuister")
__licence__ = ("CCPN licence. See https://ccpn.ac.uk/software/licensing/")
__reference__ = ("Skinner, S.P., Fogh, R.H., Boucher, W., Ragan, T.J., Mureddu, L.G., & Vuister, G.W.",
                 "CcpNmr AnalysisAssign: a flexible platform for integrated NMR analysis",
                 "J.Biomol.Nmr (2016), 66, 111-124, http://doi.org/10.1007/s10858-016-0060-y")
#=========================================================================================
# Last code modification
#=========================================================================================
__modifiedBy__ = "$modifiedBy: Geerten Vuister $"
__dateModified__ = "$dateModified: 2022-03-09 11:18:02 +0000 (Wed, March 09, 2022) $"
__version__ = "$Revision: 3.1.0 $"
#=========================================================================================
# Created
#=========================================================================================
__author__ = "$Author: CCPN $"
__date__ = "$Date: 2017-04-07 10:28:40 +0000 (Fri, April 07, 2017) $"
#=========================================================================================
# Start of code
#=========================================================================================

from ccpn.framework.Version import applicationVersion
from ccpn.framework.Application import ANALYSIS_STRUCTURE
from ccpn.AnalysisAssign.AnalysisAssign import Assign


[docs]class Structure(Assign): """Root class for the AnalysisStructure application """ applicationName = ANALYSIS_STRUCTURE applicationVersion = applicationVersion # def __init__(self, commandLineArguments): # Assign.__init__(self, commandLineArguments) def _setupMenus(self): super(Structure, self)._setupMenus() menuSpec = ('Structure', [ # ("Load PDB", self.loadPDB, [('shortcut', 'lp')]), # ("Load NEF", self.loadNEF, [('shortcut', 'ln')]), ("Match to Molecule", self.matchToMolecule, [('shortcut', 'mo'), ('enabled', False)]), ("Chain(s) from Structure", self.chainsFromStructure, [('shortcut', 'cs'), ('enabled', False)]), (), ("Find Consensus...", self.findConsensus, [('shortcut', 'fc'), ('enabled', False)]), ("Superpose", self.superpose, [('shortcut', 'su'), ('enabled', False)]), (), ("Validate Restraints", self.validateRestraints, [('shortcut', 'vr'), ('enabled', False)]), (), ("Submit to wwPDB", self.submitToWWPDB, [('shortcut', 'sw'), ('enabled', False)]), (), ("Restricted Peak Pick", self._restrictedPeakPickCallback, [('enabled', True)]), ("Remove Diagonal Peaks", self._removeDiagonalPeaksCallback, [('enabled', True)]), (), ("Set up XPLOR_NIH Structure Calculation", self._setupXPLORCalculationCallback, [('enabled', True)]), ("Process XPLOR_NIH Calculation Results", self._processXPLORCalculationCallback, [('enabled', True)]), ("Split Accepted and Rejected Peaks", self._splitAcceptedRejectedPeaksCallback, [('enabled', True)]), (), ("Create Restraint Analysis Results", self._createRestraintAnalysisResultsCallback, [('enabled', True)]), ("Import wwPDB Validation Report", self._importWWPDBValidationCallback, [('enabled', True)]), ]) self._addApplicationMenuSpec(menuSpec)
[docs] def matchToMolecule(self): pass
[docs] def chainsFromStructure(self): pass
[docs] def findConsensus(self): pass
[docs] def superpose(self): pass
[docs] def validateRestraints(self): pass
[docs] def submitToWWPDB(self): pass
def _restrictedPeakPickCallback(self): from ccpn.ui.gui.widgets.MessageDialog import showWarning from ccpn.AnalysisStructure.gui.popups.RestrictedPeakPickPopup import RestrictedPeakPickPopup if len(self.current.peaks)==0: showWarning('No current peaks', 'Select peak(s) to start Restricted Peak Pick on a target spectrum.') return popup = RestrictedPeakPickPopup(mainWindow=self.ui.mainWindow) popup.show() popup.raise_() def _removeDiagonalPeaksCallback(self): from ccpn.AnalysisStructure.gui.popups.DeleteDiagonalPeaksPopup import DeleteDiagonalPeaksPopup popup = DeleteDiagonalPeaksPopup(mainWindow=self.ui.mainWindow) popup.show() popup.raise_() def _setupXPLORCalculationCallback(self): from ccpn.AnalysisStructure.gui.SetupXplorStructureCalcPopup import SetupXplorStructureCalculationPopup popup = SetupXplorStructureCalculationPopup(parent=self.mainWindow, mainWindow=self.mainWindow) popup.exec() def _processXPLORCalculationCallback(self): from ccpn.AnalysisStructure.gui.ProcessXplorStructureCalculationPopup import ProcessXplorCalculationFolderPopup popup = ProcessXplorCalculationFolderPopup(parent=self.mainWindow, mainWindow=self.mainWindow) popup.exec() def _splitAcceptedRejectedPeaksCallback(self): from ccpn.AnalysisStructure.gui.SplitAcceptedRejectedPeaksPopup import SplitAcceptedRejectedPeaksPopup popup = SplitAcceptedRejectedPeaksPopup(parent=self.mainWindow, mainWindow=self.mainWindow) popup.exec() def _createRestraintAnalysisResultsCallback(self, position='top', relativeTo=None): """Display the Create Restraint Analysis Results Plugin """ from ccpn.plugins.ViolationResults import ViolationResultsPlugin self.ui.mainWindow.startPlugin(ViolationResultsPlugin) def _importWWPDBValidationCallback(self): from ccpn.AnalysisStructure.gui.importWWPDBdataPopup import ImportWWPDBdataPopup popup = ImportWWPDBdataPopup(parent=self.mainWindow, mainWindow=self.mainWindow) popup.exec()