Add mol_numatoms/mol_numheavyatoms support for qmol in Postgresql cartridge
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 50/100
Direzione di ricerca
Start by reproducing the qmol_from_smarts(), mol_numatoms(), and mol_numheavyatoms() calls in the PostgreSQL cartridge described in the issue. Trace the cartridge entry points for these functions and add coverage for qmol inputs. Done means FMCS SMARTS/qmol results can be counted server-side with documented, reliable atom and heavy-atom counts.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem? Please describe.
fmcs()/fmcs_smiles() return a maximum-common-substructure result as SMARTS/qmol, but there is no cartridge function to count the atoms in that result server-side. mol_numatoms(qmol) and mol_numheavyatoms(qmol) both fail with "function does not exist," and there's no mol_from_smarts() to convert a SMARTS string into a plain mol that those functions do accept — only qmol_from_smarts(), which produces a qmol. Anyone who wants a simple "how big is this shared substructure" metric from an FMCS result currently has no way to compute it inside SQL at all.
Describe the solution you'd like
Add mol_numatoms(qmol) and mol_numheavyatoms(qmol) overloads (or an equivalent documented, safe atom-count path for qmol values) so basic size/coverage metrics derived from FMCS results can be computed without leaving the database.
Describe alternatives you've considered
The only workaround we found is round-tripping the SMARTS text out of SQL and into application code (e.g., RDKit in Python) to call GetNumAtoms() there. We also tried piping the SMARTS string back through mol_from_smiles() to keep everything in SQL — this technically produces a mol and gives a correct atom count for our test cases, but only by coincidence: bracket-atom SMARTS emitted under default AtomCompare/BondCompare settings happens to also be valid SMILES syntax. It's not a documented or reliable contract, and it breaks down badly if reused for anything beyond atom-counting (see our related feature request on substruct_count query construction).
Additional context
Confirmed against RDKit 2025.03.1 (PostgreSQL cartridge, PostgreSQL 17): mol_from_smarts() doesn't exist, qmol_from_smarts() does but returns a type mol_numatoms/mol_numheavyatoms reject outright with ERROR: function mol_numatoms(qmol) does not exist.
- Lingua principale
- HTML
- Stelle
- 3.6k
- Fork
- 1.1k
- Merge medio
- 3g 8h
- PR unite (30g)
- 44
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rdkit/rdkit
-
Clarify mol_from_smiles vs qmol_from_smarts for substruct_count queries in Postgresql cartridge Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 65/100
-
Improve depiction of RNA Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
hanami/hanami-cli#449 ·
-
external-issue to-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
SqliteSaver.list(filter=...) silently misses nested metadata values containing non-ASCII text Apertaexternal
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
langchain-ai/langgraph#9074 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
litestar-org/sqlspec#816 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Apertafuzz
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ClickHouse/ClickHouse#122114 ·