19 #ifndef OST_CHAIN_VIEW_HH
20 #define OST_CHAIN_VIEW_HH
34 namespace ost {
namespace mol {
50 operator bool()
const {
return this->IsValid(); }
Three dimensional vector class, using Real precision.
base class for ChainHandle and ChainView
ChainView(const EntityView &entity, const ChainHandle &chain)
EntityView Select(const Query &q, QueryFlags flags=0) const
return view based on a query object
void Apply(EntityViewVisitor &visitor)
bool IsResidueIncluded(const ResidueHandle &handle) const
Check whether the view includes the given residue.
EntityView GetEntity() const
Get parent entity view.
bool operator==(const ChainView &rhs) const
void RemoveResidue(ResidueView view)
remove given residue from the view
ChainHandle GetHandle() const
Get handle this view points to.
ResidueView FindResidue(const ResNum &number) const
Find residue by number
int GetResidueIndex(const ResNum &number) const
Real GetMass() const
Get entity's mass.
ResidueView AddResidue(const ResidueView &residue_view, ViewAddFlags flags=0)
Add residue to view.
void Apply(EntityVisitor &visitor)
AtomView FindAtom(const AtomHandle &atom) const
Find view for given atom handle Deprecated: Use ViewForHandle instead.
AtomView ViewForHandle(const AtomHandle &atom) const
geom::AlignedCuboid GetBounds() const
Get entity's axis aligned bounding box.
const ChainViewDataPtr & ViewData() const
Get view data.
AtomView AddAtom(const AtomHandle &atom_handle, ViewAddFlags flags=0)
Add atom to view.
ResidueView ViewForHandle(const ResidueHandle &handle) const
Find residue by residue handle.
int GetAtomCount() const
Get number of atoms in this chain view.
bool InSequence() const
whether the residues form an ordered sequence with respect to their residue numbers.
geom::Vec3 GetCenterOfMass() const
Get entity's center of mass (mass weighted)
ResidueView GetResidueByIndex(int index) const
get residue by index
unsigned long GetHashCode() const
get unique id
ResidueView FindResidue(const ResidueHandle &handle) const
AtomView FindAtom(const ResNum &num, const String &name) const
const ResidueViewList & GetResidueList() const
Get residues of this chain view.
ResidueView AddResidue(const ResidueHandle &residue_handle, ViewAddFlags flags=0)
Add residue to view.
bool IsValid() const
check validity of handle
int GetBondCount() const
Get number of all inclusive bonds of this chain.
int GetResidueCount() const
Get number of residues in this chain view.
geom::Vec3 GetCenterOfAtoms() const
Get entity's center of atoms (not mass weighted)
EntityView Select(const String &query_string, QueryFlags flags=0) const
return view based on query String.
ChainView(ChainViewDataPtr data, impl::ChainImplPtr impl)
bool operator!=(const ChainView &rhs) const
EntityViewVisitor interface.
#define DLLEXPORT_OST_MOL
boost::shared_ptr< ChainImpl > ChainImplPtr
boost::shared_ptr< ChainViewData > ChainViewDataPtr
std::vector< ResidueView > ResidueViewList