Simplify bonded atom counting

Co-authored-by: Oliver Beckstein <orbeckst@gmail.com>
This commit is contained in:
Nathan Baker
2020-05-23 09:31:23 -07:00
committed by GitHub
parent 69a369c17f
commit df6d8492da

View File

@@ -141,8 +141,7 @@ class Atom(object):
Returns: Returns:
list of atoms. list of atoms.
""" """
array = [ba for ba in self.bonded_atoms if ba.element != 'H'] return [ba for ba in self.bonded_atoms if ba.element != 'H']
return array
def is_atom_within_bond_distance(self, other_atom, max_bonds, cur_bond): def is_atom_within_bond_distance(self, other_atom, max_bonds, cur_bond):
"""Check if <other_atom> is found within <max_bonds> bonds of self. """Check if <other_atom> is found within <max_bonds> bonds of self.