We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e85242a commit b5550fdCopy full SHA for b5550fd
rmgpy/molecule/molecule.py
@@ -1590,15 +1590,14 @@ def get_element_count(self):
1590
"""
1591
Returns the element count for the molecule as a dictionary.
1592
1593
+ cython.declare(atom=Atom, element_count=dict, symbol=str, key=str)
1594
element_count = {}
1595
for atom in self.atoms:
1596
symbol = atom.element.symbol
- isotope = atom.element.isotope
1597
- key = symbol
1598
- if key in element_count:
1599
- element_count[key] += 1
+ if symbol in element_count:
+ element_count[symbol] += 1
1600
else:
1601
- element_count[key] = 1
+ element_count[symbol] = 1
1602
1603
return element_count
1604
0 commit comments