Commit 1e06ae56 by Maarten L. Hekkelman

clean up code

parent 68b0d480
...@@ -1101,8 +1101,8 @@ void CalculateBetaSheets(std::vector<residue> &inResidues, statistics &stats, st ...@@ -1101,8 +1101,8 @@ void CalculateBetaSheets(std::vector<residue> &inResidues, statistics &stats, st
} }
} }
// Second attempt to create 'strands'. A strand is a range of residues // Create 'strands'. A strand is a range of residues without a gap in between
// without a gap in between in the same chain that belong to the same sheet. // that belong to the same sheet.
int strand = 0; int strand = 0;
for (uint32_t iSheet = 1; iSheet < sheet; ++iSheet) for (uint32_t iSheet = 1; iSheet < sheet; ++iSheet)
...@@ -1120,86 +1120,6 @@ void CalculateBetaSheets(std::vector<residue> &inResidues, statistics &stats, st ...@@ -1120,86 +1120,6 @@ void CalculateBetaSheets(std::vector<residue> &inResidues, statistics &stats, st
lastNr = res.mNumber; lastNr = res.mNumber;
} }
} }
// // Construct the 'strands'
// // For mmCIF output, this is needed and since we now have the information available
// // it is best to do the calculation here.
// // strands are ranges of residues of length > 1 that form beta bridges in a sheet.
// for (uint32_t iSheet = 1; iSheet < sheet; ++iSheet)
// {
// std::vector<std::tuple<uint32_t,uint32_t>> strands;
// for (auto &bridge : bridges)
// {
// if (bridge.sheet != iSheet)
// continue;
// for (auto &range : { bridge.i, bridge.j})
// {
// auto imin = range.front();
// auto imax = range.back();
// // if (imin == imax)
// // continue;
// if (imin > imax)
// std::swap(imin, imax);
// auto ii = find_if(strands.begin(), strands.end(), [a = imin, b = imax] (std::tuple<uint32_t,uint32_t> &t)
// {
// auto &&[start, end] = t;
// bool result = false;
// if (start <= b and end >= a)
// {
// result = true;
// if (start > a)
// start = a;
// if (end < b)
// end = b;
// }
// return result;
// });
// if (ii == strands.end())
// strands.emplace_back(imin, imax);
// }
// }
// std::sort(strands.begin(), strands.end());
// // collapse ranges that overlap
// if (strands.size() > 1)
// {
// auto si = strands.begin();
// while (std::next(si) != strands.end())
// {
// auto &&[afirst, alast] = *si;
// auto &&[bfirst, blast] = *(std::next(si));
// if (alast >= bfirst)
// {
// bfirst = afirst;
// si = strands.erase(si);
// continue;
// }
// ++si;
// }
// }
// for (size_t i = 0; i < strands.size(); ++i)
// {
// const auto &[first, last] = strands[i];
// for (auto nr = first; nr <= last; ++nr)
// {
// assert(inResidues[nr].mStrand == 0);
// inResidues[nr].SetStrand(i + 1);
// }
// }
// }
} }
// -------------------------------------------------------------------- // --------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment