ResidueView Class Reference

residue view More...

#include <residue_view.hh>

Inherits ost::mol::ResidueBase.


Public Member Functions

 ResidueView ()
 ResidueView (const ChainView &chain, const ResidueHandle &residue)
AtomView FindAtom (const String &atom_name) const
AtomView FindAtom (const AtomHandle &handle) const
bool IsAtomIncluded (const AtomHandle &handle) const
void RemoveAtom (AtomView view)
void RemoveAtoms ()
void Apply (EntityVisitor &visitor)
void Apply (EntityViewVisitor &visitor)
int GetAtomCount () const
const AtomViewListGetAtomList () const
ResidueHandle GetHandle () const
EntityView GetEntity () const
int GetIndex () const
ChainView GetChain () const
double GetMass () const
geom::Vec3 GetCenterOfMass () const
geom::Vec3 GetCenterOfAtoms () const
geom::Vec3 GetGeometricCenter () const
geom::Vec3 GetGeometricStart () const
geom::Vec3 GetGeometricEnd () const
EntityView Select (const Query &q, QueryFlags flags=0) const
EntityView Select (const String &query_string, QueryFlags flags=0) const
bool operator== (const ResidueView &rhs) const
bool operator!= (const ResidueView &rhs) const
internal
 ResidueView (const ResidueViewDataPtr &data, const impl::ResidueImplPtr &impl)
const ResidueViewDataPtrViewData () const
ResidueViewDataPtrViewData ()
Adding and removing atoms
AtomView AddAtom (const AtomView &atom_view, ViewAddFlags flags=0)
AtomView AddAtom (const AtomHandle &atom_handle, ViewAddFlags flags=0)

Protected Member Functions

void SetIndex (int index)

Friends

class ChainView


Detailed Description

residue view

Atoms are added with ResidueView::AddAtom() and removed with ResidueView::RemoveAtom(). Like other view operations, these operations only affect the view and do not alter the structure and topology of the underlying residue.

Definition at line 39 of file residue_view.hh.


Constructor & Destructor Documentation

ResidueView (  ) 

Create invalid ResidueView.

ResidueView ( const ChainView chain,
const ResidueHandle residue 
)

Create new residue view.

Parameters:
chain is the parent chain view to insert into
residue is residue handle this view points to.
Note:
For better readability consider using ChainView::AddResidue()

ResidueView ( const ResidueViewDataPtr data,
const impl::ResidueImplPtr impl 
)

construct new view from view data and impl.

This has the same effect as using the default copy constructor of the view.


Member Function Documentation

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

Add atom to view.

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

Parameters:
atom_handle the atom handle 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.

AtomView AddAtom ( const AtomView atom_view,
ViewAddFlags  flags = 0 
)

Add atom to view.

If ViewAddFlag::CHECK_DUPLICATES is set, the method will ensure that the view is not already included in this view. This method is an alias for `residue_view.AddAtom(atom_view.GetHandle())`

Parameters:
atom_view is the atom view 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 view.

void Apply ( EntityViewVisitor visitor  ) 

void Apply ( EntityVisitor visitor  ) 

Apply entity visitor to whole chain.

AtomView FindAtom ( const AtomHandle handle  )  const

Find residue by residue handle.

AtomView FindAtom ( const String atom_name  )  const

Find atom by name.

int GetAtomCount (  )  const

return number of atoms in this residue view.

const AtomViewList& GetAtomList (  )  const

get list of atoms in this 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).

ChainView GetChain (  )  const

get parent chain view.

EntityView GetEntity (  )  const

get entity

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

ResidueHandle GetHandle (  )  const

get handle this view points to

int GetIndex (  )  const

get index of residue view in chain

double GetMass (  )  const

Get entity's mass.

bool IsAtomIncluded ( const AtomHandle handle  )  const

Check whether the view includes the the given atom.

bool operator!= ( const ResidueView rhs  )  const

bool operator== ( const ResidueView rhs  )  const

void RemoveAtom ( AtomView  view  ) 

remove given atom from view

all bonds involving this atom will be removed from the view as well.

void RemoveAtoms (  ) 

remove all atoms

all bonds involving one of the atoms will be removed from the view as well.

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

void SetIndex ( int  index  )  [protected]

set the index of residiue view in chain should be called from chainview whenever indexes change

ResidueViewDataPtr& ViewData (  )  [inline]

Get internal view data.

Definition at line 69 of file residue_view.hh.

const ResidueViewDataPtr& ViewData (  )  const [inline]

Get internal view data.

Definition at line 65 of file residue_view.hh.


Friends And Related Function Documentation

friend class ChainView [friend]

Definition at line 41 of file residue_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