added extra milestones
[alexxy/gromacs-testing.git] / src / spacetimecorr.cpp
index 9e4f7207af7659b4e4cf2559498ee56bdc57d6ad..0c2d8c4be340f12c860f7d06bcb0d2745f6476a9 100644 (file)
@@ -46,6 +46,7 @@
 #include <vector>
 #include <math.h>
 #include <omp.h>
+#include <string>
 
 #include <gromacs/trajectoryanalysis.h>
 #include <gromacs/utility/smalloc.h>
@@ -393,9 +394,10 @@ class SpaceTimeCorr : public TrajectoryAnalysisModule
         std::vector< int >                                          index;
         int                                                         frames              = 0;
         int                                                         basic_frame         = 0;
-        int                                                         tau                 = 0;
-        float                                                       crl_border          = 0;
-        float                                                       eff_rad             = 1.5;
+        int                                                         tau                 = 0; // selectable
+        float                                                       crl_border          = 0; // selectable
+        float                                                       eff_rad             = 1.5; // selectable
+        std::string                                                 OutPutName; // selectable
         // Copy and assign disallowed by base.
 };
 
@@ -436,6 +438,9 @@ SpaceTimeCorr::initOptions(IOptionsContainer          *options,
     options->addOption(SelectionOption("select_domains_and_residue").storeVector(&sel_)
                            .required().dynamicMask().multiValue()
                            .description("Domains to form rigid skeleton"));
+    options->addOption(StringOption("out_put")
+                            .store(&OutPutName)
+                            .description("<your name here> + <local file tag>.txt"));
     // Control input settings
     settings->setFlags(TrajectoryAnalysisSettings::efNoUserPBC);
     settings->setPBC(true);
@@ -504,10 +509,14 @@ SpaceTimeCorr::finishAnalysis(int nframes)
 
     std::cout << "routs evaluation: end\n";
 
-    make_correlation_matrix_file(crltns, "CubeT.txt", 0);
-    make_correlation_pairs_file(crltns, "test.txt", 0);
-    make_rout_file(crl_border, index, rout_new, "Routs_Cube.txt");
-    make_best_corrs_graphics(crltns, rout_new, index, "best_graphics_Cube.txt");
+    make_correlation_matrix_file(crltns, (OutPutName + "_matrix.txt").c_str(), 0);
+    std::cout << "corelation matrix printed\n";
+    make_correlation_pairs_file(crltns, (OutPutName + "_pairs.txt").c_str(), 0);
+    std::cout << "corelation pairs printed\n";
+    make_rout_file(crl_border, index, rout_new, (OutPutName + "_routs.txt").c_str());
+    std::cout << "corelation routs printed\n";
+    make_best_corrs_graphics(crltns, rout_new, index, (OutPutName + "_routs_graphics.txt").c_str());
+    std::cout << "corelation routs' pairs' graphics printed\n";
 
     std::cout << "Finish Analysis - end\n\n";
 }