OpenStructure
Loading...
Searching...
No Matches
domain_find.hh
Go to the documentation of this file.
1#ifndef OST_MOL_ALG_DOMAIN_FIND_HH
2#define OST_MOL_ALG_DOMAIN_FIND_HH
3
5
6#include "module_config.hh"
7#include "contact_overlap.hh"
8
9namespace ost { namespace mol { namespace alg {
10
11struct Domain {
13 inter_s(0), inter_d(0), intra_s(0), intra_d(0), views(v) {}
14 Domain(): inter_s(0), inter_d(0), intra_s(0), intra_d(0) {}
15
20
21 bool operator==(const Domain& rhs) const {
22 return views==rhs.views && inter_s == rhs.inter_s &&
23 inter_d == rhs.inter_d && intra_s == rhs.intra_s &&
24 intra_d == rhs.intra_d;
25 }
27};
28
29
30class Domains;
31
32typedef boost::shared_ptr<Domains> DomainsPtr;
33
35public:
36
38 Real tolerance, Real radius, Real threshold,
39 int idx_a=-1, int idx_b=-1);
40
43 Real tolerance, int idx_a=-1, int idx_b=-1);
44
45 // version of domain find which operates on two distances matrices
46 // we on purpose only return the connected components, since the
47 // distance matrices may not need to correpsond to an actual
48 // entity view.
50 const DistanceMatrix& dmat_b,
51 Real tolerance,
52 Real radius,
53 Real threshold,
54 int num_threads,
55 bool defined_only,
56 bool adj_map);
57 size_t GetNumFreeResidues() const { return num_free_; }
58
59 Real GetFreeD() const { return free_d_; }
60 Real GetFreeS() const { return free_s_; }
61
62 const std::vector<Domain>& GetDomains() const { return domains_; }
63 const std::vector<int>& GetComponents() const { return components_; }
64
65 ost::img::ImageHandle GetAdjMap() const { return adj_map_; }
66private:
67 Domains(): num_free_(0), free_s_(0), free_d_(0) {}
68 // holds the steps of the algorithm. mainly for debuggin purposes
69 ost::img::ImageHandle adj_map_;
70 int num_free_;
71 Real free_s_;
72 Real free_d_;
73 std::vector<Domain> domains_;
74 std::vector<int> components_;
75};
76
77typedef std::map<int, Domain> DomainsMap;
78
79}}}
80#endif
81
Manage shared instances of images.
static DomainsPtr FromDistMats(const DistanceMatrix &dmat_a, const DistanceMatrix &dmat_b, Real tolerance, Real radius, Real threshold, int num_threads, bool defined_only, bool adj_map)
const std::vector< int > & GetComponents() const
size_t GetNumFreeResidues() const
static DomainsPtr FromAln(ost::seq::AlignmentHandle aln, Real tolerance, Real radius, Real threshold, int idx_a=-1, int idx_b=-1)
const std::vector< Domain > & GetDomains() const
static DomainsPtr FromCOM(const SimilarityMatrix &sim, ost::seq::AlignmentHandle aln, Real tolerance, int idx_a=-1, int idx_b=-1)
ost::img::ImageHandle GetAdjMap() const
representation of a multiple sequence alignemnt consisting of two or more sequences
float Real
Definition base.hh:44
#define DLLEXPORT_OST_MOL_ALG
boost::shared_ptr< Domains > DomainsPtr
std::map< int, Domain > DomainsMap
std::vector< EntityView > EntityViewList
Definition base.dox:1
Domain(const ost::mol::EntityViewList &v)
bool operator==(const Domain &rhs) const
ost::mol::EntityViewList views