19 #ifndef OST_ENTITY_VIEW_HN
20 #define OST_ENTITY_VIEW_HN
45 namespace ost {
namespace mol {
100 operator bool()
const {
return this->IsValid(); }
109 bool IsValid()
const {
return data_.get()!=0; }
111 Real GetMass()
const;
245 const String& atom_name)
const;
Three dimensional vector class, using Real precision.
void RemoveAtomInternal(const AtomView &av)
const EntityViewDataPtr & ViewData() const
Get entity view-specific data.
ResidueViewList GetResidueList() const
Get list of all residues included in the view.
void RemoveChain(ChainView view)
remove chain from view
EntityView(const EntityHandle &entity, ViewAddFlags flags=0)
create new entity view from entity handle
EntityViewDataPtr & ViewData()
Get entity view-specific data.
EntityView CreateFullView() const
create a new full view
String Dump() const
returns a string containing a human-readable summary of the entity view
void Apply(EntityViewVisitor &visitor)
Apply entity view visitor to whole view.
const BondHandleList & GetBondList() const
bool AddBond(const BondHandle &bond_handle)
Add a bond.
void RemoveBond(const BondHandle &bond)
EntityView ExtendViewToSurrounding(Real gap) const
Extend current view to include all atoms that are within the sum of their vdw radii + gap.
EntityView ExtendViewToResidues() const
Extend current view to include all atoms of each residue where at least one atom is selected currentl...
void RemoveResidue(ResidueView view)
remove residue from view
AtomViewList GetAtomList() const
Get list of all atoms included in the view.
void AddAtomInternal(const AtomView &av)
std::pair< Real, Real > GetMinMax(const String &prop, Prop::Level hint=Prop::UNSPECIFIED) const
Return the min/max pair for the given property.
ChainView ViewForHandle(const ChainHandle &chain) const
locate chain view for given chain handle
ResidueView AddResidue(const ResidueView &residue_view, ViewAddFlags flags=0)
Add residue to view.
EntityView CreateEmptyView() const
create empty view
void RemoveAtom(AtomView view)
remove atom from view
void Apply(EntityVisitor &visitor)
Apply entity visitor to whole view.
bool IsChainIncluded(const ChainHandle &chain) const
Check whether the view includes the given chain.
AtomView FindAtom(const AtomHandle &atom) const
Find view for given atom handle.
AtomView ViewForHandle(const AtomHandle &atom) const
EntityView Select(const Query &query, QueryFlags flags=0) const
Select a structural subset of the entity view.
const ChainViewList & GetChainList() const
geom::AlignedCuboid GetBounds() const
AtomView AddAtom(const AtomHandle &atom_handle, ViewAddFlags flags=0)
Add atom to view.
int GetAtomCount() const
Get total number of atoms in this entity.
geom::Vec3 GetCenterOfMass() const
Get entity's center of mass (mass weighted)
bool HasAtoms() const
true if view contains at least one atom
Real GetAngle(const AtomHandle &a1, const AtomHandle &a2, const AtomHandle &a3) const
Get angle in radians between bonds a1-a2 and a2-a3.
ChainView AddChain(const ChainHandle &chain_handle, ViewAddFlags flags=0)
Add chain to view.
Real GetAngle(const AtomView &a1, const AtomView &a2, const AtomView &a3) const
Get angle in radians between bonds a1-a2 and a2-a3.
EntityHandle GetHandle() const
Get handle this view points to.
AtomView AddAtom(const AtomView &atom_view, ViewAddFlags flags=0)
ResidueView AddResidue(const ResidueHandle &residue_handle, ViewAddFlags flags=0)
Add residue to view.
ChainView AddChain(const ChainView &chain_view, ViewAddFlags flags=0)
Add chain to view.
bool IsValid() const
check validity of handle
ChainView FindChain(const ChainHandle &chain) const
Find chain for given chain handle.
ChainView FindChain(const String &chain_name) const
Find chain by name.
AtomView FindAtom(const String &chain_name, const ResNum &num, const String &atom_name) const
locate atom view for given atom handle
int GetBondCount() const
Get number of bonds.
int GetResidueCount() const
Get total number of residues in this entity.
int GetChainCount() const
Get number of chains in this entity.
EntityView Copy() const
create copy of view
AtomViewList FindWithin(const geom::Vec3 ¢er, Real radius) const
find atoms close to point
geom::Vec3 GetCenterOfAtoms() const
Get entity's center of atoms (not mass weighted)
ResidueView FindResidue(const ResidueHandle &residue) const
Find atom for given residue handle.
void AddAllInclusiveBonds()
clear bonds and add all inclusive ones (ie where both atoms are present)
EntityView Select(const String &query_string, QueryFlags flags=0) const
Select a structural subset of the entity view.
ResidueView FindResidue(const String &chain, const ResNum &num) const
ResidueView ViewForHandle(const ResidueHandle &residue) const
locate residue view for given residue handle
EntityViewVisitor interface.
#define DLLEXPORT_OST_MOL
boost::shared_ptr< EntityImpl > EntityImplPtr
std::pair< EntityView, EntityView > EntityViewPair
std::vector< BondHandle > BondHandleList
boost::shared_ptr< EntityViewData > EntityViewDataPtr
std::vector< AtomView > AtomViewList
std::vector< ResidueView > ResidueViewList
std::vector< ChainView > ChainViewList