From 24e64adf31fd18fa8f2dbc5505bc0bb4ca582632 Mon Sep 17 00:00:00 2001 From: Valerio Mariani <valerio.mariani@unibas.ch> Date: Thu, 28 Feb 2013 14:46:46 +0100 Subject: [PATCH] Return with an error message if reference structure has no valid distance to check --- modules/mol/alg/src/lddt.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/mol/alg/src/lddt.cc b/modules/mol/alg/src/lddt.cc index ca171dbc8..ebf1a6e89 100644 --- a/modules/mol/alg/src/lddt.cc +++ b/modules/mol/alg/src/lddt.cc @@ -301,6 +301,12 @@ int main (int argc, char **argv) } LOG_INFO("LDDT INFO FORMAT: Chain1 Residue1 ResNum1 Atom1 Chain2 Residue2 ResNum2 Atom2 ModelDist TargetDist Difference Tolerance Status"); + // error if the reference structure is empty + if (glob_dist_list.size()==0) { + std::cout << "ERROR: No valid distance to check in the reference structure(s). Please check that the first chain of the reference structure(s) contains a peptide." << std::endl; + exit(-1); + } + // cycles through the models to evaluate for (size_t i=0; i<files.size(); ++i) { EntityHandle model=load(files[i], profile); -- GitLab