diff --git a/modules/io/src/mol/mmcif_reader.cc b/modules/io/src/mol/mmcif_reader.cc index 64d632755ceb4bb3c11de43f7988196e6181c654..c307a22a2b565682b44c71580175c3ef3fb3a47f 100644 --- a/modules/io/src/mol/mmcif_reader.cc +++ b/modules/io/src/mol/mmcif_reader.cc @@ -99,6 +99,18 @@ bool MMCifReader::OnBeginData(const StringRef& data_name) { LOG_DEBUG("MCIFFReader: " << profile_); Profile profile_import("MMCifReader::OnBeginData"); + if (chain_count_ > 0) { + std::stringstream ss; + ss << "Can only read one data block. Found second one 'data_" << data_name << "'."; + if (profile_.fault_tolerant) { + LOG_WARNING(ss.str()); + } else { + throw IOException(this->FormatDiagnostic(STAR_DIAG_ERROR, + ss.str(), + this->GetCurrentLinenum())); + } + + } // IDs in mmCIF files can be any string, so no restrictions here