Unverified Commit 11301fd5 authored by Patrick Kunzmann's avatar Patrick Kunzmann Committed by GitHub
Browse files

Fix misleading documentation of `Topology.bonds` (#3968)

* Fix misleading documentation of `Topology.bonds`

`Topology.bonds()` states that iterates over a tuple of `Atom` objects. While this is technically correct, as the `Bond` class is a named tuple, this also hides the fact, that `Bond` objects also provide the `order` and `type` attributes. Therefore, I propose to change the sentence, so that it uses the capitalized *Bonds* indicating that they are actually objects.

* Update docstring
parent 611bd817
...@@ -230,7 +230,9 @@ class Topology(object): ...@@ -230,7 +230,9 @@ class Topology(object):
yield atom yield atom
def bonds(self): def bonds(self):
"""Iterate over all bonds (each represented as a tuple of two Atoms) in the Topology.""" """Iterate over all bonds in the Topology.
Each one is represented by a Bond object, which is a named tuple of two atoms.
"""
return iter(self._bonds) return iter(self._bonds)
def getPeriodicBoxVectors(self): def getPeriodicBoxVectors(self):
......
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