Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add mol_numatoms/mol_numheavyatoms support for qmol in Postgresql cartridge

Aperta
#9,623 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
50/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, postgresql, sql
Ambito
databases

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

enhancement

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rdkit/rdkit

Tutte le issue di rdkit/rdkit

Issue simili

Altre issue su Databases

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.