OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
contact_overlap.hh
Go to the documentation of this file.
1 #ifndef OST_MOL_ALG_CONTACT_HH
2 #define OST_MOL_ALG_CONTACT_HH
3 
4 #include <boost/shared_ptr.hpp>
5 
6 #include <ost/mol/entity_view.hh>
7 #include <ost/img/image.hh>
9 
10 
11 #include "module_config.hh"
12 #include "similarity_matrix.hh"
13 
14 namespace ost { namespace mol { namespace alg {
15 
16 struct Contact {
17  Contact(): atom_a(), atom_b() {}
19  atom_a(a), atom_b(b)
20  { }
23 
24  bool operator==(const Contact& rhs) const
25  {
26  return atom_a==rhs.atom_a && atom_b==rhs.atom_b;
27  }
28 
29  bool operator!=(const Contact& rhs) const
30  {
31  return !this->operator==(rhs);
32  }
33 };
34 
35 typedef std::vector<Contact> ContactList;
36 
39 Contacts(const ost::mol::EntityView& ent, Real min_dist,
40  Real max_dist);
41 
42 typedef enum {
45 } OverlapMode;
49 
50 struct LDT {
54 };
55 
57 
58 typedef boost::shared_ptr<DistanceMatrix> DistanceMatrixPtr;
59 
61 public:
62  static DistanceMatrixPtr Create(const ost::seq::ConstSequenceHandle& s);
63  static DistanceMatrixPtr FromAln(const ost::seq::AlignmentHandle& a,
64  int index=1);
65 private:
67  DistanceMatrix(const ost::seq::AlignmentHandle& aln, int index);
68 
69 };
70 
71 
73  const DistanceMatrixPtr& rhs,
74  Real tolerance,
76  Real dist_limit=1e6);
77 
78 
81  const ost::mol::EntityView& ref,
82  Real max_dist,
83  Real tolerance=0.02,
84  bool only_complete=false);
85 
87 ContactOverlapMap(const ost::seq::AlignmentHandle& target_tpl_aln,
88  Real tolerance, int idx_a, int idx_b);
89 
91 ContactOverlapMap(const ost::seq::AlignmentHandle& target_tpl_aln,
92  Real tolerance, OverlapMode mode=OM_RELATIVE,
93  Real max_dist=1e6);
94 
96 ContactOverlapMap(const DistanceMatrix& dmat1, const DistanceMatrix& dmat2,
97  Real tolerance, OverlapMode mode=OM_RELATIVE,
98  Real max_dist=1e6);
99 
100 
101 //ost::img::ImageHandle
104  Real tolerance, int idx_a=-1, int idx_b=-1);
105 
106 }}}
107 
108 #endif
std::vector< Contact > ContactList
#define DLLEXPORT_OST_MOL_ALG
ost::mol::AtomHandle atom_b
Handle to atom datatype.
Definition: atom_handle.hh:37
float Real
Definition: base.hh:44
bool operator!=(const Contact &rhs) const
bool operator==(const Contact &rhs) const
ost::mol::AtomHandle atom_a
triangular matrix template
Definition: tri_matrix.hh:13
void DLLIMPORT CalcContactNodeDegree(const ContactList &contacts)
calculates and assigns the contact node degree as the int property &#39;degree&#39; for each atom ...
boost::shared_ptr< DistanceMatrix > DistanceMatrixPtr
Real DLLIMPORT LocalDistanceTest(const ost::mol::EntityView &mdl, const ost::mol::EntityView &ref, Real max_dist, Real tolerance=0.02, bool only_complete=false)
Contact(ost::mol::AtomHandle a, ost::mol::AtomHandle b)
SimilarityMatrix DLLIMPORT ContactOverlapMap(const ost::seq::AlignmentHandle &target_tpl_aln, Real tolerance, int idx_a, int idx_b)
definition of EntityView
Definition: entity_view.hh:86
representation of a multiple sequence alignemnt consisting of two or more sequences ...
ContactList DLLIMPORT Contacts(const ost::mol::EntityView &ent, Real min_dist, Real max_dist)
returns a a list of contacts between C-alpha atoms
void DLLIMPORT DomainsFromCOM(const SimilarityMatrix &sim, ost::seq::AlignmentHandle aln, Real tolerance, int idx_a=-1, int idx_b=-1)
Real DLLIMPORT ContactOverlap(const DistanceMatrixPtr &lhs, const DistanceMatrixPtr &rhs, Real tolerance, OverlapMode mode=OM_RELATIVE, Real dist_limit=1e6)