Debian Codegraph @

include/BALL/DOCKING/COMMON/poseClustering.h

raw symbols SCIP
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4
5 #ifndef BALL_DOCKING_POSECLUSTERING_H
6 #define BALL_DOCKING_POSECLUSTERING_H
7
8 #ifndef BALL_DATATYPE_OPTIONS_H
9 # include <BALL/DATATYPE/options.h>
10 #endif
11
12 #ifndef BALL_DOCKING_COMMON_CONFORMATIONSET_H
13 # include <BALL/DOCKING/COMMON/conformationSet.h>
14 #endif
15
16 #ifndef BALL_MOLMEC_COMMON_SNAPSHOT_H
17 # include <BALL/MOLMEC/COMMON/snapShot.h>
18 #endif
19
20 #ifndef BALL_STRUCTURE_ATOMBIJECTION_H
21 # include <BALL/STRUCTURE/atomBijection.h>
22 #endif
23
24 #ifndef BALL_KERNEL_SYSTEM_H
25 # include <BALL/KERNEL/system.h>
26 #endif
27
28 #ifndef BALL_DATATYPE_STRING_H
29 # include <BALL/DATATYPE/string.h>
30 #endif
31
32 #ifndef BALL_MATHS_VECTOR3_H
33 # include <BALL/MATHS/vector3.h>
34 #endif
35
36 #ifndef BALL_MATHS_MATRIX44_H
37 # include <BALL/MATHS/matrix44.h>
38 #endif
39
40 #include <Eigen/Core>
41
42 #include <boost/shared_ptr.hpp>
43 #include <boost/variant.hpp>
44
45 // Boost 1.56+ implicitly deletes the copy constructors of stored_edge_properties. In order
46 // to automatically use the respective move constructor instead, ClusterProperties has to
47 // be _nothrow_ move constructible!
48 #ifndef BALL_HAS_NOEXCEPT
49 # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
50 # include <boost/graph/adjacency_list.hpp>
51 # undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
52 #else
53 # include <boost/graph/adjacency_list.hpp>
54 #endif
55
56 #include <set>
57 #include <iostream>
58
59 #ifdef BALL_HAS_TBB
60 # include <tbb/parallel_reduce.h>
61 # include <tbb/blocked_range.h>
62 #endif
63
64 //#define POSECLUSTERING_DEBUG 1
65 #undef POSECLUSTERING_DEBUG
66
67 namespace BALL
68 {
69 /** Pose Clustering
70 \ingroup DockingMiscellaneous
71 */
72
73 /** \brief Computation of clusters of docking poses.
74
75 This class computes clusters of docking poses given as a
76 conformation set using a complete linkage algorithm.
77
78 The class assumes the following setup
79 - a pairwise rigid protein-protein docking
80 - all receptor-ligand poses have already been mapped onto each other
81 such that the "receptors" are kept fixed
82 - the given pose set only contains the "ligands"
83
84 We offer several algorithms via the option CLUSTER_METHOD:
85
86 - TRIVIAL_COMPLETE_LINKAGE: a naive implementation, that guarantees an optimal final partition.
87 - CLINK_DEFAYS as described in
88 D. Defays: An efficient algorithm for a complete link method.
89 The Computer Journal. 20, 4, British Computer Society, 1977, p. 364-366.
90 Please note that this implementation does not guarantee to find the best final clustering!
91 - NEAREST_NEIGHBOR_CHAIN_WARD as described in
92 Murtagh, Fionn (1983): "A survey of recent advances in hierarchical clustering algorithms",
93 The Computer Journal 26 (4): 354–359
94 Note that this algorithm computes a full clustering.
95 - SLINK_SIBSON as described in
96 R. Sibson: SLINK: an optimally efficient algorithm for the single-link cluster method.
97 The Computer Journal. 16, 1, British Computer Society, 1973, p. 30-34
98
99
100 The scope of the scoring (the atoms to be considered) can be defined via the option RMSD_LEVEL_OF_DETAIL.
101 If the option is set to PROPERTY_BASED_ATOM_BIJECTION, arbitrary sets of atoms, e.g. binding pockets,
102 can be used by assigning property named "ATOMBIJECTION_RMSD_SELECTION" to the respective atoms in the
103 reference system.
104 See also BALL::Expression.
105
106 The minimal rmsd or ward distance between the final clusters can be defined via option DISTANCE_THRESHOLD.
107 In order to relate RMSD and ward distance, we use sqrt(ward_dist / number_of_selected_atoms)
108 for threshold extraction.
109
110 The nearest neighbor chain ward clustering in principle computes a full clustering.
111 Option DISTANCE_THRESHOLD gives a ward distance that is automatically used to extract clusters.
112 Further extractions with different thresholds are possible.
113
114 The complete linkage algorithms guarantee a minimal cluster distance (max RMSD between all pairs
115 of two clusters), specified with option DISTANCE_THRESHOLD.
116
117 The initial poses can be given as ConformationSet or as transformation file, i.e. translation and
118 rotation of each pose.
119 Depending on this choice, the option RMSD_TYPE has to be set to SNAPSHOT_RMSD or RIGID_RMSD.
120 If RMSD_TYPE is set to CENTER_OF_MASS_DISTANCE, the option RMSD_LEVEL_OF_DETAIL will be ignored.
121
122 By setting the option RUN_PARALLEL to true, the user can request parallel execution. This will be performed
123 if the execution environment is enabled (BALL_HAS_TBB), and if the algorithm supports it.
124 */
125
126 class BALL_EXPORT PoseClustering
127 {
128 public:
129 /** @name Constant Definitions
130 */
131 //@{
132 /// Option names
133 struct BALL_EXPORT Option
134 {
135 /** the clustering method
136 */
137 static const String CLUSTER_METHOD;
138
139 /** the threshold for minimal required cluster distance
140 */
141 static const String DISTANCE_THRESHOLD;
142
143 /** the level of detail when computing the RMSD
144 */
145 static const String RMSD_LEVEL_OF_DETAIL;
146
147 /** the computation type of the cluster distance meassure
148 */
149 static const String RMSD_TYPE;
150
151 /** flag for requesting parallel execution
152 */
153 static const String RUN_PARALLEL;
154
155 };
156
157 /// Default values for options
158 struct BALL_EXPORT Default
159 {
160 static const Index CLUSTER_METHOD;
161 static const float DISTANCE_THRESHOLD;
162 static const Index RMSD_LEVEL_OF_DETAIL;
163 static const Index RMSD_TYPE;
164 static const bool RUN_PARALLEL;
165 static const bool USE_CENTER_OF_MASS_PRECLINK;
166 };
167
168 enum BALL_EXPORT RMSDType
169 {
170 SNAPSHOT_RMSD,
171 RIGID_RMSD,
172 CENTER_OF_MASS_DISTANCE
173 };
174
175 enum BALL_EXPORT RMSDLevelOfDetail
176 {
177 C_ALPHA, //=0
178 HEAVY_ATOMS,
179 BACKBONE,
180 ALL_ATOMS,
181 PROPERTY_BASED_ATOM_BIJECTION
182 };
183
184 enum BALL_EXPORT ClusterMethod
185 {
186 TRIVIAL_COMPLETE_LINKAGE,
187 SLINK_SIBSON,
188 CLINK_DEFAYS,
189 NEAREST_NEIGHBOR_CHAIN_WARD,
190 CLINK_ALTHAUS
191 };
192
193 class BALL_EXPORT RigidTransformation
194 {
195 public:
196 RigidTransformation() {};
197
198 RigidTransformation(Eigen::Vector3f const& new_trans, Eigen::Matrix3f const& new_rot)
199 : translation(new_trans),
200 rotation(new_rot)
201 {}
202
203 Eigen::Vector3f translation;
204 Eigen::Matrix3f rotation;
205 };
206
207 /** Data type for the poses.
208 * A pose can either be a rigid transformation (translation + rotation), or
209 * a SnapShot.
210 */
211 class BALL_EXPORT PosePointer
212 {
213 public:
214 PosePointer(RigidTransformation const* new_trafo, SnapShot const* new_snap = 0)
215 : trafo(new_trafo),
216 snap(new_snap)
217 { }
218
219 PosePointer(SnapShot const* new_snap)
220 : trafo(0),
221 snap(new_snap)
222 { }
223
224 RigidTransformation const* trafo;
225 SnapShot const* snap;
226 };
227
228 class BALL_EXPORT ClusterProperties
229 {
230 public:
231 ClusterProperties();
232 ClusterProperties(const ClusterProperties&);
233
234 ClusterProperties& operator=(const ClusterProperties&);
235
236 ClusterProperties(ClusterProperties&&) BALL_NOEXCEPT;
237 ClusterProperties& operator=(ClusterProperties&&) BALL_NOEXCEPT;
238
239 /** Serialization method
240 */
241 template <class Archive>
242 void serialize(Archive& ar, const unsigned int version);
243
244 /** The poses contained in this cluster.
245 */
246 std::set<Index> poses;
247
248 /** The number of poses contained in this cluster.
249 */
250 Size size;
251
252 /** The center of the cluster.
253 * Depending on the type of transformations we allow,
254 * this is either stored as a rigid transformation or
255 * as the 3N-dimensional vector given by the atom
256 * coordinates. The special case of using only the center
257 * of mass is achieved by setting the rotation matrix to
258 * identity.
259 */
260 boost::variant<Eigen::VectorXf, RigidTransformation> center;
261
262 /** The value at which this cluster is merged with its sibling.
263 */
264 float merged_at;
265 #ifdef POSECLUSTERING_DEBUG
266 /** The cluster_idx assigend by last call of method extractClustersForThreshold
267 */
268 float current_cluster_id;
269 #endif
270 };
271
272 typedef boost::adjacency_list<boost::vecS,
273 boost::vecS,
274 boost::directedS,
275 ClusterProperties,
276 boost::no_property,
277 unsigned int> ClusterTree;
278
279 typedef ClusterTree::vertex_descriptor ClusterTreeNode;
280
281 BALL_CREATE(PoseClustering);
282
283 /** Constructors and Destructor */
284 //@{
285
286 /// Default constructor.
287 PoseClustering();
288
289 /// Detailed constructor.
290 /// (TODO: really pass a pointer here?)
291 PoseClustering(ConformationSet* poses, float rmsd);
292
293 /// PoseClustering for a given set of rigid transformations of a base structure
294 PoseClustering(System const& base_system, String transformation_file_name);
295
296 ///
297 virtual ~PoseClustering();
298 //@}
299
300
301 /** @name operation methods */
302 //@{
303
304 /** start method.
305 */
306 bool compute();
307
308 //@}
309
310 /** @name Access methods
311 */
312 //@{
313
314 /// sets the poses to be clustered, the conformation set's reference system will the base system
315 void setConformationSet(ConformationSet* new_set, bool precompute_atombijection = false);
316
317 /** Set a vector of PosePointers to be clustered
318 * Poses (RigidTransformations or SnapShots) can live outside of this class and will not be
319 * destroyed.
320 */
321 void setBaseSystemAndPoses(System const& base_system, std::vector<PosePointer> const& poses);
322
323 /// reads the poses given as transformations from a file and update the covariance matrix
324 /// Note: the given system will be taken as reference, e.g. all transformations
325 // will be applied upon the current conformation
326 void setBaseSystemAndTransformations(System const& base_system, String transformation_file_name);
327
328 /// returns the poses to be clustered as ConformationSet
329 const ConformationSet* getConformationSet() const {return current_set_;}
330
331 /// returns the poses to be clustered as ConformationSet
332 ConformationSet* getConformationSet() {return current_set_;}
333
334 /// returns the poses as rigid transformations
335 const std::vector<RigidTransformation> & getRigidTransformations() const {return transformations_;}
336
337 /// returns the centers of mass-vector (non-empty only for CENTER_OF_MASS_DISTANCE)
338 std::vector<Vector3> & getCentersOfMass() {return com_;}
339
340 /// returns the centers of mass-vector, const version (non-empty only for CENTER_OF_MASS_DISTANCE)
341 std::vector<Vector3> const & getCentersOfMass() const {return com_;}
342
343 /// returns the reference pose
344 const System& getSystem() const;
345
346 /// returns the reference pose
347 System& getSystem();
348
349 /// returns the number of poses
350 Size getNumberOfPoses() const {return poses_.size();}
351
352 /// returns the number of clusters found
353 Size getNumberOfClusters() const {return clusters_.size();}
354
355 /// returns indices of all poses assigned to cluster i
356 /// Note: enumeration starts with 0
357 const std::set<Index>& getCluster(Index i) const;
358
359 /// returns indices of all poses assigned to cluster i
360 /// Note: enumeration starts with 0
361 std::set<Index>& getCluster(Index i);
362
363 /// returns the size of cluster i
364 Size getClusterSize(Index i) const;
365
366 /// returns the score of cluster i
367 float getClusterScore(Index i) const;
368
369 /// returns the score between two poses given as systems
370 float getScore(const System sys_a, const System sys_b, Options options) const;
371
372 /// returns a reference to the cached AtomBijection
373 AtomBijection& getAtomBijection() {return atom_bijection_;}
374
375 /// returns a const reference to the cached AtomBijection
376 AtomBijection const& getAtomBijection() const {return atom_bijection_;}
377
378 /// apply a transformation to a given system
379 void applyTransformation2System(Index i, System& target_system);
380
381 /// convert the poses to SnapShots
382 void convertTransformations2Snaphots();
383
384 /// convert the poses to rigid transformations
385 void convertSnaphots2Transformations();
386
387 /// returns the complete linkage RMSD of cluster i
388 float computeCompleteLinkageRMSD(Index i, Options options, bool initialize = true);
389
390 /// returns the complete linkage RMSD of a pose set
391 //float computeCompleteLinkageRMSD(boost::shared_ptr<ConformationSet> cluster, Option options) const;
392
393 /// returns the pose i as system
394 boost::shared_ptr<System> getPose(Index i) const;
395
396 /// returns poses as PosePointer
397 std::vector<PosePointer> const& getPoses() const {return poses_;}
398
399 /// returns the "central cluster" conformation of cluster i as system
400 boost::shared_ptr<System> getClusterRepresentative(Index i);
401
402 /// returns the index of the cluster representative
403 Index findClusterRepresentative(Index i);
404
405 /// returns cluster i as ConformationSet
406 boost::shared_ptr<ConformationSet> getClusterConformationSet(Index i);
407
408 /// returns a ConformationSet containing one structure per cluster
409 boost::shared_ptr<ConformationSet> getReducedConformationSet();
410
411 /** Refine a given clustering.
412 * This function can be used to refine a precomputed clustering further. An important
413 * use case would be to pre-cluster using an efficient rmsd implementation (e.g., center
414 * of mass or rigid rmsd), and then refine the resulting clusters with the general (i.e.,
415 * snapshot based) rmsd.
416 *
417 * NOTE: This function requires that clusters have already been computed. In the case of
418 * a full hierarchical clustering, extractClustersForThreshold or extractNBestClusters
419 * must have been called previously.
420 *
421 * @param refined_options The parameters for the refinment step.
422 *
423 */
424 bool refineClustering(Options const& refined_options);
425
426 //@}
427
428 /** @name Public Attributes
429 */
430 //@{
431 /// options
432 Options options;
433
434 /** reset the options to default values
435 */
436 void setDefaultOptions();
437
438 //@}
439
440 /** @name rigid transformation methods */
441 //@{
442
443 /** Compute the root mean square deviation due to a rigid transformation of a point cloud (here, atoms)
444 * @param t_ab difference vector between the transformations to be compared
445 * @param M_ab difference of the rotation matrices between the transformations to be compared
446 * @param covariance_matrix the covariance matrix of the atom positions
447 */
448 static float getRigidRMSD(Eigen::Vector3f const& t_ab, Eigen::Matrix3f const& M_ab, Eigen::Matrix3f const& covariance_matrix);
449
450 /** Compute the mean square deviation due to a rigid transformation of a point cloud (here, atoms)
451 * @param t_ab difference vector between the transformations to be compared
452 * @param M_ab difference of the rotation matrices between the transformations to be compared
453 * @param covariance_matrix the covariance matrix of the atom positions
454 */
455 static float getSquaredRigidRMSD(Eigen::Vector3f const& t_ab, Eigen::Matrix3f const& M_ab, Eigen::Matrix3f const& covariance_matrix);
456
457 /** Compute the covariance matrix for the given system
458 */
459 static Eigen::Matrix3f computeCovarianceMatrix(System const& system, Index rmsd_level_of_detail = C_ALPHA);
460
461 //@}
462
463 /** @name methods given a full clustering */
464 //@{
465
466 /** Extract clusters wrt a threshold if a complete clustering was performed
467 * Note: the Ward distance does not equal the rmsd.
468 * We use threshold = sqrt(ward_dist / number_of_selected_atoms).
469 * see NEAREST_NEIGHBOR_CHAIN_WARD
470 */
471 std::vector<std::set<Index> > extractClustersForThreshold(float threshold, Size min_size = 0);
472
473 /** returns the first up to n clusters if previously a complete clustering was performed
474 * see NEAREST_NEIGHBOR_CHAIN_WARD
475 */
476 std::vector<std::set<Index> > extractNBestClusters(Size n);
477
478 /** filters the current cluster set wrt to a minimal cluster size
479 * see NEAREST_NEIGHBOR_CHAIN_WARD
480 */
481 std::vector<std::set<Index> > filterClusters(Size min_size = 1);
482
483 /** Export the cluster tree to boost::serialize format.
484 */
485 void serializeWardClusterTree(std::ostream& out, bool binary = false);
486
487 /** Import the cluster tree from boost::serialize format.
488 */
489 void deserializeWardClusterTree(std::istream& in, bool binary = false);
490
491 /** Export the cluster tree in graphviz format.
492 */
493 void exportWardClusterTreeToGraphViz(std::ostream& out);
494
495 /** Export the cluster tree in JSON format.
496 */
497 void exportClusterTreeToJSON(std::ostream& out);
498
499 //@}
500
501
502 /// print the clusters as set of pose indices
503 /// Note: start counting with 0
504 void printClusters(std::ostream& out = std::cout) const;
505
506 /// print clusters of pose indices with RMSD between clusters
507 /// Note: start counting with 0
508 void printClusterScores(std::ostream& out = std::cout);
509
510
511 protected:
512
513 #ifdef BALL_HAS_TBB
514 /** A nested class used for parallel execution of the nearest neighbour chain algorithm.
515 */
516 class ComputeNearestClusterTask_
517 {
518 public:
519 /// Default constructor.
520 ComputeNearestClusterTask_(PoseClustering* parent,
521 const std::vector<ClusterTreeNode>& active_clusters,
522 Position current_cluster,
523 Index rmsd_type);
524
525 /// Splitting constructor.
526 ComputeNearestClusterTask_(ComputeNearestClusterTask_& cnct, tbb::split);
527
528 /// Join two partial results
529 void join(ComputeNearestClusterTask_ const& cnct);
530
531 /// The minimum computation
532 void operator() (const tbb::blocked_range<size_t>& r);
533
534 /// Return the minimum index
535 Position getMinIndex() {return my_min_index_;}
536
537 /// Return the minimum value
538 float getMinValue() {return my_min_value_;}
539
540 protected:
541 // the PoseClustering instance that called us
542 PoseClustering* parent_;
543
544 // the array we work on
545 const std::vector<ClusterTreeNode>& active_clusters_;
546
547 // the cluster to compare to everything else
548 Position current_cluster_;
549
550 // the kind of rmsd computation desired
551 Index rmsd_type_;
552
553 // the minimum index in our own block
554 Position my_min_index_;
555
556 // the minimum value in our own block
557 float my_min_value_;
558 };
559 #endif
560
561 /** A nested class used for exporting cluster trees to graphviz format
562 */
563 class ClusterTreeWriter_
564 {
565 public:
566 ClusterTreeWriter_(ClusterTree const* cluster_tree)
567 : cluster_tree_(cluster_tree)
568 { }
569
570 void operator() (std::ostream& out, const ClusterTreeNode& v) const;
571
572 protected:
573 ClusterTree const* cluster_tree_;
574 };
575
576 /** A nested class for our cluster tree node priorization
577 */
578 class ClusterTreeNodeComparator
579 {
580 public:
581 ClusterTreeNodeComparator(ClusterTree& cluster_tree)
582 : cluster_tree_(&cluster_tree)
583 {}
584
585 bool operator() (ClusterTreeNode const first, ClusterTreeNode const second) const
586 {
587 float first_value = (*cluster_tree_)[ first].merged_at;
588 float second_value = (*cluster_tree_)[second].merged_at;
589
590 return first_value < second_value;
591 }
592
593 protected:
594 ClusterTree* cluster_tree_;
595 };
596
597 // trivial complete linkage implementation
598 // with O(n^2) space request
599 bool trivialCompute_();
600
601 // space efficient (SLINK or CLINK) clustering
602 bool linearSpaceCompute_();
603
604 //
605 bool althausCompute_();
606
607 // implementation of a single linkage clustering as described in
608 // R. Sibson: SLINK: an optimally efficient algorithm for the single-link cluster method.
609 // The Computer Journal. 16, 1, British Computer Society, 1973, p. 30-34
610 void slinkInner_(int current_level);
611
612 // implementation of a complete linkage clustering as described in
613 // D. Defays: An efficient algorithm for a complete link method.
614 // The Computer Journal. 20, 4, British Computer Society, 1977, p. 364-366.
615 void clinkInner_(int current_level);
616
617 // implememtation of the nearest neighbor chain clustering algorithm
618 // as described in:
619 // Murtagh, Fionn (1983): "A survey of recent advances in hierarchical clustering algorithms",
620 // The Computer Journal 26 (4): 354–359
621 bool nearestNeighborChainCompute_();
622
623 void initWardDistance_(Index rmsd_type);
624
625 void updateWardDistance_(ClusterTreeNode parent, ClusterTreeNode i, ClusterTreeNode j, Index rmsd_type);
626
627 float computeWardDistance_(ClusterTreeNode i, ClusterTreeNode j, Index rmsd_type);
628
629 std::set<Index> collectClusterBelow_(ClusterTreeNode const& v);
630
631 // compute the center of masses
632 void computeCenterOfMasses_();
633
634 // precompute an atom bijection for faster access
635 void precomputeAtomBijection_();
636
637 // check the given atom wrt choice of option RMSD_LEVEL_OF_DETAIL
638 bool static isExcludedByLevelOfDetail_(Atom const* atom, Index rmsd_level_of_detail);
639
640 // distance between cluster i and cluster j
641 float getClusterRMSD_(Index i, Index j, Index rmsd_type);
642
643 // reads the poses given as transformations from a file
644 // Note: the previously given system will be taken
645 // as untransformed reference, e.g. all transformations
646 // will be applied upon the current conformation
647 bool readTransformationsFromFile_(String filename);
648
649 // compute the RMSD between two "poses"
650 float getRMSD_(Index i, Index j, Index rmsd_type);
651
652 // store pointers to the snapshots in the poses vector
653 void storeSnapShotReferences_();
654
655 //
656 void printCluster_(Size i, std::ostream& out = std::cout) const;
657
658 //
659 void printVariables_(int a, int b, double c, int d, double e, int current_level);
660
661 //
662 void clear_();
663
664 // Used by exportClusterTreeToJSON
665 void exportToJSONDFS_(ClusterTreeNode const& current, String& result);
666
667 // only used by trivial clustering
668 Eigen::MatrixXd pairwise_scores_;
669
670 /// the ConformationSet we wish to cluster
671 ConformationSet* current_set_;
672
673 /// the clusters: sets of pose indices
674 std::vector< std::set<Index> > clusters_;
675
676 std::vector< Index > cluster_representatives_;
677
678 /// the scores of the clusters
679 std::vector< float > cluster_scores_;
680
681 /// the RMSD definition used for clustering
682 Index rmsd_level_of_detail_;
683
684
685 // ----- unified access to the poses, independent of their type
686 // (the poses are either stored in transformations_, or in current_set_)
687 std::vector<PosePointer> poses_;
688
689 // ----- data structure for transformation input (instead of snapshots)
690 std::vector<RigidTransformation> transformations_;
691
692 Eigen::Matrix3f covariance_matrix_;
693
694 // TODO: maybe use a const - ptr instead?
695 System base_system_;
696
697 // the reference state
698 SnapShot base_conformation_;
699
700 // flag indicating the use of transformation as input
701 bool has_rigid_transformations_;
702
703 // do we need to delete the conformation set, that was
704 // created by converting transformations to snapshots
705 bool delete_conformation_set_;
706
707 // ------ data structures for slink and clink
708
709 // stores the distance at which this indexed element has longer
710 // the largest index of its cluster
711 std::vector<double> lambda_;
712
713 // the index of the cluster representative at merge-time
714 // (element with largest index)
715 std::vector<int> pi_;
716
717 std::vector<double> mu_;
718
719
720 // ----- data structures for nearest neighbor chain ward
721 Size number_of_selected_atoms_;
722
723 // ----- data structure for CENTER_OF_GRAVITY_CLINK
724
725 // the geometric center of mass
726 std::vector<Vector3> com_;
727
728 // ----- general data structures
729
730 // We cache the atom bijection for faster
731 // RMSD computation; this is possible, since the system topology does
732 // not change
733 AtomBijection atom_bijection_;
734
735 // helper dummies to speed up snapshot application
736 System system_i_;
737 System system_j_;
738
739 /// The tree built during hierarchical clustering
740 ClusterTree cluster_tree_;
741 }; //class PoseClustering
742 } //namesspace BALL
743
744 #endif // BALL_DOCKING_POSECLUSTERING_H