diff --git a/modules/io/src/mol/entity_io_mmcif_handler.cc b/modules/io/src/mol/entity_io_mmcif_handler.cc index 68955f3fd85d1aa2034cc415c59fd7404bfdd6e8..fa12d5a5ae9b98afb9c005d7e4f3141ff53acb4e 100644 --- a/modules/io/src/mol/entity_io_mmcif_handler.cc +++ b/modules/io/src/mol/entity_io_mmcif_handler.cc @@ -55,6 +55,13 @@ void EntityIOMMCIFHandler::Import(mol::EntityHandle& ent, MMCifReader reader(stream,ent, IOProfileRegistry::Instance().GetDefault()); reader.Parse(); + // This is a hack: the reader is not available in + // file_loader.cc/ FileLoader::TryLoadEntity, but this is where the Conop + // processor is called to establish covalent bonds. Since RequiresProcessor() + // always returns true, the mechanism always tries to establish bonds, so we + // do that here. + MMCifInfo info = reader.GetInfo(); + info.ConnectBranchLinks(); } void EntityIOMMCIFHandler::Export(const mol::EntityView& ent, @@ -69,6 +76,13 @@ void EntityIOMMCIFHandler::Import(mol::EntityHandle& ent, MMCifReader reader(filename, ent, IOProfileRegistry::Instance().GetDefault()); reader.Parse(); + // This is a hack: the reader is not available in + // file_loader.cc/ FileLoader::TryLoadEntity, but this is where the Conop + // processor is called to establish covalent bonds. Since RequiresProcessor() + // always returns true, the mechanism always tries to establish bonds, so we + // do that here. + MMCifInfo info = reader.GetInfo(); + info.ConnectBranchLinks(); } bool EntityIOMMCIFHandler::ProvidesImport(const boost::filesystem::path& loc,