Simplify bonded atom counting
Co-authored-by: Oliver Beckstein <orbeckst@gmail.com>
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user