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
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 FindAtom (const ResNum &num, const String &name) 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::Vec3 GetGeometricCenter () const
geom::Vec3 GetGeometricStart () const
geom::Vec3 GetGeometricEnd () const
void RemoveResidues ()
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


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.

ResidueView FindResidue ( const ResidueHandle handle  )  const

Find residue by residue handle.

ResidueView FindResidue ( const ResNum number  )  const

Find residue by number.

int GetAtomCount (  )  const

Get number of atoms in this chain view.

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.

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

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 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 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 165 of file chain_view.hh.

ChainViewDataPtr& ViewData (  )  [inline]

Get view data.

Definition at line 160 of file chain_view.hh.


The documentation for this class was generated from the following file:

Generated on Fri Jul 2 14:23:07 2010 for OpenStructure by  doxygen 1.5.8