Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def human_readable_title(self):
total = []
for key in [self.key1, self.key2]:
titleDict = {}
counter = 0
for item in key:
titleDict[AccumulationMapIndex.mapping[counter]] = (item if item != "none" else "")
counter += 1
residueString = "%s%s" % (titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.resname]],
str(titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.resid]]))
atomIndexString = ("%s %s" % (AccumulationMapIndex.mapping[AccumulationMapIndex.index],
str(titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.index]])) if
titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.index]] != "" else "")
atomNameString = ("%s %s" % (AccumulationMapIndex.mapping[AccumulationMapIndex.name],
str(titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.name]])) if
titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.name]] != "" else "")
segnameString = ("%s %s" % (AccumulationMapIndex.mapping[AccumulationMapIndex.segid],
str(titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.segid]])) if
titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.segid]] != "" else "")
list = [residueString, atomIndexString, atomNameString, segnameString]
finishedList = []
for string in list:
if string != "":
finishedList.append(string)
finishedString = " , ".join(finishedList)
total.append(finishedString)
return " - ".join(total)
for key in [self.key1, self.key2]:
titleDict = {}
counter = 0
for item in key:
titleDict[AccumulationMapIndex.mapping[counter]] = (item if item != "none" else "")
counter += 1
residueString = "%s%s" % (titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.resname]],
str(titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.resid]]))
atomIndexString = ("%s %s" % (AccumulationMapIndex.mapping[AccumulationMapIndex.index],
str(titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.index]])) if
titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.index]] != "" else "")
atomNameString = ("%s %s" % (AccumulationMapIndex.mapping[AccumulationMapIndex.name],
str(titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.name]])) if
titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.name]] != "" else "")
segnameString = ("%s %s" % (AccumulationMapIndex.mapping[AccumulationMapIndex.segid],
str(titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.segid]])) if
titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.segid]] != "" else "")
list = [residueString, atomIndexString, atomNameString, segnameString]
finishedList = []
for string in list:
if string != "":
finishedList.append(string)
finishedString = " , ".join(finishedList)
total.append(finishedString)
return " - ".join(total)
def human_readable_title(self):
total = []
for key in [self.key1, self.key2]:
titleDict = {}
counter = 0
for item in key:
titleDict[AccumulationMapIndex.mapping[counter]] = (item if item != "none" else "")
counter += 1
residueString = "%s%s" % (titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.resname]],
str(titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.resid]]))
atomIndexString = ("%s %s" % (AccumulationMapIndex.mapping[AccumulationMapIndex.index],
str(titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.index]])) if
titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.index]] != "" else "")
atomNameString = ("%s %s" % (AccumulationMapIndex.mapping[AccumulationMapIndex.name],
str(titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.name]])) if
titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.name]] != "" else "")
segnameString = ("%s %s" % (AccumulationMapIndex.mapping[AccumulationMapIndex.segid],
str(titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.segid]])) if
titleDict[AccumulationMapIndex.mapping[AccumulationMapIndex.segid]] != "" else "")
list = [residueString, atomIndexString, atomNameString, segnameString]
finishedList = []
for string in list:
if string != "":