OEHierView

class OEHierView

The OEHierView class provides a convenient method for examining biological molecules as if they were hierarchical data. Hierarchical views can be fraught with inefficiencies. Despite this, they are such a common means of thinking about macromolecules that OEChem provides access to molecules in this manner. The OEHierView class takes a snapshot of an OEMolBase and provides convenient access to a hierarchical view of the data.

Note

Unlike typical OEChem iterators that closely track changes to a molecule, the hierarchy view is based on a snapshot of the molecule. One should use the assignment operator to update the hierarchical view after any change to the molecule.

Constructors

OEHierView(i: OEHierViewImpl) -> OEHierView
OEHierView() -> OEHierView
OEHierView(arg2: OEHierView) -> OEHierView

Default and copy constructors.

OEHierView(arg2: Union[OEGraphMol,OEMol,OEQMol], assume: int) -> OEHierView

This constructor takes an OEMolBase as an argument and takes a snapshot of the molecule and sets up a hierarchical data view of the molecule. This allows hierarchical access to the molecule via the OEIter class.

Note

Unlike typical OEChem iterators that track changes to a molecule, the hierarchy view is based on a snapshot of the molecule. One should use the assignment operator to update the hierarchical view after any change to the molecule.

GetAtom

GetAtom(chainID: str, resName: str, resIdx: int, pdbAtomIdx: int) -> OEAtomBase

Returns an atom specified by the chainID, residue name, residue number, and the PDB atom index.

See also

OEGetPDBAtomIndex function

GetAtoms

GetAtoms() -> OEAtomIter
GetAtoms() -> Iterable[OEAtomBase]

Returns an iterator over all of the atoms in the hierarchical view.

GetChains

GetChains() -> OEHierChainIter
GetChains() -> Iterable[OEHierChain]

GetFragments

GetFragments() -> OEHierFragmentIter
GetFragments() -> Iterable[OEHierFragment]

Returns an iterator over all of the fragments in the hierarchical view.

GetResidue

GetResidue(chainID: str, resName: str, resIdx: int) -> OEHierResidue

Gives direct access to a residue using the typical information that a user might know about a residue of interest (e.g. - THR242 of chain 'A').

GetResidues

GetResidues() -> OEHierResidueIter
GetResidues() -> Iterable[OEHierResidue]

Returns an iterator over all of the residues in the hierarchical view.