OEHierView

class OEHierView

This class represents 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()
OEHierView(OEHierViewImpl *i)
OEHierView(const OEHierView &)

Default and copy constructors.

OEHierView(OEChem::OEMolBase &, unsigned assume=OEAssumption::Default)

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.

operator=

OEHierView &operator=(const OEHierView &)
OEHierView &operator=(OEChem::OEMolBase &)

GetAtom

OEChem::OEAtomBase *GetAtom(char chainID, const char *resName, int resIdx,
                            unsigned pdbAtomIdx)
const OEChem::OEAtomBase *GetAtom(char chainID, const char *resName, int resIdx,
                                  unsigned pdbAtomIdx) const

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

See also

OEGetPDBAtomIndex function

GetAtoms

OESystem::OEIterBase<OEChem::OEAtomBase> *GetAtoms()
OESystem::OEIterBase<const OEChem::OEAtomBase> *GetAtoms() const

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

GetChains

OESystem::OEIterBase<OEHierChain> *GetChains()
OESystem::OEIterBase<const OEHierChain> *GetChains() const

GetFragments

OESystem::OEIterBase<OEHierFragment> *GetFragments()
OESystem::OEIterBase<const OEHierFragment> *GetFragments() const

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

GetResidue

OEHierResidue &GetResidue(char chainID, const char *resName, int resIdx)
const OEHierResidue &GetResidue(char chainID, const char *resName,
                                int resIdx) const

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

OESystem::OEIterBase<OEHierResidue> *GetResidues()
OESystem::OEIterBase<const OEHierResidue> *GetResidues() const

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