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

FindPotentialStereo missing from Java Wrappers

Aperta
#9,350 2 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
65/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, java
Ambito
api

Direzione di ricerca

Start by locating the SWIG interface for the Java bindings and inspect the existing RDKFuncs, ROMol, and RWMol wrappers for findPotentialStereoBonds. Compare their patterns with the C++ API and the Python FindPotentialStereo example. Done means Java exposes findPotentialStereo(ROMol), StereoInfo and its enums/accessors, and the StereoInfo_Vect collection.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement stale
Summary

MolOps::findPotentialStereo() (introduced in RDKit 2020.09) is not wrapped in the Java bindings. Only the older findPotentialStereoBonds(ROMol) and findPotentialStereoBonds(ROMol, boolean) are available. The method is also absent from ROMol and RWMol. This has been confirmed against the newer KNIME 5.8 RDKit Java bindings in addition to the KNIME 5.2 RDKit bindings.

Background

The RDKit documentation describes two algorithms for identifying potential stereocenters/stereobonds:

  1. The legacy AssignStereochemistry() approach, which sets the _ChiralityPossible property on atoms it recognises as potential stereocenters.
  2. The newer FindPotentialStereo() approach, which is both more accurate (particularly for para-stereochemistry) and faster, and is intended to become the default in a future RDKit version.

The key accuracy improvement is the correct identification of para-stereocenters — atoms whose four substituents are constitutionally identical (same graph topology) but differ in the stereochemistry of sub-substituents, as illustrated in the RDKit documentation.

Concrete example

Using the molecule CC(Cl)(F)C(F)C(Cl)(F)C (canonical SMILES: CC(F)(Cl)C(F)C(C)(F)Cl; this is the structure on the RHS of the figure at https://www.rdkit.org/docs/RDKit_Book.html#identification-of-potential-stereoatoms-stereobonds):

from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import FindPotentialStereo

mol = Chem.MolFromSmiles('CC(Cl)(F)C(F)C(Cl)(F)C')
AllChem.AssignStereochemistry(mol, cleanIt=True, force=True, flagPossibleStereoCenters=True)

print('Legacy _ChiralityPossible:')
for atom in mol.GetAtoms():
    if atom.HasProp('_ChiralityPossible'):
        print(f'  Atom {atom.GetIdx()} ({atom.GetSymbol()})')
# Output:
#   Atom 1 (C)
#   Atom 6 (C)

print('FindPotentialStereo:')
for info in FindPotentialStereo(mol):
    print(f'  centeredOn={info.centeredOn}, type={info.type}, specified={info.specified}')
# Output:
#   centeredOn=1, type=Atom_Tetrahedral, specified=Unspecified
#   centeredOn=4, type=Atom_Tetrahedral, specified=Unspecified
#   centeredOn=6, type=Atom_Tetrahedral, specified=Unspecified

As documented in the above link, and demonstrated here in the code snippet using the Python bindings, the legacy _ChiralityPossible approach finds only atoms 1 and 6 (the two terminal carbons). It misses atom 4, the central carbon, which is a para-stereocenter — its two branches (C(Cl)(F)C on each side) are constitutionally identical but differ in the stereochemistry of their sub-substituents. FindPotentialStereo correctly identifies all three stereocenters.

Impact

Without FindPotentialStereo in the Java bindings, Java code reliant on finding potential stereocentres is forced to fall back to the legacy _ChiralityPossible detection and will silently under-enumerate stereoisomers for molecules containing para-stereocenters.

What would need to be wrapped

Based on the C++ API, the following would need to be added to the SWIG interface:

  • RDKFuncs.findPotentialStereo(ROMol) — the main method
  • A StereoInfo class with accessors for centeredOn, type, specified, and possibleTypes
  • A StereoInfo_Vect collection type
  • A Chirality.StereoType enum (Atom, Bond, Unspecified)
  • A Chirality.StereoDescriptor enum for the possibleTypes field
RDKit version confirmed affected

KNIME 5.2 - 5.8 RDKit Java bindings (checked RDKFuncs, ROMol, and RWMol classes).

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 Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.