Skip to content

Commit

Permalink
Add check in createdb if any structures were found #134
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-steinegger committed May 18, 2023
1 parent b9b5904 commit a146142
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/strucclustutils/structcreatedb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,11 @@ int createdb(int argc, const char **argv, const Command& command) {
EXIT(EXIT_FAILURE);
}
}

if (globalCnt == 0) {
Debug(Debug::ERROR) << "No structures found in given input.\n";
EXIT(EXIT_FAILURE);
}

Debug(Debug::INFO) << "Ignore " << (tooShort+incorrectFiles+notProtein) << " out of " << globalCnt << ".\n";
Debug(Debug::INFO) << "Too short: " << tooShort << ", incorrect: " << incorrectFiles << ", not proteins: " << notProtein << ".\n";
return EXIT_SUCCESS;
Expand Down

0 comments on commit a146142

Please sign in to comment.