outputTemp[i].resize(colorsIndex.size(), 0);
}
gmx::RVec temp;
+ bool flag {false};
#pragma omp parallel for ordered schedule(dynamic)
for (size_t i = 0; i < colorsIndex.size(); ++i) {
for (size_t j {0}; j < colorsIndex.size(); ++j) {
- if (i != j) {
+ if (i != j) {
for (size_t k1 {0}; k1 < colorsIndex[i].size(); ++k1) {
- for (size_t k2 {0}; k2 < colorsIndex[j].size(); ++k2) {
+ flag = false;
+ for (size_t k2 {0}; k2 < colorsIndex[j].size() && !flag; ++k2) {
pbc_dx(inputPBC, inputFrame[colorsIndex[i][k1].second], inputFrame[colorsIndex[j][k2].second], temp);
if (temp.norm() <= radius) {
- ++outputTemp[i][j];
+ flag = true;
+ ++outputTemp[i][j];
}
- }
+ }
}
- }
+ }
}
}
#pragma omp barrier
std::ofstream file(output, std::ofstream::app);
file << "frame =" << std::setw(8) << frameNum << std::endl;
for (size_t i {0}; i < colorFormation.size(); ++i) {
- file << "color #" << std::setw(3) << i + 1;
+ file << "color #" << std::setw(3) << i;
if (toPeptide[i]) {
file << std::setw(4) << "yes";
} else {
file << " ] ";
}
if (inputStack[i].size() == 0) {
- file << std::setw(4) << "no []";
+ file << std::setw(5) << "no [] ";
} else {
- file << std::setw(4) << "yes [";
- file << std::setw(4) << inputStack[i].size();
+ file << std::setw(5) << "yes";
+ file << std::setw(4) << inputStack[i].size() << " [";
for (size_t j {0}; j < inputStack[i].size(); ++j) {
file << std::setw(4) << inputStack[i][j];
}
file << " ] ";
}
if (dipoleBetaAngles[i].size() == 0) {
- file << "no []";
+ file << std::setw(5) << "no [] ";
} else {
double tempDBangle {0.};
for (size_t j {0}; j < dipoleBetaAngles[i].size(); ++j) {
for (size_t j {0}; j < dipoleBetaAngles[i].size(); ++j) {
file << std::setw(8) << std::setprecision(2) << dipoleBetaAngles[i][j];
}
+ file << " ]";
}
- file << " ]" << std::endl;
+ file << std::endl;
}
file.close();
}