OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
svd_superpose.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-2011 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 
20 /*
21  * Author Juergen Haas
22  */
23 #ifndef OST_SUPERPOSITION_HH
24 #define OST_SUPERPOSITION_HH
25 
26 #include <ost/base.hh>
27 #include <ost/geom/geom.hh>
28 #include <ost/mol/entity_view.hh>
30 
31 namespace ost { namespace mol {
32 
33 class EntityHandle;
34 
35 namespace alg {
36 
43  : ncycles(0), rmsd(0.0), transformation() {
44  }
45  int ncycles;
50 };
51 
52 class SuperposerSVDImpl;
53 
57 public:
58  SuperposerSVD(int natoms, bool alloc_atoms);
59  ~SuperposerSVD();
60  SuperpositionResult Run(const mol::EntityView& ev1,
61  const mol::EntityView& ev2);
62 
63  SuperpositionResult Run(const mol::AtomViewList& atoms1,
64  const mol::AtomViewList& atoms2);
65 
66  SuperpositionResult Run(const std::vector<geom::Vec3>& pl1,
67  const std::vector<geom::Vec3>& pl2);
68 
69 private:
70  SuperposerSVDImpl* impl_;
71 };
72 
75  const mol::AtomViewList& atoms2,
76  bool apply_transform);
79  const mol::EntityView& ev2,
80  bool apply_transform);
81 
83 SuperpositionResult DLLEXPORT_OST_MOL_ALG SuperposeSVD(const std::vector<geom::Vec3>& pl1,
84  const std::vector<geom::Vec3>& pl2);
85 
88  mol::EntityView& ev2,
89  int ncycles,
90  Real distance_threshold,
91  bool apply_transform);
92 
95  const mol::EntityView& ev2,
96  const geom::Mat4& transformation);
97 
98 
103 }}}//ns
104 #endif