Skip to content
Snippets Groups Projects
Commit 73db0650 authored by B13nch3n's avatar B13nch3n
Browse files

Use pdbx_entity_branch connectivity data in DNG

parent 2fd81d06
Branches
Tags
No related merge requests found
...@@ -55,6 +55,13 @@ void EntityIOMMCIFHandler::Import(mol::EntityHandle& ent, ...@@ -55,6 +55,13 @@ void EntityIOMMCIFHandler::Import(mol::EntityHandle& ent,
MMCifReader reader(stream,ent, MMCifReader reader(stream,ent,
IOProfileRegistry::Instance().GetDefault()); IOProfileRegistry::Instance().GetDefault());
reader.Parse(); 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, void EntityIOMMCIFHandler::Export(const mol::EntityView& ent,
...@@ -69,6 +76,13 @@ void EntityIOMMCIFHandler::Import(mol::EntityHandle& ent, ...@@ -69,6 +76,13 @@ void EntityIOMMCIFHandler::Import(mol::EntityHandle& ent,
MMCifReader reader(filename, ent, MMCifReader reader(filename, ent,
IOProfileRegistry::Instance().GetDefault()); IOProfileRegistry::Instance().GetDefault());
reader.Parse(); 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, bool EntityIOMMCIFHandler::ProvidesImport(const boost::filesystem::path& loc,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment