Hierarchical Views¶
This module defines HierView
class that builds a hierarchical
views of atom groups.
-
class
HierView
(atoms, **kwargs)[source]¶ Hierarchical views can be generated for
AtomGroup
,Selection
, andChain
instances. Indexing aHierView
instance returns aChain
instance.Some
object
methods are customized as follows:len()
returns the number of atoms, i.e.numChains()
Note that when an
AtomGroup
instance have distinct segments, they will be considered when building the hierarchical view. ASegment
instance will be generated for each distinct segment name. Then, for each segment chains and residues will be evaluated. Having segments in the structure will not change most behaviors of this class, except indexing. For example, when indexing a hierarchical view for chain P in segment PROT needs to be indexed ashv['PROT', 'P']
.