def updateProteinListWidget(self): """ Update the peptide list widget. It shows all peptides in the part. """ proteinChunkList = getAllProteinChunksInPart(self.win.assy) if proteinChunkList: self.proteinListWidget.insertItems(row=0, items=proteinChunkList) else: self.proteinListWidget.clear() return
def updateProteinListWidget(self): """ Update the peptide list widget. It shows all peptides in the part. """ proteinChunkList = getAllProteinChunksInPart(self.win.assy) if proteinChunkList: self.proteinListWidget.insertItems( row = 0, items = proteinChunkList) else: self.proteinListWidget.clear() return
def _resetAminoAcids(self): """ Resets the color and collapse all amino acids of all proteins. """ proteinChunkList = getAllProteinChunksInPart(self.win.assy) for proteinChunk in proteinChunkList: proteinChunk.protein.collapse_all_rotamers() aa_list = proteinChunk.protein.get_amino_acids() for aa in aa_list: aa.color = None aa.collapse() self.win.glpane.gl_update() return
def _resetAminoAcids(self): """ Resets the color and collapse all amino acids of all proteins. """ proteinChunkList = getAllProteinChunksInPart(self.win.assy) for proteinChunk in proteinChunkList: proteinChunk.protein.collapse_all_rotamers() aa_list = proteinChunk.protein.get_amino_acids() for aa in aa_list: aa.color = None aa.collapse() self.win.glpane.gl_update() return
def _currentStructureParams(self): """ Return current structure parameters of interest to self.model_changed. Right now it only returns the number of peptides within the structure (or None). This is a good enough check (and no need to compare each and every peptide within the structure with a previously stored set of strands). """ #Can it happen that the total number of peptides remains the same even #after some alterations to the peptides? Unlikely. (Example: a single #(future) Break peptide operation will increase the number of peptides #by one. Or Join peptides decrease it by 1) params = None if self.command: # and self.command.hasValidStructure(): proteinList = [] proteinList = getAllProteinChunksInPart(self.win.assy) params = len(proteinList) return params
def _currentStructureParams(self): """ Return current structure parameters of interest to self.model_changed. Right now it only returns the number of peptides within the structure (or None). This is a good enough check (and no need to compare each and every peptide within the structure with a previously stored set of strands). """ #Can it happen that the total number of peptides remains the same even #after some alterations to the peptides? Unlikely. (Example: a single #(future) Break peptide operation will increase the number of peptides #by one. Or Join peptides decrease it by 1) params = None if self.command: # and self.command.hasValidStructure(): proteinList = [] proteinList = getAllProteinChunksInPart(self.win.assy) params = len(proteinList) return params