Пример #1
0
    def startBasePopup(self, parent, title, modal, True):

        TemporaryBasePopup.__init__(self,
                                    parent=parent,
                                    title=title,
                                    modal=modal,
                                    transient=True)
Пример #2
0
    def __init__(self, parent, ccpChainLabelDict, ccpChainSeqIDCodes,
                 requireChainCode):

        # Constructor doesn't do much except call body
        # The parent is self.parent (parent of the popup)

        self.chain = None

        self.ccpChainLabelDict = ccpChainLabelDict
        self.ccpChainSeqIDCodes = ccpChainSeqIDCodes

        self.requireChainCode = requireChainCode

        self.exportChainCode = {}
        self.exportFirstSeqCode = {}

        project = self.ccpChainLabelDict.values()[0].root

        # modal = true means that it won't continue unless this one returns value
        TemporaryBasePopup.__init__(self,
                                    parent=parent,
                                    title="Project '%s': " % project.name +
                                    'Export chains',
                                    modal=False,
                                    transient=True)
Пример #3
0
    def __init__(self, parent, peakList, format, dataDimRefs=None, order=None):

        self.peakList = peakList
        self.dataSource = self.peakList.dataSource
        self.format = format

        if dataDimRefs:
            self.dataDimRefs = dataDimRefs

        else:
            self.dataDimRefs = []

        numValidDims = 0
        for dataDim in self.peakList.dataSource.dataDims:
            if dataDim.className != 'SampledDataDim':
                numValidDims += 1

        self.numDim = numValidDims
        self.order = order[self.numDim]

        TemporaryBasePopup.__init__(
            self,
            parent=parent,
            title="Project '%s': " % self.peakList.root.name +
            "DataDimRef selection for PeakDims",
            modal=False,
            transient=True)
Пример #4
0
    def __init__(self, parent, ccpChainLabelDict, ccpChainSeqIdCodes,
                 formatChains, formatChainList, formatChainDict,
                 defaultFormatChain):

        # Constructor doesn't do much except call body
        # The parent is self.parent (parent of the popup)

        self.chain = None

        self.formatChains = formatChains
        self.ccpChainLabelDict = ccpChainLabelDict
        self.ccpChainSeqIdCodes = ccpChainSeqIdCodes
        self.formatChainList = formatChainList
        self.formatChainDict = formatChainDict
        self.localFormatChainDict = {}

        self.defaultFormatChain = defaultFormatChain

        self.ccpChainSeqIdDict = {}
        self.ccpChainSeqCodeDict = {}

        project = self.ccpChainLabelDict.values()[0].root

        # modal = true means that it won't continue unless this one returns value
        TemporaryBasePopup.__init__(self,
                                    parent=parent,
                                    title="Project '%s': " % project.name +
                                    'Link chains',
                                    modal=False,
                                    transient=True)
Пример #5
0
  def __init__(self, parent, matchName, chemAtomList, chemAtomDict, propagateList, ccpCode, shifts, matchType = 'Resonance', matchInfoPopup = None, selectedIndex = 4, title = 'Select resonance atom match', helpUrl = 'AtomSelect.html', headerLines = None, modal = False):

    self.help_url = joinPath(getHelpUrlDir(),helpUrl)

    # Constructor doesn't do much except call body
    # The parent is self.parent (parent of the popup)
   
    self.chemAtomOrSets = None
    self.propagate = None
    
    self.matchName = matchName
    self.matchType = matchType
    self.matchInfoPopup = matchInfoPopup
    self.chemAtomList = chemAtomList
    self.chemAtomDict = chemAtomDict
    self.propagateList = propagateList
    self.ccpCode = ccpCode
    self.shifts = shifts
    self.guiParent = parent
    self.headerLines = headerLines
    
    self.selectedIndex = selectedIndex

    # modal = true means that it won't continue unless this one returns value
    TemporaryBasePopup.__init__(self, parent=parent, title=title, modal=modal, transient=True)
Пример #6
0
  def __init__(self, parent, selectionList, title = 'Select', text = 'Select', topText = None, dismissText = None, selected = None, selectionDict = None, urlFile = None, dismissButton = True, modal = False):
  
    self.selectionList = selectionList
    self.selectionDict = selectionDict
    
    self.text = text
    
    self.dismissButton = dismissButton
    
    if dismissButton:
      if dismissText:
        self.dismissText = dismissText
      else:
        self.dismissText = 'dismiss'
      
    self.topText = topText
    self.isSelected = None

    if not selected:
      self.selectedIndex = 0
    else:
      self.selectedIndex = self.selectionList.index(selected)
      
    if urlFile:
      self.help_url = joinPath(getHelpUrlDir(),urlFile + '.html')
    else:
      self.help_url = None
          
    TemporaryBasePopup.__init__(self,parent = parent, title = title, modal = modal, transient=True)
Пример #7
0
 def __init__(self, parent, dataSource, peaks, order = None):
 
   self.dataSource = dataSource
   self.numDim = len(self.dataSource.dataDims)
   self.peaks = peaks
   self.dataDimRefs = []
   self.order = order[self.numDim]
   
   TemporaryBasePopup.__init__(self,parent = parent, title = "Project '%s': " % dataSource.root.name + "DataDimRef selection for PeakDims", modal = False, transient=True)
Пример #8
0
 def __init__(self, parent, project, createMoleculeDict):
  
   self.project = project
   self.localCreateMoleculeDict = createMoleculeDict
   self.createMoleculeDict = createMoleculeDict
   
   self.resetInfo()
   
   TemporaryBasePopup.__init__(self, parent=parent, title="Project '%s': " % project.name + 'Import original sequence', modal=False, transient=True)
Пример #9
0
    def __init__(self, parent, experiment, fPars, linkDict=None):

        self.experiment = experiment
        self.fPars = fPars
        self.linkDict = linkDict

        TemporaryBasePopup.__init__(
            self,
            parent=parent,
            title="Project '%s': " % experiment.root.name +
            "Experiment dim selection for procPar reading",
            modal=False,
            transient=True)
Пример #10
0
    def __init__(self, parent, chainList, chainAtomSetsDict):

        self.chainList = chainList
        self.chainAtomSetsDict = chainAtomSetsDict

        self.resParentDict = {}
        self.resParentList = []

        self.resParentChainLabelDict = {}
        self.resParentChainLabelList = {}

        self.chainResonancesDict = {}

        for resParent in self.chainAtomSetsDict.keys():
            if isinstance(resParent, NmrConstraint.NmrConstraintStore):
                strucGens = resParent.structureGenerations
                strucGenSerials = [str(sg.serial) for sg in strucGens]
                strucGenLabel = string.join(strucGenSerials, ',')
                resParentLabel = "Constraint set %d (strucGens %s)" % (
                    resParent.serial, strucGenSerials)
            else:
                resParentLabel = "Nmr project %s" % resParent.name

            self.resParentDict[resParentLabel] = resParent
            self.resParentList.append(resParentLabel)

            self.chainResonancesDict[resParent] = {}

            self.resParentChainLabelDict[resParent] = {}
            self.resParentChainLabelList[resParent] = []

            for chain in self.chainList:
                self.project = chain.root
                if self.chainAtomSetsDict[resParent].has_key(
                        chain) and self.chainAtomSetsDict[resParent][chain]:
                    chainLabel = "Molecular system '%s':Chain '%s' (molecule '%s')" % (
                        chain.molSystem.code, chain.code, chain.molecule.name)
                    self.resParentChainLabelList[resParent].append(chainLabel)
                    self.resParentChainLabelDict[resParent][chainLabel] = chain

                    self.chainResonancesDict[resParent][chain] = []

        # modal = true means that it won't continue unless this one returns value
        TemporaryBasePopup.__init__(
            self,
            parent=parent,
            title="Project '%s': " % self.project.name +
            'Set status prochiral atoms/resonances',
            modal=False,
            transient=True)
Пример #11
0
    def __init__(self,
                 parent,
                 formatNamesList,
                 formatNamesDict,
                 title='Link resonances setup'):

        self.guiParent = parent
        self.formatNamesList = formatNamesList
        self.formatNamesDict = formatNamesDict
        self.status = False

        TemporaryBasePopup.__init__(self,
                                    parent=parent,
                                    title=title,
                                    modal=False,
                                    transient=False)
Пример #12
0
  def __init__(self, parent, formula, bondNumber, chemCompInfo):
   
    self.formula = formula
    self.bondNumber = bondNumber
    self.chemCompInfo = chemCompInfo

    self.updated = 0
    
    self.nonEntryAttributes = {
    
      'molType': (PulldownMenu,['protein','DNA','RNA','carbohydrate','other']),
      'hasStdChirality': (CheckButton,None)
    
    }
        
    TemporaryBasePopup.__init__(self, parent=parent, title='ChemComp creation', modal=False, transient=True)
Пример #13
0
    def __init__(self,
                 parent,
                 infoTitle,
                 infoText,
                 infoList=None,
                 infoDict=None):

        self.infoText = infoText
        self.infoList = infoList
        self.infoDict = infoDict

        TemporaryBasePopup.__init__(self,
                                    parent=parent,
                                    title=infoTitle,
                                    modal=False,
                                    transient=True)
Пример #14
0
    def __init__(self, parent, project, **keywds):

        self.project = project
        self.keywds = keywds

        origCode = self.keywds['origCode']
        del self.keywds['origCode']

        TemporaryBasePopup.__init__(
            self,
            parent=parent,
            title="Project '%s': " % project.name +
            "ChemComp selection for code '%s'" % origCode,
            modal=False,
            transient=False,
            width=200)
Пример #15
0
    def __init__(self, parent, columnData, columnContents, title=None):

        self.columnData = columnData
        self.columnContents = columnContents

        self.columnLen = len(self.columnData)

        if not title:
            title = "Column information selection"
        print title

        TemporaryBasePopup.__init__(self,
                                    parent=parent,
                                    title=title,
                                    modal=False,
                                    transient=True)
Пример #16
0
    def __init__(self, parent, namingSysList=None, namingSysDict=None):

        # Constructor doesn't do much except call body
        # The parent is self.parent (parent of the popup)

        self.namingSys = None

        self.namingSysList = namingSysList
        self.namingSysDict = namingSysDict

        # modal = true means that it won't continue unless this one returns value
        TemporaryBasePopup.__init__(self,
                                    parent=parent,
                                    title='Choose namingSys',
                                    modal=False,
                                    transient=True)
Пример #17
0
    def __init__(self, parent, project, numDim=None, topText=None, expName=''):

        self.parent = parent
        self.project = project
        self.numDim = numDim
        self.topText = topText
        self.skip = 1
        self.expName = expName

        setCurrentStore(project, 'ChemElementStore')

        TemporaryBasePopup.__init__(self,
                                    parent=parent,
                                    title="Project '%s': " % project.name +
                                    'Create Experiment',
                                    modal=False,
                                    transient=True)
Пример #18
0
    def __init__(self, parent, peakList, format, dataDimRefs=None, order=None):

        self.peakList = peakList
        self.dataSource = self.peakList.dataSource
        self.format = format

        if dataDimRefs:
            self.dataDimRefs = dataDimRefs

        else:
            self.dataDimRefs = []

        self.numDim = len(self.dataSource.dataDims)
        self.order = order[self.numDim]

        TemporaryBasePopup.__init__(
            self,
            parent=parent,
            title="Project '%s': " % self.peakList.root.name +
            "DataDimRef selection for PeakDims",
            modal=False,
            transient=True)
Пример #19
0
 def __init__(self, parent, chemCompInfo, chemCompAtoms, chemCompBonds):
  
   self.chemCompInfo = chemCompInfo
   self.chemCompAtoms = chemCompAtoms
   self.chemCompBonds = chemCompBonds
   
   self.obligatoryAtoms = []
   
   for molTypeTuple in standardBackboneAtoms.keys():
     if self.chemCompInfo[0][1] in molTypeTuple:
       for atomName in standardBackboneAtoms[molTypeTuple]:
         if atomName not in self.obligatoryAtoms:
           self.obligatoryAtoms.append(atomName)
     
   
   self.nonEntryAttributes = {
   
     'chirality':   (PulldownMenu,['R','S','unknown']),
     'waterExchangeable': (CheckButton,False)
   
   }
       
   TemporaryBasePopup.__init__(self, parent=parent, title='ChemComp atom and bond creation', modal=False, transient=True)
Пример #20
0
 def __init__(self, parent, valueList, valueInfo, title = 'Entry list', topText = 'Enter values', dismissText = None, urlFile = None, dismissButton = True, conversionFunc = None, modal = False):
 
   self.valueList = valueList
   self.valueInfo = valueInfo
   self.values = []
   
   self.dismissButton = dismissButton
   self.conversionFunc = conversionFunc
   
   if dismissButton:
     if dismissText:
       self.dismissText = dismissText
     else:
       self.dismissText = 'dismiss'
     
   self.topText = topText
     
   if urlFile:
     self.help_url = joinPath(getHelpUrlDir(),urlFile + '.html')
   else:
     self.help_url = None
         
   TemporaryBasePopup.__init__(self,parent = parent, title = title, modal = modal, transient=True)