IMP  2.0.1
The Integrative Modeling Platform
anchor_utilities.h
Go to the documentation of this file.
1 /**
2  * \file IMP/multifit/anchor_utilities.h
3  * \brief Common functions in anchor calculations
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPMULTIFIT_ANCHOR_UTILITIES_H
10 #define IMPMULTIFIT_ANCHOR_UTILITIES_H
11 
12 #include <IMP/multifit/multifit_config.h>
13 #include <IMP/atom/Hierarchy.h>
14 #include <IMP/statistics/internal/VQClustering.h>
15 #include <IMP/statistics/internal/DataPoints.h>
16 #include "DataPointsAssignment.h"
17 #include "anchors_reader.h"
18 
19 IMPMULTIFIT_BEGIN_NAMESPACE
20 
21 IMPMULTIFITEXPORT
22 inline AnchorsData molecule2anchors(atom::Hierarchy mh,int k) {
23  IMP_NEW(IMP::statistics::internal::ParticlesDataPoints,ddp,
24  (core::get_leaves(mh)));
25  IMP::statistics::internal::VQClustering vq(ddp,k);
26  vq.run();
27  multifit::DataPointsAssignment assignment(ddp,&vq);
28  multifit::AnchorsData ad(
29  assignment.get_centers(),
30  *(assignment.get_edges()));
31  return ad;
32 }
33 
34 IMPMULTIFITEXPORT
35 //! Generate anchors in several formats for a given density map.
36 void get_anchors_for_density(em::DensityMap *dmap, int number_of_means,
37  float density_threshold,
38  std::string pdb_filename,
39  std::string cmm_filename,
40  std::string seg_filename,
41  std::string txt_filename);
42 
43 //! Get lists of anchors that match a sequence of secondary structures
44 /**
45  \param[in] ad The AnchorsData
46  \param[in] sse_ps The SecondaryStructureResidue particles to match
47  \param[in] min_correlation SecondaryStructureResidue match must be
48  below this value (0.816 is rmsd of known SSE to random)
49 */
50 IMPMULTIFITEXPORT
52  const AnchorsData &ad,
53  const atom::SecondaryStructureResidues &ssrs,
54  Float max_rmsd=0.7);
55 
56 IMPMULTIFIT_END_NAMESPACE
57 
58 #endif /* IMPMULTIFIT_ANCHOR_UTILITIES_H */