|
AtomGroup
objects can be compared with one another. Thus a
hierarchy can be compared with another hierarchy or
with a sub-hierarchy.
Only
the equality test yields a meaningful
result.
An
AtomGroup
object is said to be smaller than a second
AtomGroup
object if the atom population of the first object
is smaller than the population in the second
object.
If
two AtomGroup
objects have the same population of atoms, the
total number of nodes in each object is compared
and the object that has fewer nodes is declared to
be the smaller of the two.
Two
AtomGroup
objects are said to be equal if the names of the
Atoms and Groups contained in each hierarchy are
identical and the organization and connections are
the same in the two objects. In other words, the
string representation of the two objects are
identical. The atoms may have different properties
and this does not affect the identity.
From
the concrete example:
>>> Ge1 > Ga3 1 >>> Gd1 == Ga3 0
|
Note
that 1 means true or yes, 0 means false or
no.
|