def addModificationStatement(self, modLine): modLine = self.PreProcessStatement(modLine) print "Adding mod line: '%s'" % modLine self.modificationsBlock.append(modLine) self.modificationsSection = ModificationsSection( self.modificationsBlock) return
def addModicationsBlock(self, modificationsBlock, overwrite=False): if self.modificationsBlock and not overwrite: raise MzrExceptions.MoleculizerException( "Error: Cannot add a modifications block twice.") if not self.BlockPassesSanityCheck(modificationsBlock): raise InsaneBlockOnTheLooseException(modificationsBlock, "modifications block") self.modificationsBlock = modificationsBlock[:] self.modificationsSection = ModificationsSection( self.modificationsBlock) return