Skip to content

Commit

Permalink
Small fix to Bond TopologyAttrs
Browse files Browse the repository at this point in the history
removed tolist() call
use .universe not ._u
  • Loading branch information
richardjgowers committed Dec 6, 2017
1 parent 4dcfb7d commit b9db71d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package/MDAnalysis/core/topologyattrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1491,11 +1491,11 @@ def get_atoms(self, ag):
unique_bonds = self._bondDict[ag.ix]
bond_idx, types, guessed, order = np.hsplit(
np.array(sorted(unique_bonds)), 4)
bond_idx = np.array(bond_idx.ravel().tolist(), dtype=np.int32)
bond_idx = np.array(bond_idx.ravel(), dtype=np.int32)
types = types.ravel()
guessed = guessed.ravel()
order = order.ravel()
return TopologyGroup(bond_idx, ag._u,
return TopologyGroup(bond_idx, ag.universe,
self.singular[:-1],
types,
guessed,
Expand Down Expand Up @@ -1542,7 +1542,7 @@ class Bonds(_Connection):
def bonded_atoms(self):
"""An AtomGroup of all atoms bonded to this Atom"""
idx = [b.partner(self).index for b in self.bonds]
return self._u.atoms[idx]
return self.universe.atoms[idx]

transplants[Atom].append(
('bonded_atoms', property(bonded_atoms, None, None,
Expand Down

0 comments on commit b9db71d

Please sign in to comment.