From: Max Date: Mon, 19 Sep 2022 22:33:54 +0000 (+0300) Subject: asdsadasdas X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=54fc13a1205723e47efe658ffec9d0490328e0c4;p=alexxy%2Fgromacs-dssp.git asdsadasdas --- diff --git a/src/dssptools.cpp b/src/dssptools.cpp index 54e0e64..1b9aec6 100644 --- a/src/dssptools.cpp +++ b/src/dssptools.cpp @@ -145,21 +145,19 @@ bool secondaryStructures::hasHBondBetween(std::size_t Donor, std::size_t Accepto } bool secondaryStructures::NoChainBreaksBetween(std::size_t Resi1, std::size_t Resi2) const{ - bool flag{true}; std::size_t i{Resi1}, j{Resi2}; // From i to j → i <= j if ( i > j ){ std::swap(i, j); } for (; i != j; ++i){ - flag = !(SecondaryStructuresStatusMap[i].isBreakPartnerWith(&SecondaryStructuresStatusMap[i + 1]) && SecondaryStructuresStatusMap[i + 1].isBreakPartnerWith(&SecondaryStructuresStatusMap[i])); - } + if ( !(SecondaryStructuresStatusMap[i].isBreakPartnerWith(&SecondaryStructuresStatusMap[i + 1]) && SecondaryStructuresStatusMap[i + 1].isBreakPartnerWith(&SecondaryStructuresStatusMap[i])) ){ - if (!flag){ + } std::cout << "Patternsearch has detected a CHAINBREAK between " << Resi1 << " and " << Resi2 << std::endl; + return false; } - - return flag; + return true; } bridgeTypes secondaryStructures::calculateBridge(std::size_t i, std::size_t j) const{