Two Bond instances can be compared with the == and
!= operators. A bond is equal to another if the same atom
numbers are connected and they have the same bond order. The
ordering of the two atom numbers is ignored as is the fact that a
bond was guessed.

The presence of a particular atom can also be queried:

>>> AtominBond

will return either True or False.

Changed in version 0.9.0: Now a subclass of TopologyObject. Changed class to use
__slots__ and stores atoms in atoms attribute.

The TopologyDict collects all the selected topology type from the
atoms and categorises them according to the types of the atoms within. A
TopologyGroup containing all of a given bond type can be made by
querying with the appropriate key. The keys to the TopologyDict
are a tuple of the atom types that the bond represents and can be viewed
using the keys() method.

Getting and setting types of bonds is done smartly, so a C-C-H
angle is considered identical to a H-C-C angle.

Duplicate entries are automatically removed upon creation and
combination of different Dicts. This means a bond between atoms
1 and 2 will only ever appear once in a dict despite both atoms 1
and 2 having the bond in their bond attribute.

Two TopologyDict instances can be combined using
addition and it will not create any duplicate bonds in the process.

This format should be identical to the original contents of the
entries in universe._topology.
Note that because bonds are sorted as they are initialised, the order
that atoms are defined in each entry might be reversed.

Returns:

indices (tuple) – A tuple of tuples which define the contents of this
TopologyGroup in terms of the atom numbers. (0 based
index within u.atoms)

This format should be identical to the original contents of the
entries in universe._topology.
Note that because bonds are sorted as they are initialised, the order
that atoms are defined in each entry might be reversed.

Returns:

indices (tuple) – A tuple of tuples which define the contents of this
TopologyGroup in terms of the atom numbers. (0 based
index within u.atoms)