}
if ((frame + 1 - trajectory.size()) % tauStep == 0) {
correlationEval();
+ selections.erase(selections.begin());
}
}
+ void graphEval() {
+
+ }
+
+ void backBoneGraphEval() {
+
+ }
+
private:
std::vector< std::vector< std::vector< float > > > matrixes;
std::vector< std::vector< RVec > > trajectory;
}
std::fclose(file);
}
-
+ if (rwMode == 0) {
+ file = std::fopen(outputName.c_str(), "r+");
+ matrixes.resize(0); matrixes.resize(tau + 1);
+ for (unsigned int i = 0; i < tau + 1; i++) {
+ int t0, t1, t2 = std::fscanf(file, "%d %d\n", &t0, &t1);
+ matrixes[i].resize(0); matrixes[i].resize(index.size());
+ for (unsigned int j = 0; j < index.size(); j++) {
+ matrixes[i][j].resize(index.size());
+ for (unsigned int k = 0; k < index.size(); k++) {
+ t2 = std::fscanf(file, "%f ", &matrixes[i][j][k]);
+ }
+ }
+ }
+ }
}
}
};
-const std::vector< std::vector< std::vector< double > > > read_correlation_matrix_file(const char* file_name, unsigned long size, unsigned int length)
-{
- FILE *file;
- std::vector< std::vector< std::vector< double > > > crrlts;
- file = std::fopen(file_name, "r+");
- std::vector< double > c;
- c.resize(size, 0);
- std::vector< std::vector< double > > b;
- b.resize(size, c);
- crrlts.resize(length + 1, b);
- //char a[100];
- std::cout << "reading correlations from a file:\n";
- for (unsigned int i = 0; i < length + 1; i++) {
- int t0 = 0, t1 = std::fscanf(file, "%d\n", &t0);
- std::cout << t0 << " | ";
- if (i % 100 == 0) {
- std::cout << "\n";
- }
- for (unsigned int j = 0; j < size; j++) {
- for (unsigned int f = 0; f < size; f++) {
- int t2 = std::fscanf(file, "%lf ", &crrlts[i][j][f]);
- }
- }
- }
- std::fclose(file);
- std::cout << "\n";
- return crrlts;
-}
-
template< typename T >
unsigned long posSrch(std::vector< T > a, T b) {
for (unsigned i01 = 0; i01 < a.size(); i01++) {
}
}
-gmx::RVec evaluate_com(std::vector< RVec > frame) {
- RVec temp;
- temp[0] = 0;
- temp[1] = 0;
- temp[2] = 0;
- for (unsigned int i = 0; i < frame.size(); i++) {
- temp += frame[i];
- }
- temp[0] /= frame.size();
- temp[1] /= frame.size();
- temp[2] /= frame.size();
- return temp;
-}
-
/*! \brief
* \ingroup module_trajectoryanalysis
*/