OpenStructure
wrap_tmalign.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2020 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_BINDINGS_TMALIGN_H
20 #define OST_BINDINGS_TMALIGN_H
21 
22 #include <ost/geom/mat4.hh>
23 #include <ost/geom/vec3.hh>
25 #include <ost/mol/chain_view.hh>
26 #include <ost/mol/chain_handle.hh>
27 
28 namespace ost { namespace bindings {
29 
30 struct TMAlignResult {
31 
33 
34  TMAlignResult(Real rm, Real tm, Real tm_swp, int aln_l, const geom::Mat4& t,
35  const ost::seq::AlignmentHandle& aln): rmsd(rm),
36  tm_score(tm),
37  tm_score_swapped(tm_swp),
38  aligned_length(aln_l),
39  transform(t),
40  alignment(aln) { }
41 
42 
49 
50  Real GetTMScore() { return tm_score; }
52  Real GetRMSD() { return rmsd; }
53  int GetAlignedLength() { return aligned_length; }
54  const geom::Mat4& GetTransform() { return transform; }
56 };
57 
58 struct MMAlignResult {
59 
61 
62  MMAlignResult(Real rm, Real tm, Real tm_swp, int al, const geom::Mat4& t,
63  const ost::seq::AlignmentList& alns,
64  const std::vector<String>& e1c,
65  const std::vector<String>& e2c): rmsd(rm),
66  tm_score(tm),
67  tm_score_swapped(tm_swp),
68  aligned_length(al),
69  transform(t),
70  alignments(alns),
71  ent1_mapped_chains(e1c),
72  ent2_mapped_chains(e2c) { }
73 
74 
81  std::vector<String> ent1_mapped_chains;
82  std::vector<String> ent2_mapped_chains;
83 
84  Real GetTMScore() { return tm_score; }
86  Real GetRMSD() { return rmsd; }
87  int GetAlignedLength() { return aligned_length; }
88  const geom::Mat4& GetTransform() { return transform; }
90  const std::vector<String>& GetEnt1MappedChains() {return ent1_mapped_chains; }
91  const std::vector<String>& GetEnt2MappedChains() {return ent2_mapped_chains; }
92 };
93 
95  const geom::Vec3List& pos_two,
96  const ost::seq::SequenceHandle& seq1,
97  const ost::seq::SequenceHandle& seq2,
98  bool fast = false,
99  bool rna = false);
100 
101 MMAlignResult WrappedMMAlign(const std::vector<geom::Vec3List>& pos_one,
102  const std::vector<geom::Vec3List>& pos_two,
103  const ost::seq::SequenceList& seq1,
104  const ost::seq::SequenceList& seq2,
105  const std::vector<bool>& rna1,
106  const std::vector<bool>& rna2,
107  bool fast = false,
108  const std::map<int, int>& mapping =
109  std::map<int,int>());
110 
112  const ost::mol::ChainView& ent2,
113  bool fast = false);
114 
116  const ost::mol::EntityView& ent2,
117  bool fast = false,
118  const std::map<String, String>& mapping =
119  std::map<String, String>());
120 }} //ns
121 
122 #endif
definition of ChainView
Definition: chain_view.hh:37
definition of EntityView
Definition: entity_view.hh:86
representation of a multiple sequence alignemnt consisting of two or more sequences
mutable sequence handle.
list of sequences.
float Real
Definition: base.hh:44
MMAlignResult WrappedMMAlign(const std::vector< geom::Vec3List > &pos_one, const std::vector< geom::Vec3List > &pos_two, const ost::seq::SequenceList &seq1, const ost::seq::SequenceList &seq2, const std::vector< bool > &rna1, const std::vector< bool > &rna2, bool fast=false, const std::map< int, int > &mapping=std::map< int, int >())
TMAlignResult WrappedTMAlign(const geom::Vec3List &pos_one, const geom::Vec3List &pos_two, const ost::seq::SequenceHandle &seq1, const ost::seq::SequenceHandle &seq2, bool fast=false, bool rna=false)
std::vector< AlignmentHandle > AlignmentList
Definition: base.dox:1
const ost::seq::AlignmentList & GetAlignments()
Definition: wrap_tmalign.hh:89
const geom::Mat4 & GetTransform()
Definition: wrap_tmalign.hh:88
MMAlignResult(Real rm, Real tm, Real tm_swp, int al, const geom::Mat4 &t, const ost::seq::AlignmentList &alns, const std::vector< String > &e1c, const std::vector< String > &e2c)
Definition: wrap_tmalign.hh:62
ost::seq::AlignmentList alignments
Definition: wrap_tmalign.hh:80
const std::vector< String > & GetEnt1MappedChains()
Definition: wrap_tmalign.hh:90
std::vector< String > ent2_mapped_chains
Definition: wrap_tmalign.hh:82
const std::vector< String > & GetEnt2MappedChains()
Definition: wrap_tmalign.hh:91
std::vector< String > ent1_mapped_chains
Definition: wrap_tmalign.hh:81
ost::seq::AlignmentHandle alignment
Definition: wrap_tmalign.hh:48
const ost::seq::AlignmentHandle & GetAlignment()
Definition: wrap_tmalign.hh:55
const geom::Mat4 & GetTransform()
Definition: wrap_tmalign.hh:54
TMAlignResult(Real rm, Real tm, Real tm_swp, int aln_l, const geom::Mat4 &t, const ost::seq::AlignmentHandle &aln)
Definition: wrap_tmalign.hh:34