#ifndef CORRTYPE_H
#define CORRTYPE_H
+#include <iostream>
+#include <vector>
+#include <cfloat>
-class corrtype
-{
-public:
- corrtype();
+#include <gromacs/trajectoryanalysis.h>
+// #include <gromacs/trajectoryanalysis/topologyinformation.h>
+
+#include "/home/titov_ai/Develop/gromacs-original/src/gromacs/trajectoryanalysis/topologyinformation.h"
+
+#include "newfit.h"
+
+using namespace gmx;
+
+using gmx::RVec;
+
+
+class correlationType {
+
+ public:
+
+ // деструктор класса
+ ~correlationType();
+
+ // конструктор класса для инициализации
+ correlationType();
+
+ correlationType(std::vector< RVec > ref, int wnd, int taau, int tau_st, float crlUp, float effRad, int mod, std::string out, std::vector< std::vector < std::vector < unsigned int > > > sels, std::vector< std::string > rsNames);
+
+ void setDefaults(std::vector< RVec > ref, int wnd, int taau, int tau_st, float crlUp, float effRad, int mod, std::string out, std::vector< std::vector < std::vector < unsigned int > > > sels, std::vector< std::string > rsNames);
+
+ void update(int frame, std::vector< RVec > curFrame);
+
+ void printData();
+
+ private:
+
+ std::vector< std::vector< std::vector< double > > > matrixes;
+ std::vector< std::vector< RVec > > trajectory;
+ std::vector< std::vector< RVec > > frankensteinTrajectory;
+ std::vector< std::vector< std::vector< RVec > > > fitTrajectory;
+ std::vector< RVec > reference;
+ int window = 1000; // selectable
+ int tau = window / 2; // selectable
+ int tauStep = window / 10; // selectable
+ float crlUpBorder = 0.5; // selectable
+ float effRadius = 1.5; // selectable
+ int mode = 0; // selectable
+ std::string outputName = ""; // selectable
+ std::vector< int > index;
+ std::vector< std::string > resNames;
+ std::vector< std::vector < std::vector < unsigned int > > > selections;
+ int count = 0;
+
+ std::vector< std::vector< std::pair< double, int > > > graph;
+ std::vector< std::vector< unsigned int > > subGraphPoints;
+ std::vector< std::vector< std::pair< unsigned int, unsigned int > > > subGraphRbr;
+ std::vector< std::vector< std::vector< std::pair< unsigned int, unsigned int > > > > subGraphRouts;
+
+ void trajectoryPartition();
+
+ void readWriteCorrelations(int rwMode);
+
+ void correlationEval();
+
+ void graphCalculations(unsigned int tauStart, unsigned int tauEnd);
+
+ static bool myComparisonFunction (const std::pair< int, double > i, const std::pair< int, double > j);
+
+ void graphBackBoneEvaluation();
+
+ void printOutputData();
};
#endif // CORRTYPE_H