diff --git a/modules/mol/alg/src/consistency_checks.cc b/modules/mol/alg/src/consistency_checks.cc index 371f3c37b6b8fbc921ecd3a82fa647251992b216..8cafbe6ba802864b77be37b399e7c324bbd3abc3 100644 --- a/modules/mol/alg/src/consistency_checks.cc +++ b/modules/mol/alg/src/consistency_checks.cc @@ -36,7 +36,7 @@ namespace ost { namespace mol { namespace alg { -bool ResidueNamesMatch (const mol::EntityView& probe, const mol::EntityView& reference) +bool ResidueNamesMatch (const mol::EntityView& probe, const mol::EntityView& reference, bool consistency_checks) { bool return_value = true; ChainViewList ref_chains = reference.GetChainList(); @@ -51,8 +51,12 @@ bool ResidueNamesMatch (const mol::EntityView& probe, const mol::EntityView& ref if (probe_residue.IsValid()) { if (probe_residue.GetName()!=rri->GetName()) { return_value = false; - LOG_VERBOSE("Name mismatch for residue " << probe_residue.GetNumber() << " in chain " << rci); - LOG_VERBOSE("In reference: " << rri->GetName() << ", in compared structure: " << probe_residue.GetName()); + if (consistency_checks==true) { + LOG_ERROR("Name mismatch for residue " << probe_residue.GetNumber() << ": in the reference structure(s) is " << rri->GetName() << ", in the model " << probe_residue.GetName()); + } else { + LOG_WARNING("Name mismatch for residue " << probe_residue.GetNumber() << ": in the reference structure(s) is " << rri->GetName() << ", in the model " << probe_residue.GetName()); + } + } } } diff --git a/modules/mol/alg/src/consistency_checks.hh b/modules/mol/alg/src/consistency_checks.hh index 77cffda1ce3639c37111cc0b7d8fa120015e9958..5da6a281fdf3a97de78ecc6ff0236048e01bea80 100644 --- a/modules/mol/alg/src/consistency_checks.hh +++ b/modules/mol/alg/src/consistency_checks.hh @@ -32,7 +32,7 @@ namespace ost { namespace mol { namespace alg { /// (i.e.: the first chain of the reference will be compared with the first chain of the probe /// structure, etc.) -bool DLLEXPORT_OST_MOL_ALG ResidueNamesMatch (const mol::EntityView& probe, const mol::EntityView& reference); +bool DLLEXPORT_OST_MOL_ALG ResidueNamesMatch (const mol::EntityView& probe, const mol::EntityView& reference, bool consistency_checks); }}} diff --git a/modules/mol/alg/src/lddt.cc b/modules/mol/alg/src/lddt.cc index 22902b1d10c1d466f3ccbe7dbefc8894744e5997..ca171dbc8a2e3353ddbfdbf8a0836ed5ef111268 100644 --- a/modules/mol/alg/src/lddt.cc +++ b/modules/mol/alg/src/lddt.cc @@ -314,13 +314,13 @@ int main (int argc, char **argv) EntityView outv=model.GetChainList()[0].Select("peptide=true"); for (std::vector<EntityView>::const_iterator ref_list_it = ref_list.begin(); ref_list_it != ref_list.end(); ++ref_list_it) { - bool cons_check = ResidueNamesMatch(v,*ref_list_it); + bool cons_check = ResidueNamesMatch(v,*ref_list_it,consistency_checks); if (cons_check==false) { if (consistency_checks==true) { - LOG_ERROR("Residue names in model: " << files[i] << " are inconsistent with one or more references"); + LOG_ERROR("Residue names in model: " << files[i] << " and in reference structure(s) are inconsistent."); exit(-1); } else { - LOG_WARNING("Residue names in model: " << files[i] << " are inconsistent with one or more references"); + LOG_WARNING("Residue names in model: " << files[i] << " and in reference structure(s) are inconsistent."); } } }