Skip to content
Snippets Groups Projects
Commit 6f72e98a authored by Marco Biasini's avatar Marco Biasini
Browse files

protect LocalDistTest against empty model/ref

parent dec6518c
No related branches found
No related tags found
No related merge requests found
#include <ost/log.hh>
#include <ost/mol/mol.hh>
#include "local_dist_test.hh"
......@@ -117,6 +118,14 @@ Real LocalDistTest(const EntityView& mdl, const EntityView& ref,
Real cutoff, Real max_dist)
{
ResidueViewList ref_residues=ref.GetResidueList();
if (!mdl.GetResidueCount()) {
LOG_WARNING("model structures doesn't contain any residues");
return 0.0;
}
if (ref_residues.empty()) {
LOG_WARNING("reference structures doesn't contain any residues");
return 0.0;
}
ChainView mdl_chain=mdl.GetChainList()[0];
// Residues with symmetric side-chains require special treatment as there are
// two possible ways to name the atoms. We calculate the overlap with the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment