clustering  0.12
Clustering suite for molecular dynamics trajectories.
 All Classes Namespaces Files Functions Variables Typedefs
density_clustering_mpi.hpp
1 /*
2 Copyright (c) 2015, Florian Sittel (www.lettis.net)
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without modification,
6 are permitted provided that the following conditions are met:
7 
8 1. Redistributions of source code must retain the above copyright notice,
9  this list of conditions and the following disclaimer.
10 
11 2. Redistributions in binary form must reproduce the above copyright notice,
12  this list of conditions and the following disclaimer in the documentation
13  and/or other materials provided with the distribution.
14 
15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
16 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
18 SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
20 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
22 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
23 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25 #pragma once
26 
27 #include "config.hpp"
28 #include "density_clustering.hpp"
29 
30 #include <vector>
31 
32 #include <boost/program_options.hpp>
33 
34 namespace Clustering {
35 namespace Density {
37 namespace MPI {
39  const int MAIN_PROCESS = 0;
42  std::vector<std::size_t>
43  calculate_populations(const float* coords,
44  const std::size_t n_rows,
45  const std::size_t n_cols,
46  const float radius,
47  const int mpi_n_nodes,
48  const int mpi_node_id);
51  std::map<float, std::vector<std::size_t>>
52  calculate_populations(const float* coords,
53  const std::size_t n_rows,
54  const std::size_t n_cols,
55  std::vector<float> radii,
56  const int mpi_n_nodes,
57  const int mpi_node_id);
60  std::tuple<Neighborhood, Neighborhood>
61  nearest_neighbors(const float* coords,
62  const std::size_t n_rows,
63  const std::size_t n_cols,
64  const std::vector<float>& free_energy,
65  const int mpi_n_nodes,
66  const int mpi_node_id);
69  std::set<std::size_t>
70  high_density_neighborhood(const float* coords,
71  const std::size_t n_cols,
72  const std::vector<FreeEnergy>& sorted_fe,
73  const std::size_t i_frame,
74  const std::size_t limit,
75  const float max_dist,
76  const int mpi_n_nodes,
77  const int mpi_node_id);
80  void
81  main(boost::program_options::variables_map args);
82 } // end namespace MPI
83 } // end namespace Density
84 } // end namespace Clustering
85 
const int MAIN_PROCESS
identify MPI process 0 as main process
std::tuple< Neighborhood, Neighborhood > nearest_neighbors(const float *coords, const std::size_t n_rows, const std::size_t n_cols, const std::vector< float > &free_energy, const int mpi_n_nodes, const int mpi_node_id)
void main(boost::program_options::variables_map args)
std::vector< std::size_t > calculate_populations(const float *coords, const std::size_t n_rows, const std::size_t n_cols, const float radius, const int mpi_n_nodes, const int mpi_node_id)
std::set< std::size_t > high_density_neighborhood(const float *coords, const std::size_t n_cols, const std::vector< FreeEnergy > &sorted_fe, const std::size_t i_frame, const std::size_t limit, const float max_dist, const int mpi_n_nodes, const int mpi_node_id)