Provide MMDB Shim built on gemmi - #385
Open
Dialpuri wants to merge 24 commits into
Open
Conversation
Dialpuri
marked this pull request as ready for review
July 23, 2026 16:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace MMDB2 with a gemmi-backed shim
Coot can now be built against
mmdb-shim/instead oflibmmdb2. The shim presentsMMDB's public API (
mmdb::*) unchanged, but every object is a thin wrapper overa live
gemmi::Structure. Goal: drop the MMDB2 dependency while keeping MMDB'sobservable behaviour.
Status: the full Coot tree compiles and links against the shim, and the
shim's own test suite passes. Runtime validation against real structures is still
required.
What's here
mmdb-shim/): mostly header-only inline implementationsover gemmi, plus a compiled component (
src/contacts.cc,src/io.cc) builtinto
libmmdbshim.a. It uses gemmi for the real work (I/O, symmetry, neighboursearch, mmCIF) and reimplements the parts gemmi lacks (MMDB's selection engine
and UDData). Public headers fall through to real MMDB when
COOT_USE_MMDB_SHIMis off. See
mmdb-shim/ARCHITECTURE.mdfor the full design.public data members, which gemmi can't; a clang AST-matcher tool converted
field access to accessors (
atom->x→atom->x(),strcpy(at->name,…)→at->SetAtomName(…)).Build
Coot builds against the shim via the CMake path; the shim's tests build with
mmdb-shim/build.sh.