00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef OST_SUPERPOSITION_HH
00024 #define OST_SUPERPOSITION_HH
00025
00026 #include <ost/base.hh>
00027 #include <ost/geom/geom.hh>
00028 #include <ost/mol/mol.hh>
00029 #include <ost/mol/alg/module_config.hh>
00030
00031 namespace ost { namespace mol { namespace alg {
00032
00037 struct DLLEXPORT_OST_MOL_ALG SuperpositionResult {
00038 SuperpositionResult()
00039 : ncycles(0), rmsd(0.0), transformation() {
00040 }
00041 int ncycles;
00042 Real rmsd;
00043 geom::Mat4 transformation;
00044 mol::EntityView entity_view1;
00045 mol::EntityView entity_view2;
00046 };
00047
00048 class SuperposerSVDImpl;
00049
00052 class DLLEXPORT_OST_MOL_ALG SuperposerSVD {
00053 public:
00054 SuperposerSVD(int natoms, bool alloc_atoms);
00055 ~SuperposerSVD();
00056 SuperpositionResult Run(const mol::EntityView& ev1,
00057 const mol::EntityView& ev2);
00058
00059 SuperpositionResult Run(const mol::AtomViewList& atoms1,
00060 const mol::AtomViewList& atoms2);
00061
00062 SuperpositionResult Run(const std::vector<geom::Vec3>& pl1,
00063 const std::vector<geom::Vec3>& pl2);
00064
00065 private:
00066 SuperposerSVDImpl* impl_;
00067 };
00068
00070 SuperpositionResult DLLEXPORT_OST_MOL_ALG SuperposeAtoms(const mol::AtomViewList& atoms1,
00071 const mol::AtomViewList& atoms2,
00072 bool apply_transform);
00074 SuperpositionResult DLLEXPORT_OST_MOL_ALG SuperposeSVD(const mol::EntityView& ev1,
00075 const mol::EntityView& ev2,
00076 bool apply_transform);
00077
00079 SuperpositionResult DLLEXPORT_OST_MOL_ALG SuperposeSVD(const std::vector<geom::Vec3>& pl1,
00080 const std::vector<geom::Vec3>& pl2);
00081
00083 SuperpositionResult DLLEXPORT_OST_MOL_ALG IterativeSuperposition(mol::EntityView& ev1,
00084 mol::EntityView& ev2,
00085 int ncycles,
00086 Real distance_threshold,
00087 bool apply_transform);
00088
00090 Real DLLEXPORT_OST_MOL_ALG CalculateRMSD(const mol::EntityView& ev1,
00091 const mol::EntityView& ev2,
00092 const geom::Mat4& transformation);
00093
00094
00099 }}}
00100 #endif