From dd579d9e6682519937e5c27d1ccb9eb4c9aeb87f Mon Sep 17 00:00:00 2001 From: Martin Steinegger Date: Mon, 9 Dec 2024 02:37:57 +0700 Subject: [PATCH] Fix issue https://github.com/steineggerlab/foldseek/issues/393 --- src/strucclustutils/structureconvertalis.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/strucclustutils/structureconvertalis.cpp b/src/strucclustutils/structureconvertalis.cpp index 8b511d58..6852b7e4 100644 --- a/src/strucclustutils/structureconvertalis.cpp +++ b/src/strucclustutils/structureconvertalis.cpp @@ -694,6 +694,20 @@ R"html( Sequence::extractProfileConsensus(targetSeqData, targetEntryLen, *subMat, targetProfData); } } + for(size_t i = 0; i < outcodes.size(); i++) { + bool computed = false; + switch (outcodes[i]) { + case LocalParameters::OUTFMT_U: + case LocalParameters::OUTFMT_T: + tmres = tmaligner->computeTMscore(targetCaData, &targetCaData[res.dbLen], &targetCaData[res.dbLen+res.dbLen], res.dbLen, + res.qStartPos, res.dbStartPos, tmpBt, res.dbLen); + computed = true; + break; + } + if(computed){ + break; + } + } for(size_t i = 0; i < outcodes.size(); i++) { switch (outcodes[i]) { case Parameters::OUTFMT_QUERY: @@ -1022,6 +1036,8 @@ R"html( result.append(" "); result.append(targetId); result.append("\n"); + tmres = tmaligner->computeTMscore(targetCaData, &targetCaData[res.dbLen], &targetCaData[res.dbLen+res.dbLen], res.dbLen, + res.qStartPos, res.dbStartPos, tmpBt, res.dbLen); for(unsigned int tpos = 0; tpos < res.dbLen; tpos++){ size_t tId = tDbr->sequenceReader->getId(res.dbKey); char* targetSeqData = (char*) tDbr->sequenceReader->getData(tId, thread_idx);