Commit 88ca6354 authored by Daria M. Tomecka's avatar Daria M. Tomecka

cleaaning up the code and removing repetition

parent 8a086923
......@@ -72,26 +72,6 @@ def get_normalized_wyckoff(atomic_number, wyckoff):
sortedWyc = list(wycDict.keys())
sortedWyc.sort()
def cmpp(a, b):
return ((a < b) - (a > b))
def compareAtNr(at1, at2):
"""Returns a normalized Wyckoff sequence for the given atomic numbers and
wyckoff symbols.
"""
# print("at", atomic_number, wyckoff)
atomCount = {}
for nr in atomic_number:
atomCount[nr] = atomCount.get(nr, 0) + 1
wycDict = {}
for i, wk in enumerate(wyckoff):
oldVal = wycDict.get(wk, {})
nr = atomic_number[i]
oldVal[nr] = oldVal.get(nr, 0) + 1
wycDict[wk] = oldVal
sortedWyc = list(wycDict.keys())
sortedWyc.sort()
def cmpp(a, b):
return ((a < b) - (a > b))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment