OpenStructure
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/mol.hh>
30 
31 namespace ost { namespace mol { namespace alg {
32 
39  : ncycles(0), rmsd(0.0), transformation() {
40  }
41  int ncycles;
46 };
47 
48 class SuperposerSVDImpl;
49 
53 public:
54  SuperposerSVD(int natoms, bool alloc_atoms);
55  ~SuperposerSVD();
56  SuperpositionResult Run(const mol::EntityView& ev1,
57  const mol::EntityView& ev2);
58 
59  SuperpositionResult Run(const mol::AtomViewList& atoms1,
60  const mol::AtomViewList& atoms2);
61 
62  SuperpositionResult Run(const std::vector<geom::Vec3>& pl1,
63  const std::vector<geom::Vec3>& pl2);
64 
65 private:
66  SuperposerSVDImpl* impl_;
67 };
68 
71  const mol::AtomViewList& atoms2,
72  bool apply_transform);
75  const mol::EntityView& ev2,
76  bool apply_transform);
77 
79 SuperpositionResult DLLEXPORT_OST_MOL_ALG SuperposeSVD(const std::vector<geom::Vec3>& pl1,
80  const std::vector<geom::Vec3>& pl2);
81 
84  mol::EntityView& ev2,
85  int ncycles,
86  Real distance_threshold,
87  bool apply_transform);
88 
91  const mol::EntityView& ev2,
92  const geom::Mat4& transformation);
93 
94 
99 }}}//ns
100 #endif