#include <gromacs/utility/gmxomp.h>
#include <gromacs/trajectoryanalysis.h>
-#include "new_fit.h"
+//#include "new_fit.h"
+#include "newfit.h"
using namespace gmx;
std::vector< std::vector < RVec > > fitting_temp;
std::vector< long double > noise;
std::vector< int > index;
- long double epsi = 0.15;
+ long double epsi = 0.1;
long double fitting_prec = 0.00001;
int frames = 0;
int iter_count = 0;
iter_count++;
}
*/
-
+/*
noise_mid = 9999;
while (noise_mid > epsi) {
fitting_pairs.push_back(std::make_pair (i, i));
}
}
+*/
-/*
std::chrono::time_point<std::chrono::system_clock> start1, end1;
FILE * pFile;
pFile = fopen ("/home/toluk/Develop/testing/input.in","w+");
long double fitting_prec = 1;
std::vector < RVec > fit_temp;
long double temp1, temp2;
- fprintf (pFile, "starting dist %Lf\n",dist(trajectory[0], trajectory[900], fitting_pairs));
+ NewFit objFit;
+ std::cout << objFit.dist(trajectory[0], trajectory[900], fitting_pairs);
+ //fprintf (pFile, "starting dist %Lf\n", objFit.dist(trajectory[0], trajectory[900], fitting_pairs));
fprintf (pFile, "fitting prec constant | new dist | taken time\n");
- for (int i = 1; i <= 10; i++) {
- temp1 = fitting_prec / 10;
- for (int j = 0; j <= 9; j++) {
- temp2 = fitting_prec - temp1 * j;
+ //for (int i = 1; i <= 10; i++) {
+ temp1 = 0.00001;
+ //for (int j = 0; j <= 9; j++) {
+ //NewFit objFit;
+ //temp2 = fitting_prec - temp1 * j;
fit_temp.resize(0);
fit_temp = trajectory[900];
start1 = std::chrono::system_clock::now();
- new_fit(trajectory[0], fit_temp, fitting_pairs, index.size(), temp2);
+ objFit.new_fit(trajectory[0], fit_temp, fitting_pairs, index.size(), temp1);
end1 = std::chrono::system_clock::now();
- fprintf (pFile, "%25.10Lf %25.10Lf %10ld millisecconds\n", temp2, dist(trajectory[0], fit_temp, fitting_pairs), std::chrono::duration_cast<std::chrono::milliseconds>(end1-start1).count());
- std::cout << i << " " << j << "\n";
- }
+ fprintf (pFile, "%25.10Lf %25.10Lf %10ld millisecconds\n", temp2, objFit.dist(trajectory[0], fit_temp, fitting_pairs), std::chrono::duration_cast<std::chrono::milliseconds>(end1-start1).count());
+ //std::cout << i << " " << j << "\n";
+ //}
fitting_prec /= 10;
- }
+ //}
fclose (pFile);
-*/
+
std::cout << "analys finish\n";
}