8 #include <gromacs/trajectoryanalysis.h>
9 // #include <gromacs/trajectoryanalysis/topologyinformation.h>
11 #include "/home/titov_ai/Develop/gromacs-original/src/gromacs/trajectoryanalysis/topologyinformation.h"
13 #include "gtest/gtest.h"
22 class correlationType {
29 // конструктор класса для инициализации
32 correlationType(std::vector< RVec > ref, int wnd, int taau, int tau_st, float crlUp, float effRad, int mod, std::string out, std::vector< int > indx, std::vector< std::vector < std::vector < unsigned int > > > sels, std::vector< std::string > rsNames);
34 void setDefaults(std::vector< RVec > ref, int wnd, int taau, int tau_st, float crlUp, float effRad, int mod, std::string out, std::vector< int > indx, std::vector< std::vector < std::vector < unsigned int > > > sels, std::vector< std::string > rsNames);
36 void update(int frame, std::vector< RVec > curFrame);
42 FRIEND_TEST(corrTests, corrTests_setDefaults);
43 FRIEND_TEST(corrTests, corrTests_update);
44 FRIEND_TEST(corrTests, corrTests_trajectoryPartition);
45 FRIEND_TEST(corrTests, corrTests_correlationEval);
46 FRIEND_TEST(corrTests, corrTests_graphCalculations);
47 FRIEND_TEST(corrTests, corrTests_graphBackBoneEvaluation);
49 std::vector< std::vector< std::vector< double > > > matrixes;
50 std::vector< std::vector< RVec > > trajectory;
51 std::vector< std::vector< RVec > > frankensteinTrajectory;
52 std::vector< std::vector< std::vector< RVec > > > fitTrajectory;
53 std::vector< RVec > reference;
54 int window = 1000; // selectable
55 int tau = window / 2; // selectable
56 int tauStep = window / 10; // selectable
57 float crlUpBorder = 0.5; // selectable
58 float effRadius = 1.5; // selectable
59 int mode = 0; // selectable
60 std::string outputName = ""; // selectable
61 std::vector< int > index;
62 std::vector< std::string > resNames;
63 std::vector< std::vector < std::vector < unsigned int > > > selections;
66 std::vector< std::vector< std::pair< double, int > > > graph;
67 std::vector< std::vector< unsigned int > > subGraphPoints;
68 std::vector< std::vector< std::pair< unsigned int, unsigned int > > > subGraphRbr;
69 std::vector< std::vector< std::vector< std::pair< unsigned int, unsigned int > > > > subGraphRouts;
71 void trajectoryPartition();
73 void readWriteCorrelations(int rwMode);
75 void correlationEval();
77 void graphCalculations(unsigned int tauStart, unsigned int tauEnd);
79 static bool myComparisonFunction (const std::pair< int, double > i, const std::pair< int, double > j);
81 void graphBackBoneEvaluation();
83 void printOutputData();