#include <entity_view.hh>
Inherits ost::mol::EntityBase.
Views point to the same data as their corresponding handle classes. When modifying and entity, such as applying a coordinate transform to the atoms, these changes will also be reflected in the views.
The entity - chain -residue - atom hierarchy of the entity handles is replicated in the views, the most important difference being that not all atoms, residues and chains present in the entity must be present in the view. One can think of the views as a selection.
Elements can be added with EntitView::AddAtom(), EntityView::AddResidue(), EntityView::AddChain(). The behaviour of these methods is influenced by a combination of ViewAddFlag. Note that none of the add methods insert bonds. Bonds can be added with EntityView::AddAllInclusiveBonds() or manually with EntityView::AddBond(). The elements can be removed with EntityView::RemoveChain(), EntityView::RemoveResidue() and EntityView::RemoveAtom().
A very convenient way to create views is with so-called Query query statements. The queries are executed via EntityHandle::Select() and EntityView::Select().
Definition at line 87 of file entity_view.hh.
| EntityView | ( | ) |
| EntityView | ( | const EntityHandle & | entity, | |
| ViewAddFlags | flags = 0 | |||
| ) |
create new entity view from entity handle
| entity | The handle the view is created from. | |
| flags | An ORed together list of ViewAddFlag |
| EntityView | ( | const EntityViewDataPtr & | data, | |
| const impl::EntityImplPtr | impl | |||
| ) |
construct entity view from data and entity impl
| void AddAllInclusiveBonds | ( | ) |
clear bonds and add all inclusive ones (ie where both atoms are present)
| AtomView AddAtom | ( | const AtomView & | atom_view, | |
| ViewAddFlags | flags = 0 | |||
| ) |
| AtomView AddAtom | ( | const AtomHandle & | atom_handle, | |
| ViewAddFlags | flags = 0 | |||
| ) |
Add atom to view.
If the atom's chain or residue have not been added to the view, they will be added
| atom_handle | is the atom to add | |
| flags | can be a ORed together combination of ViewAddFlag |
| void AddAtomInternal | ( | const AtomView & | av | ) | [protected] |
| bool AddBond | ( | const BondHandle & | bond_handle | ) |
Add a bond.
| ChainView AddChain | ( | const ChainView & | chain_view, | |
| ViewAddFlags | flags = 0 | |||
| ) |
Add chain to view.
Same as AddChain(const ChainHandle&) but with the difference that only the residues or atoms included in the chain view are included when one of ViewAddFlag::INCLUDE_ATOMS or ViewAddFlag::INCLUDE_RESIDUES is set.
| chain_view | the handle that the view points to will be added to the view. | |
| flags | can be a ORed together combination of ViewAddFlag |
| ChainView AddChain | ( | const ChainHandle & | chain_handle, | |
| ViewAddFlags | flags = 0 | |||
| ) |
Add chain to view.
If ViewAddFlag::CHECK_DUPLICATES is set, the method will ensure that the handle is not already included in the view.
| chain_handle | The chain handle to add | |
| flags | Can be a ORed together combination of ViewAddFlag |
| ResidueView AddResidue | ( | const ResidueView & | residue_view, | |
| ViewAddFlags | flags = 0 | |||
| ) |
Add residue to view.
Same as AddReside(const ResidueHandle&, ViewAddFlags) but with the difference that only atoms included in the residue view are added when ViewAddFlag::INCLUDE_ATOMS is set.
| ResidueView AddResidue | ( | const ResidueHandle & | residue_handle, | |
| ViewAddFlags | flags = 0 | |||
| ) |
Add residue to view.
If the residues's chain has not been added to the chain already, it will be added.
| residue_handle | is the residue to add | |
| flags | can be a ORed together combination of ViewAddFlag |
| void Apply | ( | EntityViewVisitor & | visitor | ) |
Apply entity view visitor to whole view.
| void Apply | ( | EntityVisitor & | visitor | ) |
Apply entity visitor to whole view.
| AtomViewIter AtomsBegin | ( | ) | const |
Get iterator pointing to the beginning of atoms.
| AtomViewIter AtomsEnd | ( | ) | const |
Get iterator pointing to the end of atoms.
| EntityView Copy | ( | ) | const |
create copy of view
The copy has the semantics of a deep copy.
| EntityView CreateEmptyView | ( | ) | const |
create empty view
| EntityView CreateFullView | ( | ) | const |
create a new full view
This is an alias of EntityView::Copy()
| String Dump | ( | ) | const |
returns a string containing a human-readable summary of the entity view
| AtomView FindAtom | ( | const AtomHandle & | atom | ) | const |
Find view for given atom handle.
| ChainView FindChain | ( | const ChainHandle & | chain | ) | const |
Find chain for given chain handle.
| ResidueView FindResidue | ( | const ResidueHandle & | residue | ) | const |
Find atom for given residue handle.
| AtomViewList FindWithin | ( | const geom::Vec3 & | center, | |
| Real | radius | |||
| ) | const |
find atoms close to point
Get angle in radians between bonds a1-a2 and a2-a3.
| Real GetAngle | ( | const AtomHandle & | a1, | |
| const AtomHandle & | a2, | |||
| const AtomHandle & | a3 | |||
| ) | const |
Get angle in radians between bonds a1-a2 and a2-a3.
| int GetAtomCount | ( | ) | const |
Get total number of atoms in this entity.
| AtomViewList GetAtomList | ( | ) | const |
Get list of all atoms included in the view.
| int GetBondCount | ( | ) | const |
Get number of bonds.
| const BondHandleList& GetBondList | ( | ) | const |
| geom::Vec3 GetCenterOfAtoms | ( | ) | const |
Get entity's center of atoms (not mass weighted).
Returns the center of all the atoms in an entity. This is similar to GetCenterOfMass(), but the atoms are not mass weighted
| geom::Vec3 GetCenterOfMass | ( | ) | const |
Get entity's center of mass (mass weighted).
| int GetChainCount | ( | ) | const |
Get number of chains in this entity.
| const ChainViewList& GetChainList | ( | ) | const |
| geom::Vec3 GetGeometricCenter | ( | ) | const |
Get entity's geometric center.
Returns the geometric center of the entity's bounding box by calculating (GetGeometricStart()+GetGeometricEnd())/2
| geom::Vec3 GetGeometricEnd | ( | ) | const |
| geom::Vec3 GetGeometricStart | ( | ) | const |
| EntityHandle GetHandle | ( | ) | const |
Get handle this view points to.
| Real GetMass | ( | ) | const |
Get entity's mass.
| std::pair<Real,Real> GetMinMax | ( | const String & | prop, | |
| Prop::Level | hint = Prop::UNSPECIFIED | |||
| ) | const |
Return the min/max pair for the given property.
| int GetResidueCount | ( | ) | const |
Get total number of residues in this entity.
| ResidueViewList GetResidueList | ( | ) | const |
Get list of all residues included in the view.
| bool IsChainIncluded | ( | const ChainHandle & | chain | ) | const |
Check whether the view includes the given chain.
| void RemoveAtom | ( | AtomView | view | ) |
remove atom from view
| void RemoveAtomInternal | ( | const AtomView & | av | ) | [protected] |
| void RemoveBond | ( | const BondHandle & | bond | ) |
| void RemoveChain | ( | ChainView | view | ) |
remove chain from view
| void RemoveResidue | ( | ResidueView | view | ) |
remove residue from view
| ResidueViewIter ResiduesBegin | ( | ) | const |
| ResidueViewIter ResiduesEnd | ( | ) | const |
| EntityView Select | ( | const Query & | query, | |
| QueryFlags | flags = 0 | |||
| ) | const |
| EntityView Select | ( | const String & | query_string, | |
| QueryFlags | flags = 0 | |||
| ) | const |
| EntityViewDataPtr& ViewData | ( | ) |
Get entity view-specific data.
| const EntityViewDataPtr& ViewData | ( | ) | const |
Get entity view-specific data.
friend class AtomView [friend] |
Definition at line 88 of file entity_view.hh.
| EntityView DLLEXPORT_OST_MOL CreateViewFromAtomList | ( | const AtomViewList & | atoms | ) | [related] |
create view from atom list
| IntegrityError | if atoms belonging to different entities are encountered |
| EntityView DLLEXPORT_OST_MOL CreateViewFromAtomList | ( | const AtomHandleList & | atoms | ) | [related] |
create view from atom list
| IntegrityError | if atoms belonging to different entities are encountered |
| EntityView DLLEXPORT_OST_MOL Difference | ( | const EntityView & | ev1, | |
| const EntityView & | ev2 | |||
| ) | [related] |
return difference between two entity views
a view containing elements in ev1 but not in ev2 is returned.
| EntityView DLLEXPORT_OST_MOL Intersection | ( | const EntityView & | ev1, | |
| const EntityView & | ev2 | |||
| ) | [related] |
return intersection of two entity views
a view containing elements in ev1 and ev2 is returned
friend class ResidueView [friend] |
Definition at line 89 of file entity_view.hh.
| EntityView DLLEXPORT_OST_MOL Union | ( | const EntityView & | ev1, | |
| const EntityView & | ev2 | |||
| ) | [related] |
return union of two entity views
a view containing elements that are either in ev1 or ev2 are included. no duplicates are generated.
1.5.8