ChainView Class Reference

definition of ChainView More...

#include <chain_view.hh>

Inherits ost::mol::ChainBase.

Public Member Functions

 ChainView ()
 ChainView (ChainViewDataPtr data, impl::ChainImplPtr impl)
 ChainView (const EntityView &entity, const ChainHandle &chain)
EntityView GetEntity () const
void Apply (EntityVisitor &visitor)
void Apply (EntityViewVisitor &visitor)
int GetResidueCount () const
int GetAtomCount () const
int GetBondCount () const
ResidueView AddResidue (const ResidueHandle &residue_handle, ViewAddFlags flags=0)
ResidueView AddResidue (const ResidueView &residue_view, ViewAddFlags flags=0)
AtomView AddAtom (const AtomHandle &atom_handle, ViewAddFlags flags=0)
ResidueView FindResidue (const ResNum &number) const
AtomView FindAtom (const AtomHandle &atom) const
AtomView ViewForHandle (const AtomHandle &atom) const
AtomView FindAtom (const ResNum &num, const String &name) const
ResidueView ViewForHandle (const ResidueHandle &handle) const
ResidueView FindResidue (const ResidueHandle &handle) const
bool IsResidueIncluded (const ResidueHandle &handle) const
ChainHandle GetHandle () const
const ResidueViewListGetResidueList () const
void RemoveResidue (ResidueView view)
int GetResidueIndex (const ResNum &number) const
ResidueView GetResidueByIndex (int index) const
Real GetMass () const
geom::Vec3 GetCenterOfMass () const
geom::Vec3 GetCenterOfAtoms () const
geom::AlignedCuboid GetBounds () const
void RemoveResidues ()
Handle validity



 operator bool () const
bool IsValid () const
Internal



ChainViewDataPtrViewData ()
const ChainViewDataPtrViewData () const
bool InSequence () const
EntityView Select (const Query &q, QueryFlags flags=0) const
EntityView Select (const String &query_string, QueryFlags flags=0) const
bool operator== (const ChainView &rhs) const
bool operator!= (const ChainView &rhs) const
bool HasAtoms () const

Detailed Description

definition of ChainView

Definition at line 37 of file chain_view.hh.


Constructor & Destructor Documentation

ChainView (  ) 
ChainView ( const EntityView entity,
const ChainHandle chain 
)

Member Function Documentation

AtomView AddAtom ( const AtomHandle atom_handle,
ViewAddFlags  flags = 0 
)

Add atom to view.

If the atoms's residue has not been added to the view it will be added.

Parameters:
atom_handle The atom to add
flags Can be a ORed together combination of ViewAddFlag
Returns:
The added atom view, or a reference to the existing atom view that points to the very same handle.
ResidueView AddResidue ( const ResidueView residue_view,
ViewAddFlags  flags = 0 
)

Add residue to view.

This method is identical to AddResidue(const ResidueHandle&) except that in case ViewAddFlag::INCLUDE_ATOMS is set only the atoms included in the residue view are considered.

If ViewAddFlag::CHECK_DUPLICATES is set, the method will ensure that the view is not already included in the view.

Parameters:
residue_view The residue view to add
flags Can be a ORed together combination of ViewAddFlag. Flags that do not affect the operation are silently ignored.
Returns:
The added residue view, or a reference to the existing residue view that points to the very same handle.
ResidueView AddResidue ( const ResidueHandle residue_handle,
ViewAddFlags  flags = 0 
)

Add residue to view.

If ViewAddFlag::CHECK_DUPLICATES is set, the method will ensure that the handle is not already included in the view.

Parameters:
residue_handle The residue handle to add
flags Can be a ORed together combination of ViewAddFlag. Flags that do not affect the operation are silently ignored.
Returns:
the added residue view, or a reference to the existing residue view that points to the very same handle.
void Apply ( EntityViewVisitor visitor  ) 
void Apply ( EntityVisitor visitor  ) 
AtomView FindAtom ( const ResNum num,
const String name 
) const
AtomView FindAtom ( const AtomHandle atom  )  const

Find view for given atom handle Deprecated: Use ViewForHandle instead.

ResidueView FindResidue ( const ResidueHandle handle  )  const
ResidueView FindResidue ( const ResNum number  )  const

Find residue by number.

int GetAtomCount (  )  const

Get number of atoms in this chain view.

int GetBondCount (  )  const

Get number of all inclusive bonds of this chain.

Warning:
For a bond between two different chains, it is not clearly defined to which chain it belongs. Therefore, this method will only return the number of bonds where both bonded atoms are within the same chain (all inclusive bonds).
geom::AlignedCuboid GetBounds (  )  const

Get entity's axis aligned bounding box.

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).

EntityView GetEntity (  )  const

Get parent entity view.

ChainHandle GetHandle (  )  const

Get handle this view points to.

Real GetMass (  )  const

Get entity's mass.

ResidueView GetResidueByIndex ( int  index  )  const

get residue by index

returns an invalid residue handle if the index is out of bounds

int GetResidueCount (  )  const

Get number of residues in this chain view.

int GetResidueIndex ( const ResNum number  )  const
const ResidueViewList& GetResidueList (  )  const

Get residues of this chain view.

Todo:
Residue list may be unordered. Is it the responsibility of the method building the view to have them ordered or is it our job?
bool HasAtoms (  )  const
bool InSequence (  )  const

whether the residues form an ordered sequence with respect to their residue numbers.

bool IsResidueIncluded ( const ResidueHandle handle  )  const

Check whether the view includes the given residue.

bool IsValid (  )  const [inline]

check validity of handle

See also:
operator bool()

Reimplemented from ChainBase.

Definition at line 59 of file chain_view.hh.

operator bool (  )  const [inline]

check validity of handle

check, whether the chain handle points to a valid handle.

Note:
It is an error to use any method other than IsValid, Impl() and operator bool() when the handle is invalid. An InvalidHandle exception will be thrown.

Reimplemented from ChainBase.

Definition at line 56 of file chain_view.hh.

bool operator!= ( const ChainView rhs  )  const
bool operator== ( const ChainView rhs  )  const
void RemoveResidue ( ResidueView  view  ) 

remove given residue from the view

void RemoveResidues (  ) 

///

remove all residues from the view

EntityView Select ( const String query_string,
QueryFlags  flags = 0 
) const

return view based on query String.

See also:
Query
EntityView Select ( const Query q,
QueryFlags  flags = 0 
) const

return view based on a query object

See also:
Query
const ChainViewDataPtr& ViewData (  )  const [inline]

Get view data.

Definition at line 185 of file chain_view.hh.

ChainViewDataPtr& ViewData (  )  [inline]

Get view data.

Definition at line 180 of file chain_view.hh.

ResidueView ViewForHandle ( const ResidueHandle handle  )  const

Find residue by residue handle.

AtomView ViewForHandle ( const AtomHandle atom  )  const

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 20 Jun 2016 for OpenStructure by  doxygen 1.6.1