Three databases, one molecule
SARVault joins three public sources: ChEMBL for bioactivity, UniChem for identifier mapping, PDBe for structures. All three contain “the same” molecules. None of them agree on what that sentence means which creates an actual engineering problem.
Identity is a decision
A compound in ChEMBL carries a ChEMBL ID, PDB maintains it as a short ligand code (three characters for older components, five since the three-character space ran out), registries add their own accessions on top. The bridge lies within the InChIKey, a hashed, canonical descriptor of a structure, so UniChem is essentially a giant cross-reference table keyed on it. So far, so good until chemistry intervenes.
Is the hydrochloride salt the same compound as the free base? For a scientist asking “does this scaffold inhibit the target”, yes. For an InChIKey, absolutely not: different structure, different hash, no join. Stereochemistry may be fully specified in one source and absent in another, so the “same” molecule hashes differently. Tautomers are only partly covered: the standard InChI folds the common mobile-hydrogen tautomers into one key, but keto-enol forms still hash differently. Every one of these variables amounts to a silent join miss: no error but a molecule that fails to bring its crystal structure along.
Standardize, link, remember what you did
The workable pattern: make identity an explicit, versioned decision. Standardize structures first (extract the parent from salts, neutralize charges, settle on a tautomer convention), derive keys at a declared level of strictness. Then, link across sources while keeping the original identifiers so every merge can be unwound. SARVault leaves the structure-level matching to UniChem, resolves the PDBe ligand codes to concrete entries and keeps every original identifier, so where it links a ChEMBL compound to a PDBe entry, that link is a computed and testable artifact.
So in molecular data, “same” is a modelling decision carrying a version number. Decide it once, in the warehouse, and let every downstream query inherit that decision rather than re-improvise it.